This API can be used to retrieve the detail modification and configuration of merchant's checkout page, such as merchant's display name, typography, and payment channel settings.
Endpoints: /api/v1/checkout/merchant-preferences
HTTP Method: GET
Response Body
Success
{
"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
}
]
}| Field | 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. |
Failed
{
"error_messages": [
"Access denied, please check server key"
]
}| Field | Type | Description |
|---|---|---|
| error_messages | Array of String | Error messages |