Payment by credit or debit card with VISA, MasterCard, JCB, Union Pay or Amex logo. We support both local and international banks. Note that what features available for you will depends on your bank acquirer's settings.
Steps to integrate :
- Send the charge API request to Midtrans.
- Redirect your customer back to your page by configuring Finish URL in Midtrans's Dashboard > Snap Preferences or via [API Request] (/docs/snap-advanced-feature#custom-finish-url).
- Handle notifications.
Note: Please also refer to the Two Clicks, One Click, and Pre-Authorization section
Sample JSON Request Body
{
"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"
}],
"customer_details": {
"first_name": "TEST",
"last_name": "MIDTRANSER",
"email": "[email protected]",
"phone": "+628123456"
},
"enabled_payments": ["credit_card"],
"credit_card": {
"save_card": true,
"secure": true,
"channel": "migs",
"bank": "maybank",
"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",
"bni"
],
"dynamic_descriptor": {
"merchant_name" : "Fuji Apple Inc",
"city_name": "Jakarta",
"country_code": "ID"
}
}
}| Parameter | Description |
|---|---|
| transaction_details Transaction Details Object (required) | Unique transaction ID |
| item_details Item Details Object (optional) | Shopping item details will be paid by customer |
| customer_details Customer Details Object (optional) | Details of the customer |
| enabled_payments Array (optional) | Set what payment method to show in Snap's payment list. Value: credit_card |
| credit_card CreditCard (optional) | Credit card payment options |
Note: For a full list of request body parameters please refer to the Request Body (JSON Parameter) section.
Card number autofill pop-up on Google Chrome iOSWhen customer access card payment flow via Google Chrome on iOS device, a pop-up will appear, informing that iOS is not allowing card number autofill to protect user’s privacy.
Nevertheless, this is a form of risk prevention mechanism coming from the iOS device itself. To continue with the payment, customer can tap on the “OK” button and complete the remaining payment steps as usual.