Modify your Snap look and feel & active payment methods in Snap Checkout via API
API for Snap Preferences. Modifiable features include active payment methods and look and feel customization.
Get Snap Preferences
Retrieve your current Snap Preference settings.
Endpoints: /snap/v3/merchant-preferences
HTTP Method: GET
Headers:
Content-Type: application/json
Accept: application/json
Production: https://app.midtrans.com/snap/v3/merchant-preferences
Sandbox: https://app.sandbox.midtrans.com/snap/v3/merchant-preferences
Key | Description |
---|---|
Authorization | Basic Base64Encode(merchantServerKey:) |
Response JSON Body Details
{
"merchant_id": "M007743",
"display_name": "DEMO STORE",
"finish_payment_return_url": "https://midtrans.com/finish",
"error_payment_return_url": "https://midtrans.com/error",
"locale": "en",
"other_va_processor": "bri_va",
"allow_retry": true,
"brand": {
"typography": "Poppins",
"header_color": "#ffffff",
"button_color": "#0256A7",
"input_border_radius": 10,
"button_border_radius": 10,
"hide_header": false
},
"payment_channels": [
{
"name": "credit_card",
"enabled": true
},
{
"name": "bca_va",
"enabled": true
}
]
}
{
"error_messages": [
"Access denied, please check server key"
]
}
Parameter | Type | Description |
---|---|---|
display_name | String | The name of the merchant or store that will be displayed on the checkout page |
finish_payment_return_url | String | The URL to which the user will be redirected after successfully completing a payment. |
error_payment_return_url | String | The URL for redirecting the user in case an error occurs during the payment process |
locale | String | Specifies the language and regional settings for the checkout page |
other_va_processor | String | Alternative virtual account processor that the merchant can use for transactions. Corresponds to the Other Bank/ATM Bank Processor menu in Snap Preference > System Settings. Options: permata_va, bni_va, bri_va, cimb_va |
allow_retry | Boolean | A boolean value that, when true, allows users to retry payments if their initial attempt fails |
brand.typography | String | Specifies the font family to be used on the checkout page. Options: Arial,Inter,Nunito,Open Sans,Playfair Display,Poppins,Questrial,Roboto,Source Sans Pro |
brand.header_color | String | Hex code of header color of the checkout page |
brand.button_color | String | Hex code of the color of buttons on the checkout page. |
brand.input_border_radius | String | These fields define the border radius (in pixels) for input fields, affecting their rounded corners. Max value is 10. |
brand.button_border_radius | String | These fields define the border radius (in pixels) for buttons, affecting their rounded corners. Max value is 10. |
brand.hide_header | String | A boolean value that, when set to false, shows the header on the checkout page. |
payment_channels | Array of Object | An array of objects, each representing a payment method available on the checkout page. Each object has the following properties: name: The identifier for the payment method (e.g., "credit_card", "bca_va", “gopay”). enabled: A boolean indicating whether the payment method is available for use. |
Update Snap Preference
Update your current Snap Preference settings.
Endpoints: /snap/v3/merchant-preferences
HTTP Method: PATCH
Headers:
Content-Type: application/json
Accept: application/json
Production: https://app.midtrans.com/snap/v3/merchant-preferences
Sandbox: https://app.sandbox.midtrans.com/snap/v3/merchant-preferences
Request Body
{
"display_name": "DEMO STORE",
"finish_payment_return_url": "https://midtrans.com/finish",
"error_payment_return_url": "https://midtrans.com/error",
"locale": "en",
"other_va_processor": "bri_va",
"allow_retry": true,
"brand": {
"typography": "Poppins",
"header_color": "#ffffff",
"button_color": "#0256A7",
"input_border_radius": 10,
"button_border_radius": 10,
"hide_header": false
},
"payment_channels": [
{
"name": "credit_card",
"enabled": true
},
{
"name": "bca_va",
"enabled": true
},
{
"name": "permata_va",
"enabled": true
},
{
"name": "other_va",
"enabled": true
},
{
"name": "echannel",
"enabled": true
},
{
"name": "indomaret",
"enabled": true
},
{
"name": "gopay",
"enabled": true
},
{
"name": "akulaku",
"enabled": true
},
{
"name": "alfamart",
"enabled": true
},
{
"name": "bri_va",
"enabled": true
},
{
"name": "bni_va",
"enabled": true
},
{
"name": "shopeepay",
"enabled": true
},
{
"name": "kredivo",
"enabled": true
},
{
"name": "other_qris",
"enabled": true
},
{
"name": "cimb_va",
"enabled": true
}
]
}
{
"error_messages": [
"Payment type credit_card is invalid for this merchant"
]
}
{
"error_messages": [
"Access denied, please check server key"
]
}
Parameter | Type | Description |
---|---|---|
display_name | String | The name of the merchant or store that will be displayed on the checkout page |
finish_payment_return_url | String | The URL to which the user will be redirected after successfully completing a payment. |
error_payment_return_url | String | The URL for redirecting the user in case an error occurs during the payment process |
locale | String | Specifies the language and regional settings for the checkout page |
other_va_processor | String | Alternative virtual account processor that the merchant can use for transactions. Corresponds to the Other Bank/ATM Bank Processor menu in Snap Preference > System Settings. Options: permata_va, bni_va, bri_va, cimb_va |
allow_retry | Boolean | A boolean value that, when true, allows users to retry payments if their initial attempt fails |
brand.typography | String | Specifies the font family to be used on the checkout page. Options: Arial,Inter,Nunito,Open Sans,Playfair Display,Poppins,Questrial,Roboto,Source Sans Pro |
brand.header_color | String | Hex code of header color of the checkout page |
brand.button_color | String | Hex code of the color of buttons on the checkout page. |
brand.input_border_radius | String | These fields define the border radius (in pixels) for input fields, affecting their rounded corners. Max value is 10. |
brand.button_border_radius | String | These fields define the border radius (in pixels) for buttons, affecting their rounded corners. Max value is 10. |
brand.hide_header | String | A boolean value that, when set to false, shows the header on the checkout page. |
payment_channels | Object | An array of objects, each representing a payment method available on the checkout page. Each object has the following properties: name: The identifier for the payment method (e.g., "credit_card", "bca_va", “gopay”). enabled: A boolean indicating whether the payment method is available for use. |