Buy Now Pay Later payment method by Kredivo. Upon making purchase, customer will be redirected to the Kredivo website to complete payment.
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.
- Handle notifications.
By default, Kredivo's transaction expiry is 24 hours (min 20s, max 180 days).
Sample JSON Request Body
{
"transaction_details": {
"order_id": "ORDER-101",
"gross_amount": 10000
},
"item_details": [{
"id": "ITEM1",
"price": 10000,
"quantity": 1,
"name": "Midtrans Bear",
"category": "Toys",
"url": "http://toko/toko1?item=abc"
}],
"customer_details": {
"first_name": "TEST",
"last_name": "MIDTRANSER",
"email": "[email protected]",
"phone": "+628123456",
"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": ["kredivo"],
"seller_details": [
{
"id": "sellerId-01",
"name": "John Seller",
"email": "[email protected]",
"url": "https://tokojohn.com",
"address": {
"first_name": "John",
"last_name": "Seller",
"phone": "081234567890",
"address": "Kemanggisan",
"city": "Jakarta",
"postal_code": "12190",
"country_code": "IDN"
}
}
]
}
Parameter | Description |
---|---|
transaction_details Transaction Details Object (required) | Unique transaction ID |
item_details Item Details Object (required) | Shopping item details will be paid by customer. All field in the given sample are (required) |
customer_details Customer Details Object (required) | Details of the customer. All field in the given sample are (required) |
enabled_payments Array (optional) | Set what payment method to show in Snap's payment list. Value: kredivo |
seller_details Array (optional) | Details of the seller(s) where the customer purchased from. All field in the given sample are (required). Note: This field is only mandatory for marketplace merchant. |
customer_details
anditem_details
are required for Kredivo's Fraud Detection System (it's encouraged for merchant to pass real customer and item details value). Ifcustomer_details
anditem_details
value are empty, Snap will then hide Kredivo in Snap's payment list page as transaction will fail. For a full list of request body parameters please refer to the Request Body (JSON Parameter) section.