- Overview
- Countries & currencies
- Integration
- Process flows
- Testing
- Additional information
- Consumer experience
- Reporting
- FAQ
Web integration
MyCheckout hosted payment pages are the optimal solution if you're looking for the quickest way to accept payments and a hassle-free experience for your consumers.
Before you begin
- Make sure you've been boarded with iDEAL
- Build your server integration
Make a payment
Make POST /{merchantId}/payments API call, submitting the required properties.
Below, you'll find an example API call with the essential data. To add more information with additional properties, please visit to our API Reference.
Property | Data type | Required |
---|---|---|
order | object | yes |
amountOfMoney | object | yes |
currencyCode | string | yes |
amount | integer | yes |
customer | object | yes |
merchantCustomerId | string | yes |
billdingAddress | object | yes |
countryCode | string | yes |
hostedCheckoutSpecificInput | object | yes |
locale | string | no |
variant | string | no |
AmountOfMoney amountOfMoney = new AmountOfMoney();
amountOfMoney.setAmount(100L);
amountOfMoney.setCurrencyCode("EUR");
Address address = new Address();
address.setCountryCode("NL");
Customer customer = new Customer();
customer.setBillingAddress(address);
Order order = new Order();
order.setAmountOfMoney(amountOfMoney);
order.setCustomer(customer);
CreateHostedCheckoutRequest createHostedCheckoutRequest = new CreateHostedCheckoutRequest();
createHostedCheckoutRequest.setOrder(order);
CreateHostedCheckoutResponse response = client.merchant("merchantId").hostedcheckouts().create(createHostedCheckoutRequest);
var amountOfMoney = new AmountOfMoney();
amountOfMoney.Amount = 100L;
amountOfMoney.CurrencyCode = "EUR";
var address = new Address();
address.CountryCode = "NL";
var customer = new Customer();
customer.BillingAddress = address;
var order = new Order();
order.AmountOfMoney = amountOfMoney;
order.Customer = customer;
var createHostedCheckoutRequest = new CreateHostedCheckoutRequest();
createHostedCheckoutRequest.Order = order;
var response = await client.V1.WithNewMerchant("merchantId").Hostedcheckouts.Create(createHostedCheckoutRequest);
var body = {
"order": {
"amountOfMoney": {
"amount": 1000,
"currencyCode": "EUR"
},
"customer": {
"billingAddress": {
"countryCode": "NL"
}
}
}
}
const sdkResponse = await client.v1.hostedcheckouts.create("merchantId", body);
$amountOfMoney = new AmountOfMoney();
$amountOfMoney->amount = 100;
$amountOfMoney->currencyCode = 'EUR';
$address = new Address();
$address->countryCode = 'NL';
$customer = new Customer();
$customer->billingAddress = $address;
$order = new Order();
$order->amountOfMoney = $amountOfMoney;
$order->customer = $customer;
$createHostedCheckoutRequest = new CreateHostedCheckoutRequest();
$createHostedCheckoutRequest->order = $order
org.tuckey.web.filters.urlrewrite.UrlRewriteWrappedResponse@5c6b331b = $client->v1()->merchant('merchantId')->hostedcheckouts()->create($createHostedCheckoutRequest);
amount_of_money = AmountOfMoney()
amount_of_money.amount = 100
amount_of_money.currency_code = 'EUR'
address = Address()
address.country_code = 'NL'
customer = Customer()
customer.billing_address = address
order = Order()
order.amount_of_money = amount_of_money
order.customer = customer
create_hosted_checkout_request = CreateHostedCheckoutRequest()
create_hosted_checkout_request.order = order
response = client.v1().merchant('merchantId').hostedcheckouts().create(create_hosted_checkout_request)
amount_of_money = Domain::AmountOfMoney.new
amount_of_money.amount = 100
amount_of_money.currency_code = 'EUR'
address = Domain::Address.new
address.country_code = 'NL'
customer = Domain::Customer.new
customer.billing_address = address
order = Domain::Order.new
order.amount_of_money = amount_of_money
order.customer = customer
create_hosted_checkout_request = Domain::CreateHostedCheckoutRequest.new
create_hosted_checkout_request.order = order
response = client.v1.merchant('merchantId').hostedcheckouts.create(create_hosted_checkout_request)
var amountOfMoney domain.AmountOfMoney
amountOfMoney.Amount = connectsdk.NewInt64(100)
amountOfMoney.CurrencyCode = connectsdk.newString("EUR")
var address domain.Address
address.CountryCode = connectsdk.newString("NL")
var customer domain.Customer
customer.BillingAddress = &address
var order domain.Order
order.AmountOfMoney = &amountOfMoney
order.Customer = &customer
var createHostedCheckoutRequest domain.CreateHostedCheckoutRequest
createHostedCheckoutRequest.Order = &order
response, err := client.V1().Merchant("merchantId").Hostedcheckouts().Create(createHostedCheckoutRequest, nil)
{
"order": {
"amountOfMoney": {
"currencyCode": "EUR",
"amount": 1000
},
"customer": {
"billingAddress": {
"countryCode": "NL"
}
}
},
"hostedCheckoutSpecificInput": {
"returnUrl": "https://example.org/",
"locale": "en_GB",
"variant": "138"
}
}
{
"RETURNMAC": "55c6d5ad-ac05-410c-b60c-c2b5479fa3d3",
"hostedCheckoutId": "0667c1c5-****-71ff-****-53760ae5ef9d",
"partialRedirectUrl": "pay1.preprod.checkout.worldline-solutions.com/checkout/*****-390126e8e66c4d759cf****6a8631e86:0667c1c5-5eb6-****-81dd-53760ae5ef9d:c****7be262b44e7934afd****c9dc46"
}
From the response, the important properties are:
- hostedCheckoutId – can be used in subsequent API calls to retrieve the transaction details (with GET /hostedcheckouts/{hostedCheckoutId} call);
- partialRedirectUrl – is used to create the URL to which the customer needs to be redirected. By default, we configure every account with the subdomain payment, so you can always connect https://payment. with the partialRedirectUrl, for example: https://payment.pay1.preprod.checkout.worldline-solutions.com/checkout/13801.......
For more information on customizing the checkout page, please refer to our MyCheckout hosted payment pages guide.
The hostedCheckoutId is only valid for 2 hours. Ensure to store the createdPaymentOutput.payment.id from GET /hostedcheckouts/{hostedCheckoutId} response to be able to retrieve data after 2 hours have elapsed via GET /payments/{paymentId} API call. Alternatively, we can also send a webhook event that will contain it.