Skip to content

Pay Later OpenAPI specification (version 1)

Pay Later allows shoppers to postpone the due date of an open invoice transaction between 14 and 150 days. Shoppers may use Pay Later to prevent getting dunned. It gives them the ability to plan their payments more individually. Charges apply when using this feature.

The Pay Later API enables sellers to integrate this functionality into their frontends. The Pay Later API offers endpoints to check the Pay Later status of a purchase order and to book a Pay Later option. By using the Pay Later API shops can offer their customers greater payment flexibility when paying by open invoice while keeping them inside their own frontends.

Booked Pay Later options can be withdraw within 14 days. Therefore the shopper can use one of the channels referenced in Ratepay Pay Later Terms of Use.

Download OpenAPI description
Languages
Servers
Production environment
https://api.ratepay.com

Request

Get Pay Later status for one order

Security
Bearer Authentication
Path
transaction_idstringrequired
Example: 12-34567890123456789
Headers
Content-Typestringrequired
Example: application/json
Authorizationstringrequired

For each request, a valid access token must be provided in the Authorization header. See Authentication API for obtaining a valid token.

curl -i -X GET \
  https://api.ratepay.com/order/paylater/v1/12-34567890123456789/status \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json'

Responses

Returns Pay Later status for the given transaction_id.

Bodyapplication/json;charset=UTF-8
transaction_idstring

The transaction id as specified in the URL

Example: "12-34567890123456789"
pay_later_statusstring

Pay Later status for the current order. Possible values:

- AVAILABLE = Pay Later can be booked for the current order
- NOT_AVAILABLE = Pay Later cannot be booked for the current order
- ALREADY_BOOKED = Pay Later has been booked for the current order and cannot be booked again
- ALREADY_WITHDRAWN = Pay Later was booked and withdrawn for the current order and cannot be booked again

Enum"AVAILABLE""NOT_AVAILABLE""ALREADY_BOOKED""ALREADY_WITHDRAWN"
Example: "ALREADY_WITHDRAWN"
bookingobject(ExternalBookingDto)

Contains Pay Later booking information. Is only available if pay_later_status is ALREADY_BOOKED or ALREADY_WITHDRAWN

Response
application/json;charset=UTF-8
{ "transaction_id": "12-34567890123456789", "pay_later_status": "ALREADY_WITHDRAWN", "booking": { "fee": 1.95, "currency": "EUR", "delta_due_date": 14, "original_due_date": "2020-02-01", "updated_due_date": "2020-02-15", "booking_timestamp": "2020-02-05T16:42:59.974067+01:00", "withdrawal_date": "2020-02-06" } }

Request

Get available Pay Later offers for one order

Security
Bearer Authentication
Path
transaction_idstringrequired
Example: 12-34567890123456789
Headers
Content-Typestringrequired
Example: application/json
Authorizationstringrequired

For each request, a valid access token must be provided in the Authorization header. See Authentication API for obtaining a valid token.

curl -i -X GET \
  https://api.ratepay.com/order/paylater/v1/12-34567890123456789/offers \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json'

Responses

Returns a list of the available Pay Later options for the given transaction_id.

Bodyapplication/json;charset=UTF-8
transaction_idstring

The transaction id as specified in the URI

Example: "12-34567890123456789"
current_due_datestring(date)

The current due date of the order before booking Pay Later (ISO 8601, YYYY-MM-DD).

Example: "2020-03-14"
pay_Later_offersArray of objects(PayLaterOfferDto)

A list containing all Pay Later offers for the order.

Response
application/json;charset=UTF-8
{ "transaction_id": "12-34567890123456789", "current_due_date": "2020-03-14", "pay_Later_offers": [ {} ] }

Request

Book a Pay Later offer for one order

Security
Bearer Authentication
Path
transaction_idstringrequired

The transaction id of the order for which Pay Later should be booked. (The Ratepay Gateway returns this when an order is created.

Example: 12-34567890123456789
Headers
Content-Typestringrequired
Example: application/json
Authorizationstringrequired

For each request, a valid access token must be provided in the Authorization header. See Authentication API for obtaining a valid token.

Bodyapplication/json;charset=UTF-8
offer_idstringrequired

The offer_id of the Pay Later offer to book as returned by the Pay Later Offers endpoint.

Example: "payl-1"
curl -i -X POST \
  https://api.ratepay.com/order/paylater/v1/12-34567890123456789 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -d '{
    "offer_id": "payl-1"
  }'

Responses

Is returned if Pay Later has been successfully booked. The response contains the details of the booked Pay Later offer and the booking timestamp.

Bodyapplication/json;charset=UTF-8
delta_due_dateinteger(int32)

The amount of days that the due date of the current order is postponed, i.e. the delta that comes on top of original_due_date (e.g. 14 days). Unit: days.

Example: 14
feenumber

The Pay Later fee for the booked Pay Later offer.

Example: 1.95
currencystring

The currency of the Pay Later fee, e.g. EUR (ISO 4217 alphabetic currency code, 3 chars).

Example: "EUR"
original_due_datestring(date)

The original due date before Pay Later had been booked for the current order (ISO 8601, YYYY-MM-DD).

Example: "2020-03-14"
new_due_datestring(date)

The new due date after booking Pay Later (ISO 8601, YYYY-MM-DD). This is original_due_date + delta_due_date.

Example: "2020-03-28"
booking_timestampstring(date-time)

The timestamp when Pay Later was booked for the current order (ISO 8601, YYYY-MM-DDThh:mm:ss.ffffff+hh:mm).

Example: "2020-03-13T16:42:59.974067+01:00"
Response
application/json;charset=UTF-8
{ "delta_due_date": 14, "fee": 1.95, "currency": "EUR", "original_due_date": "2020-03-14", "new_due_date": "2020-03-28", "booking_timestamp": "2020-03-13T16:42:59.974067+01:00" }