Skip to content

Jasa Pembayaran orders ​

With Jasa Pembayaran, RekberPay buys something for the buyer: the buyer pays the item price plus a service fee, an operator makes the purchase and hands back the result. This run orders a keyboard from a marketplace listing.

1. Check the service and quote the fee ​

bash
curl https://api.rekberpay.com/v1/jasabayar/config \
  -H "Authorization: Bearer $REKBERPAY_API_KEY"
js
const res = await fetch('https://api.rekberpay.com/v1/jasabayar/config', {
    headers: {
        Authorization: `Bearer ${process.env.REKBERPAY_API_KEY}`,
    },
});
const data = await res.json();
python
import os

import requests

resp = requests.get(
    "https://api.rekberpay.com/v1/jasabayar/config",
    headers={
        "Authorization": f"Bearer {os.environ['REKBERPAY_API_KEY']}",
    },
    timeout=30,
)
print(resp.status_code, resp.json())
php
<?php

$ch = curl_init('https://api.rekberpay.com/v1/jasabayar/config');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('REKBERPAY_API_KEY'),
    ],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

200 OK

json
{
    "success": true,
    "data": {
        "enabled": true,
        "fee_type": "percentage",
        "fee_value": 5,
        "fee_min_idr": 5000,
        "fee_max_idr": null,
        "sla_hours": 48,
        "min_item_price_idr": 10000,
        "max_item_price_idr": 10000000
    }
}

Always let the server compute the fee:

bash
curl -X POST https://api.rekberpay.com/v1/jasabayar/quote \
  -H "Authorization: Bearer $REKBERPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "item_price": 150000
  }'
js
const res = await fetch('https://api.rekberpay.com/v1/jasabayar/quote', {
    method: 'POST',
    headers: {
        Authorization: `Bearer ${process.env.REKBERPAY_API_KEY}`,
        'Content-Type': 'application/json',
    },
    body: JSON.stringify({
        item_price: 150000
    }),
});
const data = await res.json();
python
import os

import requests

resp = requests.post(
    "https://api.rekberpay.com/v1/jasabayar/quote",
    headers={
        "Authorization": f"Bearer {os.environ['REKBERPAY_API_KEY']}",
    },
    json={
        "item_price": 150000,
    },
    timeout=30,
)
print(resp.status_code, resp.json())
php
<?php

$ch = curl_init('https://api.rekberpay.com/v1/jasabayar/quote');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('REKBERPAY_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'item_price' => 150000,
    ]),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

200 OK

json
{
    "success": true,
    "data": {
        "itemPrice": 150000,
        "serviceFee": 7500,
        "total": 157500
    }
}

2. Create the order ​

bash
curl -X POST https://api.rekberpay.com/v1/jasabayar \
  -H "Authorization: Bearer $REKBERPAY_API_KEY" \
  -H "Idempotency-Key: 55555552-5555-4555-8555-555555555555" \
  -H "Content-Type: application/json" \
  -d '{
    "target_url": "https://www.tokopedia.com/tokoexample/keyboard-mekanikal-tkl",
    "target_label": "Keyboard mekanikal TKL",
    "item_price": 150000,
    "notes": "Warna hitam, switch brown."
  }'
js
const res = await fetch('https://api.rekberpay.com/v1/jasabayar', {
    method: 'POST',
    headers: {
        Authorization: `Bearer ${process.env.REKBERPAY_API_KEY}`,
        'Content-Type': 'application/json',
        'Idempotency-Key': '55555552-5555-4555-8555-555555555555',
    },
    body: JSON.stringify({
        target_url: "https://www.tokopedia.com/tokoexample/keyboard-mekanikal-tkl",
        target_label: "Keyboard mekanikal TKL",
        item_price: 150000,
        notes: "Warna hitam, switch brown."
    }),
});
const data = await res.json();
python
import os

import requests

resp = requests.post(
    "https://api.rekberpay.com/v1/jasabayar",
    headers={
        "Authorization": f"Bearer {os.environ['REKBERPAY_API_KEY']}",
        "Idempotency-Key": "55555552-5555-4555-8555-555555555555",
    },
    json={
        "target_url": "https://www.tokopedia.com/tokoexample/keyboard-mekanikal-tkl",
        "target_label": "Keyboard mekanikal TKL",
        "item_price": 150000,
        "notes": "Warna hitam, switch brown.",
    },
    timeout=30,
)
print(resp.status_code, resp.json())
php
<?php

$ch = curl_init('https://api.rekberpay.com/v1/jasabayar');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('REKBERPAY_API_KEY'),
        'Content-Type: application/json',
        'Idempotency-Key: 55555552-5555-4555-8555-555555555555',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'target_url' => 'https://www.tokopedia.com/tokoexample/keyboard-mekanikal-tkl',
        'target_label' => 'Keyboard mekanikal TKL',
        'item_price' => 150000,
        'notes' => 'Warna hitam, switch brown.',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

201 Created

json
{
    "success": true,
    "data": {
        "id": "66666662-6666-4666-8666-666666666666",
        "target_url": "https://www.tokopedia.com/tokoexample/keyboard-mekanikal-tkl",
        "target_label": "Keyboard mekanikal TKL",
        "notes": "Warna hitam, switch brown.",
        "item_price": 150000,
        "service_fee": 7500,
        "total": 157500,
        "status": "awaiting_payment",
        "sla_deadline_at": null,
        "paid_at": null,
        "delivered_at": null,
        "delivery_note": null,
        "has_credentials": false,
        "first_viewed_at": null,
        "refunded_at": null,
        "refund_reason": null,
        "auto_refunded": false,
        "cancelled_at": null,
        "created_at": "2026-10-13T14:23:18.937Z",
        "updated_at": "2026-10-13T14:23:18.937Z"
    }
}

The server computes the fee again from its live settings, so a stale quote can never underpay. Prices above the limit are refused:

400 Bad Request

json
{
    "success": false,
    "error": {
        "code": "AMOUNT_TOO_LARGE",
        "message": "Nominal maksimum untuk satu pesanan adalah Rp10.000.000."
    }
}

3. Pay ​

The payment works like an escrow payment. Start it:

bash
curl -X POST https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/pay \
  -H "Authorization: Bearer $REKBERPAY_API_KEY" \
  -H "Idempotency-Key: 77777772-7777-4777-8777-777777777777" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "qris"
  }'
js
const res = await fetch('https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/pay', {
    method: 'POST',
    headers: {
        Authorization: `Bearer ${process.env.REKBERPAY_API_KEY}`,
        'Content-Type': 'application/json',
        'Idempotency-Key': '77777772-7777-4777-8777-777777777777',
    },
    body: JSON.stringify({
        method: "qris"
    }),
});
const data = await res.json();
python
import os

import requests

resp = requests.post(
    "https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/pay",
    headers={
        "Authorization": f"Bearer {os.environ['REKBERPAY_API_KEY']}",
        "Idempotency-Key": "77777772-7777-4777-8777-777777777777",
    },
    json={
        "method": "qris",
    },
    timeout=30,
)
print(resp.status_code, resp.json())
php
<?php

$ch = curl_init('https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/pay');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('REKBERPAY_API_KEY'),
        'Content-Type: application/json',
        'Idempotency-Key: 77777772-7777-4777-8777-777777777777',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'method' => 'qris',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

201 Created

json
{
    "success": true,
    "data": {
        "payment_link_id": "88888882-8888-4888-8888-888888888888",
        "gateway_order_id": "RBP-66666662-1791901398952-e6cc94f7",
        "method": "qris",
        "provider": "manual_qris",
        "qr_code_url": "https://api.rekberpay.com/uploads/escrow/1779846015565_f14a5645.jpg",
        "expires_at": "2026-10-13T15:23:18.952Z",
        "amount": 157500,
        "order_amount": 157500,
        "surcharge": 0
    }
}

For a manual method, report the transfer once it is made. The order moves to pending_review until RekberPay confirms the money:

bash
curl -X POST https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/claim-payment \
  -H "Authorization: Bearer $REKBERPAY_API_KEY" \
  -H "Idempotency-Key: 99999992-9999-4999-8999-999999999999" \
  -H "Content-Type: application/json" \
  -d '{}'
js
const res = await fetch('https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/claim-payment', {
    method: 'POST',
    headers: {
        Authorization: `Bearer ${process.env.REKBERPAY_API_KEY}`,
        'Content-Type': 'application/json',
        'Idempotency-Key': '99999992-9999-4999-8999-999999999999',
    },
    body: JSON.stringify({}),
});
const data = await res.json();
python
import os

import requests

resp = requests.post(
    "https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/claim-payment",
    headers={
        "Authorization": f"Bearer {os.environ['REKBERPAY_API_KEY']}",
        "Idempotency-Key": "99999992-9999-4999-8999-999999999999",
    },
    json={},
    timeout=30,
)
print(resp.status_code, resp.json())
php
<?php

$ch = curl_init('https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/claim-payment');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('REKBERPAY_API_KEY'),
        'Content-Type: application/json',
        'Idempotency-Key: 99999992-9999-4999-8999-999999999999',
    ],
    CURLOPT_POSTFIELDS => json_encode(new stdClass()),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

200 OK

json
{
    "success": true,
    "data": {
        "status": "pending_review"
    }
}

4. Poll the payment and the order ​

bash
curl https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/payment-status \
  -H "Authorization: Bearer $REKBERPAY_API_KEY"
js
const res = await fetch('https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/payment-status', {
    headers: {
        Authorization: `Bearer ${process.env.REKBERPAY_API_KEY}`,
    },
});
const data = await res.json();
python
import os

import requests

resp = requests.get(
    "https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/payment-status",
    headers={
        "Authorization": f"Bearer {os.environ['REKBERPAY_API_KEY']}",
    },
    timeout=30,
)
print(resp.status_code, resp.json())
php
<?php

$ch = curl_init('https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666/payment-status');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('REKBERPAY_API_KEY'),
    ],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

200 OK

json
{
    "success": true,
    "data": {
        "id": "88888882-8888-4888-8888-888888888888",
        "escrow_id": null,
        "provider": "manual_qris",
        "method": "qris",
        "gateway_order_id": "RBP-66666662-1791901398952-e6cc94f7",
        "amount": "157500.00",
        "status": "pending",
        "qr_url": "https://api.rekberpay.com/uploads/escrow/1779846015565_f14a5645.jpg",
        "va_number": null,
        "redirect_url": null,
        "expires_at": "2026-10-13T15:23:18.952Z",
        "raw_response": "{\"provider\":\"qris_manual\",\"amount\":157500,\"instructions\":\"Scan QRIS dengan aplikasi mobile banking / e-wallet, lalu tekan \\\"Saya sudah bayar\\\".\"}",
        "created_at": "2026-10-13T14:23:18.952Z",
        "updated_at": "2026-10-13T14:23:18.952Z",
        "paid_at": null
    }
}

Then read the order. After delivery the buyer also gets credentials with the delivery details.

bash
curl https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666 \
  -H "Authorization: Bearer $REKBERPAY_API_KEY"
js
const res = await fetch('https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666', {
    headers: {
        Authorization: `Bearer ${process.env.REKBERPAY_API_KEY}`,
    },
});
const data = await res.json();
python
import os

import requests

resp = requests.get(
    "https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666",
    headers={
        "Authorization": f"Bearer {os.environ['REKBERPAY_API_KEY']}",
    },
    timeout=30,
)
print(resp.status_code, resp.json())
php
<?php

$ch = curl_init('https://api.rekberpay.com/v1/jasabayar/66666662-6666-4666-8666-666666666666');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('REKBERPAY_API_KEY'),
    ],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

200 OK

json
{
    "success": true,
    "data": {
        "id": "66666662-6666-4666-8666-666666666666",
        "target_url": "https://www.tokopedia.com/tokoexample/keyboard-mekanikal-tkl",
        "target_label": "Keyboard mekanikal TKL",
        "notes": "Warna hitam, switch brown.",
        "item_price": 150000,
        "service_fee": 7500,
        "total": 157500,
        "status": "awaiting_payment",
        "sla_deadline_at": null,
        "paid_at": null,
        "delivered_at": null,
        "delivery_note": null,
        "has_credentials": false,
        "first_viewed_at": null,
        "refunded_at": null,
        "refund_reason": null,
        "auto_refunded": false,
        "cancelled_at": null,
        "created_at": "2026-10-13T14:23:18.937Z",
        "updated_at": "2026-10-13T14:23:18.937Z",
        "credentials": null,
        "events": [
            {
                "event": "created",
                "message": null,
                "actor_role": "buyer",
                "created_at": "2026-10-13T14:23:18.938Z"
            }
        ]
    }
}

If the operator does not deliver before sla_deadline_at, the order is refunded in full automatically (auto_refunded: true).

Cancelling ​

An order can be cancelled until it is paid:

bash
curl -X POST https://api.rekberpay.com/v1/jasabayar/aaaaaaa2-aaaa-4aaa-8aaa-aaaaaaaaaaaa/cancel \
  -H "Authorization: Bearer $REKBERPAY_API_KEY" \
  -H "Idempotency-Key: bbbbbbb2-bbbb-4bbb-8bbb-bbbbbbbbbbbb" \
  -H "Content-Type: application/json" \
  -d '{}'
js
const res = await fetch('https://api.rekberpay.com/v1/jasabayar/aaaaaaa2-aaaa-4aaa-8aaa-aaaaaaaaaaaa/cancel', {
    method: 'POST',
    headers: {
        Authorization: `Bearer ${process.env.REKBERPAY_API_KEY}`,
        'Content-Type': 'application/json',
        'Idempotency-Key': 'bbbbbbb2-bbbb-4bbb-8bbb-bbbbbbbbbbbb',
    },
    body: JSON.stringify({}),
});
const data = await res.json();
python
import os

import requests

resp = requests.post(
    "https://api.rekberpay.com/v1/jasabayar/aaaaaaa2-aaaa-4aaa-8aaa-aaaaaaaaaaaa/cancel",
    headers={
        "Authorization": f"Bearer {os.environ['REKBERPAY_API_KEY']}",
        "Idempotency-Key": "bbbbbbb2-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
    },
    json={},
    timeout=30,
)
print(resp.status_code, resp.json())
php
<?php

$ch = curl_init('https://api.rekberpay.com/v1/jasabayar/aaaaaaa2-aaaa-4aaa-8aaa-aaaaaaaaaaaa/cancel');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('REKBERPAY_API_KEY'),
        'Content-Type: application/json',
        'Idempotency-Key: bbbbbbb2-bbbb-4bbb-8bbb-bbbbbbbbbbbb',
    ],
    CURLOPT_POSTFIELDS => json_encode(new stdClass()),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

200 OK

json
{
    "success": true
}

A paid order cannot be cancelled by the buyer:

409 Conflict

json
{
    "success": false,
    "error": {
        "code": "ALREADY_PAID",
        "message": "Pesanan sudah dibayar dan tidak bisa dibatalkan sendiri. Hubungi support."
    }
}

Next steps ​

Escrow, payment services and B2B deals for Indonesian businesses.