Hosted payment page

You can also use our hosted payment page instead of a custom implementation or plugin. When using this functionality as part of your checkout process, we recommend to use a regular HTTP redirect to automatically forward the consumer to the hosted payment page.

You can send an order request without any transactions (payment method).

It is optional to set an expiration_period, which will expire the payment page after a fixed duration. In the example below, the expiration period for the payment page URL is set as 30 days.

The payment page URL is returned in order_url field of the response, which the consumer can follow to complete the payment.

Example order request:

POST /v1/orders/ HTTP/1.1
Authorization: Basic aHVudGVyMjo=
Content-Type: application/json

{
  "currency": "EUR",
  "amount": 995,
  "description": "Example description",
  "expiration_period":"P30D",
  "customer": {
    "locale": "en-GB"
  }
}

Response:

{
  "amount": 995,
  "client": {
    "user_agent": "Testing API"
  },
  "created": "2016-07-04T11:41:57.121017+00:00",
  "currency": "EUR",
  "description": "Example description",
  "id": "1c969951-f5f1-4290-ae41-6177961fb3cb",
  "merchant_id": "7131b462-1b7d-489f-aba9-de2f0eadc9dc",
  "modified": "2016-07-04T11:41:57.183822+00:00",
  "order_url": "api.online.emspay.eu/pay/1c969951-f5f1-4290-ae41-6177961fb3cb/",
  "project_id": "1ef558ed-d77d-470d-b43b-c0f4a131bcef",
  "status": "new"
}

The resulting payment page URL links directly to the payment page for this order:

api.online.emspay.eu/pay/a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7/

On the hosted payment page, all payment methods available to the consumer are shown. These are the payment methods that have been approved and are enabled for the webshop.

Customer data can contain a preferred locale, possible locales are: nl, de, nl-BE, fr-BE, en-GB. This locale will be used to determine the language of the hosted payment page.

Limiting the allowed payment methods

In case you only want to offer the shopper a subset of available payment methods, you can limit the payment methods by specifying an allow list: payment_methods.

Example order request that’s limited to banktransfer and iDEAL:

POST /v1/orders/ HTTP/1.1
Authorization: Basic aHVudGVyMjo=
Content-Type: application/json

{
  "currency": "EUR",
  "amount": 995,
  "description": "Example description",
  "expiration_period":"P30D",
  "payment_methods":["ideal", "bank-transfer"],		
  "customer": {
    "locale": "en-GB"
  }
}