Endpoint
1687ms
Content-Type: application/json X-GCS-RequestId: req_0ef0b8f0 X-GCS-ClientMetaInfo: v2.0.0 Cache-Control: no-cache Strict-Transport-Security: max-age=31536000
POST /v1/mc_637521/hostedcheckouts Host: api.example.com Content-Type: application/json Authorization: GCS v1HMAC:key:sig { "order": { … }, "customer": { … } }
1687ms
Content-Type: application/json X-GCS-RequestId: req_0ef0b8f0 X-GCS-ClientMetaInfo: v2.0.0 Cache-Control: no-cache Strict-Transport-Security: max-age=31536000
POST /v1/mc_637521/hostedcheckouts Host: api.example.com Content-Type: application/json Authorization: GCS v1HMAC:key:sig
1 CreateHostedCheckoutRequest req = 2 new CreateHostedCheckoutRequest() 3 .withHostedCheckoutSpecificInput( 4 new HostedCheckoutSpecificInput().withLocale("en_GB")) 5 .withOrder(new Order() 6 .withAmountOfMoney(new AmountOfMoney() 7 .withAmount(1000 L).withCurrencyCode("EUR"))) 8 .withCustomer(new Customer() 9 .withMerchantCustomerId("mc_637521").withLocale("en_GB")) 10 .withShipping(new Shipping() 11 .withAddressIndicator("same-as-billing"));
Sun, May 24, 2026, 1:08:23 AM GMT+2
Create Hosted Checkout
Basic
Sat, May 23, 2026, 11:34:41 PM GMT+2
Create Hosted Checkout
Basic
Sat, May 23, 2026, 7:46:13 PM GMT+2
Create Hosted Checkout
Basic
Sat, May 23, 2026, 7:20:08 PM GMT+2
Create Hosted Checkout
Basic
Sat, May 23, 2026, 12:19:37 PM GMT+2
Create Hosted Checkout
Basic
No imports yet
Start importing files to show up in the imported files section
We will start by creating a new account from scratch.
{
"subsequentCardPaymentMethodSpecificInput": {
"authorizationMode": "SALE",
"transactionChannel": "ECOMMERCE",
"subsequentType": "DelayedCharge"
},
"order": {
"amountOfMoney": {
"amount": 3000,
"currencyCode": "EUR"
}
}
}
You can start a hostedCheckout flow by posting the relevant details to the endpoint. We will then return you all the details you need to redirect the consumer to us, retrieve the status and recognize the consumer when he/she returns to your website. The hosted checkout allows the use of three distinct components:
Presenting a (filtered) list of payment products that the consumer can choose from;
Handling of the actual payment, potentially involving data capture, redirection and/or the displaying of payment instructions;
Presenting a confirmation/failure page after the payment.
Step 1 and 3 from the above list are optional. When no or partial filtering is provided, the first page the consumer will see is a payment product selection page. However, the hosted checkout will start as if a payment product had been selected if that specific payment product is the only entry in the request's restriction filters.
By providing payment product ids and groups in the hostedCheckoutSpecificInput's paymentProductFilters object, you can reduce the list of available payment products by either excluding or restricting to certain products. Note that at least one viable payment product must be left after filtering and that exclusion is leading, meaning that restricting and excluding the same product will lead to exclusion.
By setting the tokensOnly boolean to true, as part of the paymentProductFilters object, the consumer may only complete the payment using one of the accounts on file provided in the tokens property of hostedCheckoutSpecificInput.
By setting the showResultPage boolean to false, as part of the hostedCheckoutSpecificInput, the system will skip the confirmation/failure page after the consumer has completed the payment. This setting is true by default and the results page will be presented to the user.
In case the payment product selection page needs to be skipped the hostedCheckout call needs to contain one of the following objects in which all payment products have been categorized. These will also be used if the consumer selects a related payment product.
Card payments - cardPaymentMethodSpecificInput
All credit and debit card products fall into this category if they allow for direct submission of card data without a redirect to a third party to capture the card details.
Redirect payments - redirectPaymentMethodSpecificInput
Mobile payments - mobilePaymentMethodSpecificInput
All payment products that involve a redirect to a third party to complete the payment directly online, like PayPal.
A generic transaction can be submitted using the order and the fraudFields objects.
1 CreateHostedCheckoutRequest req = 2 new CreateHostedCheckoutRequest() 3 .withHostedCheckoutSpecificInput( 4 new HostedCheckoutSpecificInput().withLocale("en_GB")) 5 .withOrder(new Order() 6 .withAmountOfMoney(new AmountOfMoney() 7 .withAmount(1000 L).withCurrencyCode("EUR"))) 8 .withCustomer(new Customer() 9 .withMerchantCustomerId("mc_637521").withLocale("en_GB")) 10 .withShipping(new Shipping() 11 .withAddressIndicator("same-as-billing"));
Sun, May 24, 2026, 1:08:23 AM GMT+2
Create Hosted Checkout
Basic
Sat, May 23, 2026, 11:34:41 PM GMT+2
Create Hosted Checkout
Basic
Sat, May 23, 2026, 7:46:13 PM GMT+2
Create Hosted Checkout
Basic
Sat, May 23, 2026, 7:20:08 PM GMT+2
Create Hosted Checkout
Basic
Sat, May 23, 2026, 12:19:37 PM GMT+2
Create Hosted Checkout
Basic
No imports yet
Start importing files to show up in the imported files section
We will start by creating a new account from scratch.
{
"subsequentCardPaymentMethodSpecificInput": {
"authorizationMode": "SALE",
"transactionChannel": "ECOMMERCE",
"subsequentType": "DelayedCharge"
},
"order": {
"amountOfMoney": {
"amount": 3000,
"currencyCode": "EUR"
}
}
}
You can start a hostedCheckout flow by posting the relevant details to the endpoint. We will then return you all the details you need to redirect the consumer to us, retrieve the status and recognize the consumer when he/she returns to your website. The hosted checkout allows the use of three distinct components:
Presenting a (filtered) list of payment products that the consumer can choose from;
Handling of the actual payment, potentially involving data capture, redirection and/or the displaying of payment instructions;
Presenting a confirmation/failure page after the payment.
Step 1 and 3 from the above list are optional. When no or partial filtering is provided, the first page the consumer will see is a payment product selection page. However, the hosted checkout will start as if a payment product had been selected if that specific payment product is the only entry in the request's restriction filters.
By providing payment product ids and groups in the hostedCheckoutSpecificInput's paymentProductFilters object, you can reduce the list of available payment products by either excluding or restricting to certain products. Note that at least one viable payment product must be left after filtering and that exclusion is leading, meaning that restricting and excluding the same product will lead to exclusion.
By setting the tokensOnly boolean to true, as part of the paymentProductFilters object, the consumer may only complete the payment using one of the accounts on file provided in the tokens property of hostedCheckoutSpecificInput.
By setting the showResultPage boolean to false, as part of the hostedCheckoutSpecificInput, the system will skip the confirmation/failure page after the consumer has completed the payment. This setting is true by default and the results page will be presented to the user.
In case the payment product selection page needs to be skipped the hostedCheckout call needs to contain one of the following objects in which all payment products have been categorized. These will also be used if the consumer selects a related payment product.
Card payments - cardPaymentMethodSpecificInput
All credit and debit card products fall into this category if they allow for direct submission of card data without a redirect to a third party to capture the card details.
Redirect payments - redirectPaymentMethodSpecificInput
Mobile payments - mobilePaymentMethodSpecificInput
All payment products that involve a redirect to a third party to complete the payment directly online, like PayPal.
A generic transaction can be submitted using the order and the fraudFields objects.
Code snippets now update as you edit the request body!
Code snippets now update as you edit the request body!
The code snippet panel now reacts to your request body in real time — edit the body and the snippet for the selected language regenerates automatically.
The code snippet panel now reacts to your request body in real time — edit the body and the snippet for the selected language regenerates automatically.