Skip to main content

Payments Charge API

The following endpoint charges the payment for all payment methods

/payments/charge

Basic Request Payload#

Fieldis required?Description
typemandatorystring type of payment, possible values - "VA", "EWALLET", "CARD", "RETAILSTORE"
requestmandatoryobject The payload object depending on the payment type

Virtual Account (VA) or Bank Transfer#

Example Request for VA#

# for VA
curl -u <YOUR_SECRET_KEY> \
-X POST https://api.durianpay.id/v1/payments/charge \
-H "content-type: application/json" \
-d '{
"type": "VA",
"request": {
"order_id": "ord_DAsdXCZXC122Zxdas",
"bank_code": "MANDIRI",
"name": "Name Appear in ATM",
"amount": "20000"
}
}'

Response for VA#

{
"type": "VA",
"response": {
"payment_id": "pay_XUwAkgIoru9966",
"order_id": "ord_Zwcd3aNiZR5608",
"account_number": "889089999561424",
"expiration_time": "2021-05-01T15:12:14.437734082Z",
"paid_amount": "1000.00",
"metadata": {}
}
}

E-Wallet#

Example Request for E-Wallet#

curl -u <YOUR_SECRET_KEY> \
-X POST https://api.durianpay.id/v1/payments/charge \
-H "content-type: application/json" \
-d '{
"type": "EWALLET",
"request": {
"order_id": "ord_DAsdXCZXC122Zxdas",
"amount": 20000,
"mobile": "08123456789",
"wallet_type": "DANA",
}
}'

Example Response for E-Wallet#

{
"type": "EWALLET",
"response": {
"payment_id": "pay_dAM0lqkVuk0074",
"order_id": "ord_TVZ6EYuBJ85268",
"mobile": "08123123123",
"status": "processing",
"expiration_time": "2021-04-02T15:08:57.800297779Z",
"checkout_url": "https://link.to/ewallet-checkout-url",
"paid_amount": "1000.00",
"metadata": {}
}
}

Retail Store#

Example Request for RETAILSTORE#

bank_code can be ALFAMART or INDOMARET.

# for VA
curl -u <YOUR_SECRET_KEY> \
-X POST https://api.durianpay.id/v1/payments/charge \
-H "content-type: application/json" \
-d '{
"type": "RETAILSTORE",
"request": {
"order_id": "ord_DAsdXCZXC122Zxdas",
"bank_code": "ALFAMART",
"name": "Name Appear in ATM",
"amount": "20000"
}
}'

Response for RETAILSTORE#

{
"type": "RETAILSTORE",
"response": {
"payment_id": "pay_XUwAkgIoru9966",
"order_id": "ord_Zwcd3aNiZR5608",
"account_number": "889089999561424",
"expiration_time": "2021-05-01T15:12:14.437734082Z",
"paid_amount": "1000.00",
"metadata": {}
}
}

ONLINE BANKING#

Example Request for JENIUSPAY#

# for JENIUSPAY
curl -u <YOUR_SECRET_KEY> \
-X POST https://api.durianpay.id/v1/payments/charge \
-H "content-type: application/json" \
-d '{
"type": "ONLINE_BANKING",
"request": {
"order_id": "ord_DAsdXCZXC122Zxdas",
"type": "JENIUSPAY",
"name": "Name Appear in ATM",
"amount": "20000.00",
"customer_info": {
"email": "jude_kasper@koss.in",
"given_name": "Jude Kasper",
"id": "cus_aGn5UD0m7F0994"
},
"mobile": "+6285722173217"
}
}'

Response for ONLINE_BANKING#

{
"type": "ONLINE_BANKING",
"response": {
"expiration_time": "2021-08-25T04:54:02.512309995Z",
"metadata": {},
"mobile": "+6285722173217",
"order_id": "ord_QKglAxhyXs7798",
"paid_amount": "925002.00",
"payment_id": "pay_LbsD6MZmbn0052",
"status": "processing",
"unique_id": "JENIUSPAY",
"web_url": "https://test-url.com"
}
}

Note: web_url is the redirect url which merchant should open to move on to the Jenius pay payment confirmation page.

Note: the minimum amount needed for transaction using JENIUSPAY is Rp. 10000 and you will be provided with a external redirect url to complete the payment. order_id, type, amount and mobile are mandatory fields.

BCA Aggregator#

Example Request for BCA Aggregator#

Merchant need to have neither BCA Bank account nor BCA approval - while merchant will be able to go live very quickly with Aggregator account.

Example Request for BCA Aggregator#

# for BCA VA
curl -u <YOUR_SECRET_KEY> \
-X POST https://api.durianpay.id/v1/payments/charge \
-H "content-type: application/json" \
-d '{
"type": "VA",
"request": {
"order_id": "ord_DAsdXCZXC122Zxdas",
"bank_code": "BCA",
"name": "Name Appear in ATM",
"amount": "20000.00",
"customer_info": {
"email": "jude_kasper@koss.in",
"given_name": "Jude Kasper",
"id": "cus_aGn5UD0m7F0994"
}
}
}'

Please note that the minimum amount needed for transaction using BCA Aggregator is Rp. 10.000 NOTE: order_id, type, amount, bank_code (BCA) are mandatory fields.

Response for VA Aggregator#

{
"type": "VA",
"response": {
"account_number": "1900800000003154",
"expiration_time": "2021-08-25T04:47:03.258854515Z",
"metadata": {},
"order_id": "ord_PDZ1PzH5Iv3914",
"paid_amount": "925002.00"
}
}

QRIS#

Please note that the maximum limit for QRIS is 5.000.000 IDR and minimum limit is 1.500 IDR

Example Request for QRIS#

curl -u <YOUR_SECRET_KEY> \
-X POST https://api.durianpay.id/v1/payments/charge \
-H "content-type: application/json" \
-d '{
"type": "QRIS",
"request": {
"amount": "80001.00",
"order_id": "ord_kkrMc7UDPt3948",
"name": "Name Appear in ATM",
"type": "QRIS"
}
}'

RESPONSE for QRIS#

{
"type": "QRIS",
"response": {
"payment_id": "pay_s2sSBlDSWv4167",
"order_id": "ord_QETgbs2UGL3100",
"status": "processing",
"expiration_time": "2021-09-15T15:44:37Z",
"creation_time": "2021-09-12T15:44:37ZZ",
"qr_string": "data:image/png;base64, long_qr_string",
"unique_id": "QRIS",
"metadata":{
"merchant_name": "Durianpay",
"merchant_id" : "sample_national_merchant_id"
},
"amount": "80001.00",
"qr_code": "00020101021226590013ID.CO.BNI.WWW011893600009150002286002092107061320303UME51470015ID.OR.GPNQR.WWW0217ID2107271315771960303UME520454995303360540880001.005802ID5905Ajesh6013JAKARTA PUSAT6105101406214011038291492856304E1F"
}
}