UnitPay
  • Products
  • Pricing
  • Docs
  • Help
  • About
  • Security
  • Legal
|
Demo Get a quote

Developer documentation

Get payout information

Last updated: 08 May 2026

Contents

    The getPayout method returns the current state of a payout you previously created with createPayout: status, settled amount, fee, currency, and timestamps. Use it to reconcile when callbacks were missed, to display payout state to operators, or to retry decisions after a network blip.

    Endpoint

    Send the request to https://api.unitpay.net/api. POST over TLS is required — GET is rejected to keep the secret key out of URL logs.

    Required parameters

    ParameterTypeDescription
    methodstringAlways getPayout.
    params[payoutId]integerUnitPay's payout identifier returned by createPayout.
    params[secretKey]stringProject secret key. Send only via TLS in the POST body.

    Optional parameters

    ParameterTypeDescription
    params[merchantPayoutId]stringLook up by your idempotency key instead of payoutId. Useful when your system stored the merchant key but lost the UnitPay ID.

    Either params[payoutId] or params[merchantPayoutId] must be present — not both.

    Example request

    POST https://api.unitpay.net/api
    Content-Type: application/x-www-form-urlencoded
    
    method=getPayout
    &params[payoutId]=9871234
    &params[secretKey]=<your-project-secret-key>

    Successful response

    {
      "result": {
        "payoutId": 9871234,
        "merchantPayoutId": "settlement-9821",
        "status": "success",
        "sum": 1500000.00,
        "fee": 5500.00,
        "currency": "IDR",
        "paymentType": "bank_idr",
        "account": "1234567890",
        "recipientBankCode": "014",
        "purpose": "Marketplace settlement order #9821",
        "createdDate": "2026-05-08T14:22:11+07:00",
        "completedDate": "2026-05-08T14:23:47+07:00"
      }
    }
    FieldDescription
    statusOne of new, pending_review, in_progress, success, or error. See the table below.
    sumPayout amount, identical to the params[sum] originally submitted.
    feeDestination-rail fee debited from your balance, in the same currency as sum.
    accountDestination identifier, masked according to the rail's policy (cards return only the last 4 digits).
    completedDateISO 8601 timestamp of final state. Absent until status is success or error.

    Status values

    StatusMeaningTerminal?
    newAccepted by UnitPay, not yet submitted to the destination rail. Typically observed for under a minute.No
    pending_reviewAwaiting manual operator approval per project policy. Operators act in the merchant cabinet.No
    in_progressSubmitted to the destination rail; awaiting confirmation. Card and SWIFT payouts can sit here for hours during banking-hour cutover.No
    successSettled to the beneficiary. Funds have left UnitPay's correspondent account.Yes
    errorRejected by the destination rail (closed account, insufficient KYC at the bank, blocked card). Funds are returned to your merchant balance net of any non-refundable rail fees.Yes

    Error response

    {
      "error": {
        "message": "Payout not found.",
        "code": -32001
      }
    }
    codeMeaning
    -32000Invalid secret key. Rotate from Settings → Project → Secret key.
    -32001Payout not found. Verify the ID belongs to a payout on the project that owns this secret key.
    -32006Both payoutId and merchantPayoutId were sent, or neither was sent.

    Polling and event-driven retrieval

    Prefer the callback handler — the same handler that receives payment lifecycle events also receives payoutStatus events for state changes (new → in_progress → success or → error). Reuse signature verification.

    If you must poll, follow these limits:

    • No more than once every 30 seconds per payout while status is non-terminal.
    • Stop polling as soon as status is success or error; the result will not change.
    • Per-project rate limit applies to all getPayout calls combined — 600 requests/min, beyond which UnitPay returns HTTP 429.

    Test mode

    Test-mode payouts use the project's test secret key and complete to success within seconds — useful for end-to-end validation of your reconciliation logic before going live.

    Next steps

    • Create a payout — the upstream method that produces the payoutId you query here.
    • Callback handler — receive payout state changes asynchronously instead of polling.
    • Look up card information by BIN — resolve a destination card's brand, type, country, and issuing bank.

    Metode getPayout mengembalikan status terkini pencairan yang sebelumnya Anda buat dengan createPayout: status, jumlah yang diselesaikan, biaya, mata uang, dan cap waktu. Gunakan untuk merekonsiliasi ketika callback terlewat, untuk menampilkan status pencairan kepada operator, atau untuk keputusan retry setelah gangguan jaringan.

    Endpoint

    Kirim permintaan ke https://api.unitpay.net/api. POST melalui TLS wajib digunakan — GET ditolak agar kunci rahasia tidak masuk ke log URL.

    Parameter wajib

    ParameterTipeDeskripsi
    methodstringSelalu getPayout.
    params[payoutId]integerIdentifikasi pencairan dari UnitPay yang dikembalikan oleh createPayout.
    params[secretKey]stringKunci rahasia proyek. Kirim hanya melalui TLS dalam body POST.

    Parameter opsional

    ParameterTipeDeskripsi
    params[merchantPayoutId]stringCari berdasarkan kunci idempotensi Anda alih-alih payoutId. Berguna saat sistem Anda menyimpan kunci merchant tetapi kehilangan ID UnitPay.

    Salah satu dari params[payoutId] atau params[merchantPayoutId] harus ada — bukan keduanya.

    Contoh permintaan

    POST https://api.unitpay.net/api
    Content-Type: application/x-www-form-urlencoded
    
    method=getPayout
    &params[payoutId]=9871234
    &params[secretKey]=<your-project-secret-key>

    Respons sukses

    {
      "result": {
        "payoutId": 9871234,
        "merchantPayoutId": "settlement-9821",
        "status": "success",
        "sum": 1500000.00,
        "fee": 5500.00,
        "currency": "IDR",
        "paymentType": "bank_idr",
        "account": "1234567890",
        "recipientBankCode": "014",
        "purpose": "Penyelesaian marketplace pesanan #9821",
        "createdDate": "2026-05-08T14:22:11+07:00",
        "completedDate": "2026-05-08T14:23:47+07:00"
      }
    }
    FieldDeskripsi
    statusSalah satu dari new, pending_review, in_progress, success, atau error. Lihat tabel di bawah.
    sumJumlah pencairan, identik dengan params[sum] yang awalnya dikirim.
    feeBiaya saluran tujuan yang dipotong dari saldo Anda, dalam mata uang yang sama dengan sum.
    accountIdentifikasi tujuan, disamarkan menurut kebijakan saluran (kartu hanya mengembalikan 4 digit terakhir).
    completedDateCap waktu ISO 8601 status final. Tidak ada hingga status menjadi success atau error.

    Nilai status

    StatusArtiFinal?
    newDiterima oleh UnitPay, belum dikirim ke saluran tujuan. Biasanya teramati kurang dari satu menit.Tidak
    pending_reviewMenunggu persetujuan operator manual sesuai kebijakan proyek. Operator bertindak di kabinet merchant.Tidak
    in_progressDikirim ke saluran tujuan; menunggu konfirmasi. Pencairan kartu dan SWIFT dapat berada di sini berjam-jam selama jam non-bank.Tidak
    successDiselesaikan ke penerima. Dana telah meninggalkan rekening koresponden UnitPay.Ya
    errorDitolak oleh saluran tujuan (rekening tertutup, KYC bank tidak cukup, kartu diblokir). Dana dikembalikan ke saldo merchant Anda setelah dikurangi biaya saluran yang tidak dapat dikembalikan.Ya

    Respons error

    {
      "error": {
        "message": "Pencairan tidak ditemukan.",
        "code": -32001
      }
    }
    codeArti
    -32000Kunci rahasia tidak valid. Lakukan rotasi dari Pengaturan → Proyek → Kunci rahasia.
    -32001Pencairan tidak ditemukan. Pastikan ID milik pencairan pada proyek yang memiliki kunci rahasia tersebut.
    -32006Baik payoutId dan merchantPayoutId dikirim bersamaan, atau tidak ada satu pun yang dikirim.

    Polling dan pengambilan berbasis event

    Lebih baik gunakan handler callback — handler yang sama yang menerima event siklus pembayaran juga menerima event payoutStatus untuk perubahan status (new → in_progress → success atau → error). Gunakan kembali verifikasi tanda tangan.

    Jika Anda harus melakukan polling, ikuti batasan ini:

    • Tidak lebih dari sekali setiap 30 detik per pencairan selama status belum final.
    • Hentikan polling segera setelah status menjadi success atau error; hasilnya tidak akan berubah.
    • Batas tarif per-proyek berlaku untuk gabungan semua panggilan getPayout — 600 permintaan/menit, di luar itu UnitPay mengembalikan HTTP 429.

    Mode uji

    Pencairan mode uji menggunakan kunci rahasia uji proyek dan mencapai success dalam hitungan detik — berguna untuk validasi end-to-end logika rekonsiliasi Anda sebelum aktif.

    Langkah selanjutnya

    • Membuat pencairan dana — metode hulu yang menghasilkan payoutId yang Anda kueri di sini.
    • Penanganan callback — terima perubahan status pencairan secara asinkron alih-alih melakukan polling.
    • Cari informasi kartu berdasarkan BIN — resolusi brand, tipe, negara, dan bank penerbit kartu tujuan.

    Related documentation

    • Create a payout Membuat pencairan dana
    • Look up card information by BIN Cari informasi kartu berdasarkan BIN
    • Callback handler Penanganan callback

    Company

    • About
    • Security
    • Contact

    Products

    • Online Payments
    • Payouts (USDT)
    • Pricing
    • Docs
    • Help

    Support

    • support@unitpay.net
    • sales@unitpay.net
    • compliance@unitpay.net
    • legal@unitpay.net

    WhatsApp

    +6285121084571

    Mon-Fri 09:00-18:00 WIB

    Legal

    • Privacy Policy
    • Cookie Policy
    • Terms of Service
    • Acceptable Use Policy
    • AML/CFT Statement
    • Legal Center

    Tidak puas? / Not satisfied?

    • Hubungi OJK / Contact OJK: 157 (24 jam) / (24h)
    • LAPS SJK: https://lapssjk.id
    • Email keluhan / Complaint email: complaints@unitpay.net
    • Didit
    • Didit
    • Amazon Web Services (Asia Pacific - Jakarta)
    • Iubenda
    |
    Sitemap

    (c) 2026 PT UNIT GLOBAL SYSTEM. All rights reserved. NPWP: 22.709.627.8-021.000 · NIB: 2511240128903