Skip to content
PGSwift Docs
Documentation/Bank Account

Bank Account

Merchants can use this API to create a checkout interface for processing transactions.

POST /api/create/bank

Request

NameTypeRequiredValidationDescription
merchant_transaction_idstringtrueMerchant-provided unique transaction identifier.
amountstringtrueNumeric, 1-12 digitsTransaction amount expressed as a numeric value.
currencystringtrueAllowed value: "IDR"Transaction currency (only Indonesian Rupiah is supported).
bank_codestringtrueAllowed value: see the table belowBank code used for the transaction
customer_namestringtrueBetween 5 - 25 characters. Allowed chars: a-z, A-Z, 0-9, - (dash), (space)Customer name linked to the transaction.
product_namestringtrueBetween 5 - 25 characters. Allowed chars: a-z, A-Z, 0-9, - (dash), (space)Product name linked to the transaction.
descriptionstringfalseOptional transaction information.
success_redirect_urlstringfalseURL to redirect the customer upon successful payment. Also supports mobile deep link URLs.

Supported bank_code values

bank_code Numeric code Bank
BCA 014 Bank Central Asia
MDR 008 Bank Mandiri
BNI 009 Bank Negara Indonesia
BRI 002 Bank Rakyat Indonesia

Each bank can be sent as its letter code or its numeric code; both resolve to the same channel, and responses and webhooks always return the letter code.

{
    "merchant_transaction_id": "ICZ10000001",
    "amount": "100000",
    "currency": "IDR",
    "bank_code": "BCA",
    "description": "Lorem Ipsum",
    "customer_name": "John Doe",
    "product_name": "Product Test",
    "success_redirect_url": "https://example.com/success"
}

Response

Name Description
status Request status indicator. true indicates success, false indicates failure.
message Result message for the request. Usually "success" when the request succeeds.
data.transaction_id System-generated unique transaction identifier.
data.account_number Generated bank account number for customer payment.
data.account_name Account holder name.
data.amount Total transfer amount required from the user.
data.channel Bank or payment channel used for the Bank Account Payment
data.redirect_url Redirect URL for users (when applicable). This field can be null if no redirect URL is available.
data.expired_at Payment expiry datetime, server time (UTC+7), no offset, format YYYY-MM-DD HH:MM:SS (e.g. "2025-02-26 19:00:00"). null if not applicable.
data.expired_at_iso Same expiry as expired_at, as ISO 8601 with offset (e.g. "2025-02-26T19:00:00+07:00"). Same format on every channel. null when expired_at is null.
data.payment_channel Normalized payment channel, one format for every payment type and provider: a value such as QRIS, VA_BRI, BANK_BCA, or EWALLET_DANA (payment type prefix + code from the Appendix). null when the channel cannot be determined. Prefer this over channel.
data.success_redirect_url URL to redirect the customer upon successful payment. Also supports mobile deep link URLs.
{
    "status": true,
    "message": "success",
    "data": {
        "transaction_id": "08a30e1b-2ef2-435b-b1fb-9885eb70545e",
        "payment_channel": "BANK_BCA",
        "account_number": "1234567890",
        "account_name": "John Doe",
        "amount": 100089,
        "channel": "BANK_BCA",
        "redirect_url": "{host}/checkout/08a30e1b-2ef2-435b-b1fb-9885eb70545e/bank/BCA",
        "success_redirect_url": "https://example.com/success",
        "expired_at": "2025-02-26 19:00:00",
        "expired_at_iso": "2025-02-26T19:00:00+07:00"
    }
}

Webhook