Update Checkout Page Preference API

This API can be used to modify and configure of merchant's checkout page, such as merchant's display name, typography, and payment channel settings.

Endpoints: /api/v1/checkout/merchant-preferences

HTTP Method: PATCH

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
        }
    ]
}
ParameterTypeAttributeDescription
display_nameStringOptionalThe name of the merchant or store that will be displayed on the checkout page
finish_payment_return_urlStringOptionalThe URL to which the user will be redirected after successfully completing a payment.
error_payment_return_urlStringOptionalThe URL for redirecting the user in case an error occurs during the payment process
localeStringOptionalSpecifies the language and regional settings for the checkout page
other_va_processorStringOptionalAlternative 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_retryBooleanOptionalA boolean value that, when true, allows users to retry payments if their initial attempt fails
brand.typographyStringOptionalSpecifies 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_colorStringOptionalHex code of header color of the checkout page
brand.button_colorStringOptionalHex code of the color of buttons on the checkout page.
brand.input_border_radiusStringOptionalThese fields define the border radius (in pixels) for input fields, affecting their rounded corners. Max value is 10.
brand.button_border_radiusStringOptionalThese fields define the border radius (in pixels) for buttons, affecting their rounded corners. Max value is 10.
brand.hide_headerStringOptionalA boolean value that, when set to false, shows the header on the checkout page.
payment_channelsObjectOptionalAn 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.

Response Body

Success

{
    "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
        }
    ]
}

Failed

{
    "error_messages": [
        "Payment type credit_card is invalid for this merchant"
    ]
}
{
    "error_messages": [
        "Access denied, please check server key"
    ]
}
FieldTypeDescription
error_messagesArray of StringError messages