Bank Transfer Payments Guide (ID)

Customer Profile API

📗

Learn how to use the Payment API to enable Indonesia bank transfer deposits from your user.

Overview

Each connected user on your platform will be assigned a unique virtual account number for bank transfer payments. We check the sender's name against the user's name to ensure the payment is being made to the correct virtual account. This creates a secure and seamless experience for your users and makes it easy for your team to reconcile these transactions.

Learn more about virtual accounts →

680

UI example of IDR bank transfer instructions

Payment TypeFromTo
Bank Transfer PaymentUser's bank accountBusiness Account
curl --location --request POST 'https://sandbox.xfers.io/api/v3/payment_methods/virtual_bank_accounts' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-XFERS-APP-API-KEY: KVBZxX2YVOxlSjbxH0j6Wpc408FJKv88zXHU2aewdyO' \
--form 'data[attributes][referenceId]="hello_world"' \
--form 'data[attributes][bankShortCode]="SAHABAT_SAMPOERNA"' \
--form 'data[relationships][customerProfile][data][id]="customer_profile_08d5ffe5-8a02-4dc2-aabb-9057b8ab3c65"'
curl --location --request POST 'https://www.xfers.io/api/v3/payment_methods/virtual_bank_accounts' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-XFERS-APP-API-KEY: {{APP_API_KEY}}' \
--form 'data[attributes][referenceId]="{{MERCHANT_REF}}"' \
--form 'data[attributes][bankShortCode]="SAHABAT SAMPOERNA"' \
--form 'data[relationships][customerProfile][data][id]="{{CP_ID}}"'
  • To provide payee details for your user, initiate a request to create a virtual bank account to display bank transfer instructions.
  • This enables your user to add a payee in their bank app using the fields: bank name, recipient name and bank account number.

Step 2 — Add callback URL

On a successful completion of a deposit transaction, StraitsX will send a callback notification to you via a callback URL indicated on the StraitsX Business Dashboard.

3510

Adding a callback URL in sandbox mode

📘

Add the callback URL on the dashboard to receive callbacks when the transaction has been completed.

curl --location --request PUT 'https://sandbox.xfers.io/api/v3/sandbox/customer_profile/customer_profile_08d5ffe5-8a02-4dc2-aabb-9057b8ab3c65/bank_accounts/?verification_status=verified' \
--header 'X-XFERS-APP-API-KEY: KVBZxX2YVOxlSjbxH0j6Wpc408FJKv88zXHU2aewdyO'

Step 3b — Make a bank transfer (Production)

To make a bank transfer payment, your users can deposit funds via their bank app.

Step 4 — Confirm deposit has been received

Securing your callback

When the payment is received, we will send a callback to the URL indicated on the StraitsX Business Dashboard. The callback can be decoded using the HMAC-SHA256 algorithm to display the Request Body.

Callback Response
{
  "data": {
    "id": "contract_5333a88ef30147f2835c0f6202abeb26",
    "type": "payment",
    "attributes": {
      "referenceId": "external_id_61a4cf0be8",
      "amount": "151515.0",
      "fees": 3500.0,
      "status": "completed",
      "description": null,
      "createdAt": "2022-07-28T09:41:44.000Z",
      "paymentMethod": {
        "id": "va_05224da3d7871455afe882a78b67ad6e",
        "type": "virtual_bank_account",
        "referenceId": "va_test_sandbox",
        "instructions": {
          "bankShortCode": "SAHABAT_SAMPOERNA",
          "accountNo": "2020130000000528",
          "displayName": "IKN-Kenneth Ng"
        },
        "senderName": null,
        "failureReason": ""
      }
    }
  }
}
Parameter NameDescriptionExample Value
idContract IDcontract_5e6ea44db44e4979be68504d1f600ad7
typeType of transactionpayment
referenceIdReference IDexternal_id_61a4cf0be8
amountAmount transferred151515.0
feesFees incurred3500.0
statusTransaction Status: completed/pending/cancelledcompleted
descriptionTransaction descriptionnull
createdAtTime of creation2022-07-28T09:41:44.000Z
idVirtual Account IDva_05224da3d7871455afe882a78b67ad6e
typePayment methodvirtual_bank_account
referenceIdUnique ID indicated in Create a virtual bank account APIva_test_sandbox
bankShortCodeBank abbreviationSAHABAT_SAMPOERNA
accountNoBank account no.2020130000000528
displayNameName of senderIKN-Kenneth Ng

👍

You may use the merchant_ref parameter to match with the incoming bank transfers from your users to check if the amount received was correct.

Summary

2184

Click to enlarge

Next step — Sending a payout

Learn more about how to send a payout to your user's bank account.


Try it out!

Getting started with StraitsX APIs is easy. Our business development and integration teams will be with you every step of the way. If you have any questions or would like to connect with our team, please do so via Support!