{
"transaction_details": {
"order_id": "ORDER-101",
"gross_amount": 10000
}
}
{
"transaction_details": {
"order_id": "ORDER-101",
"gross_amount": 10000
},
"item_details": [{
"id": "ITEM1",
"price": 10000,
"quantity": 1,
"name": "Midtrans Bear",
"brand": "Midtrans",
"category": "Toys",
"merchant_name": "Midtrans",
"url": "http://toko/toko1?item=abc"
}],
"customer_details": {
"first_name": "TEST",
"last_name": "MIDTRANSER",
"email": "[email protected]",
"phone": "+628123456",
"billing_address": {
"first_name": "TEST",
"last_name": "MIDTRANSER",
"email": "[email protected]",
"phone": "081 2233 44-55",
"address": "Sudirman",
"city": "Jakarta",
"postal_code": "12190",
"country_code": "IDN"
},
"shipping_address": {
"first_name": "TEST",
"last_name": "MIDTRANSER",
"email": "[email protected]",
"phone": "0 8128-75 7-9338",
"address": "Sudirman",
"city": "Jakarta",
"postal_code": "12190",
"country_code": "IDN"
}
},
"enabled_payments": ["credit_card", "cimb_clicks",
"bca_klikbca", "bca_klikpay", "bri_epay", "echannel", "permata_va",
"bca_va", "bni_va", "bri_va","cimb_va", "other_va", "gopay", "indomaret",
"danamon_online", "akulaku", "shopeepay", "kredivo", "uob_ezpay"],
"credit_card": {
"secure": true,
"channel": "migs",
"bank": "bca",
"installment": {
"required": false,
"terms": {
"bni": [3, 6, 12],
"mandiri": [3, 6, 12],
"cimb": [3],
"bca": [3, 6, 12],
"offline": [6, 12]
}
},
"whitelist_bins": [
"48111111",
"41111111"
],
"dynamic_descriptor": {
"merchant_name" : "Fuji Apple Inc",
"city_name": "Jakarta",
"country_code": "ID"
}
},
"bca_va": {
"va_number": "12345678911",
"sub_company_code": "00000",
"free_text": {
"inquiry": [
{
"en": "text in English",
"id": "text in Bahasa Indonesia"
}
],
"payment": [
{
"en": "text in English",
"id": "text in Bahasa Indonesia"
}
]
}
},
"bni_va": {
"va_number": "12345678"
},
"bri_va": {
"va_number": "1234567891234"
},
"cimb_va": {
"va_number": "1234567891234567"
},
"permata_va": {
"va_number": "1234567890",
"recipient_name": "SUDARSONO"
},
"shopeepay": {
"callback_url": "http://shopeepay.com"
},
"gopay": {
"enable_callback": true,
"callback_url": "http://gopay.com"
},
"callbacks": {
"finish": "https://demo.midtrans.com"
},
"uob_ezpay": {
"callback_url": "http://uobezpay.com"
},
"expiry": {
"start_time": "2018-12-13 18:11:08 +0700",
"unit": "minutes",
"duration": 1
},
"page_expiry": {
"duration": 3,
"unit": "hours"
}
"custom_field1": "custom field 1 content",
"custom_field2": "custom field 2 content",
"custom_field3": "custom field 3 content"
}
Parameter | Description |
---|---|
transaction_details Transaction Details (required) | Specific information regarding the transaction |
item_details Array of Item Details (optional) | Shopping item details will be paid by customer |
customer_details Customer Details (optional) | Specific information regarding the customer |
enabled_payments Array (optional) | List of payment types that should be enabled. If enabled_payments: field is not passed, all active payment types are included. Credit Cards: credit_card . Banks: cimb_clicks , bca_klikbca , bca_klikpay , bri_epay , echannel (mandiri bill payment), permata_va , bca_va , bni_va , bri_va , cimb_va , danamon_online , and uob_ezpay . E-wallets: gopay , and shopeepay . Merchants: alfamart , and indomaret .Paylaters: akulaku , and kredivo . Aliasing refers to a list of payment types. Passing an alias is the equivalent of passing all the the payment types it refers to. Supported aliases: bank_transfer => e.g. permata_va , bca_va , bni_va cstore => e.g. alfamart , indomaret .If you want to use other_va , either permata_va or bni_va or bri_va because Midtrans handles other bank transfer as either Permata or BNI VA or BRI VA. |
credit_card CreditCard (optional) | Credit card payment options |
bca_va BCA Virtual Account (optional) | BCA Virtual Account payment options |
permata_va Permata Virtual Account (optional) | Permata Virtual Account payment options |
bni_va BNI Virtual Account (optional) | BNI Virtual Account payment options |
cimb_va CIMB Virtual Account (optional) | CIMB Virtual Account payment options |
bri_va BRI Virtual Account (optional) | BRI Virtual Account payment options |
other_va Other Banks Virtual Account (optional) | Other Banks payment options |
gopay GoPay (optional) | GoPay payment options |
shopeepay ShopeePay (optional) | ShopeePay payment options |
uob_ezpay UOB EZ Pay (optional) | UOB EZ Pay payment options |
expiry Expiry (optional) | Custom transaction lifetime |
callbacks Callbacks (optional) | Redirect URL after transaction is successfully paid (Overriden by JS callback). Can also be set via Snap Settings menu in your dashboard. |
page_expiry Page Expiry (optional) | Customize Snap's page expiry |
custom_field1 String(255) (optional) | Custom field 1 for custom parameter from merchant |
custom_field2 String(255) (optional) | Custom field 2 for custom parameter from merchant |
custom_field3 String(255) (optional) | Custom field 3 for custom parameter from merchant |
Specifying payment methods via API using
enabled_payments
Other than from Snap Preference settings in Dashboard, you can also specify which payment method to show in Snap via API using
enabled_payments
. This is useful if you want to maintain your own payment list; you can then bind each payment method list in your checkout page with individual Snap checkout page containing the specified payment method. See Supported Payment Channels page for more details on the param value for each payment channel.