Booking Pay Later

Book a Pay Later offer for one order

SecurityBearer Authentication
Request
path Parameters
transaction_id
required
string

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
header Parameters
Content-Type
required
string
Example: application/json
Authorization
required
string

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

Request Body schema: application/json;charset=UTF-8
offer_id
required
string

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

Responses
200

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

400

Is returned if the request body contains an unknown offer_id or the offer_id parameter is missing.

404

Is returned if the transaction_id is unknown.

405

Is returned if this endpoint is called with a request method other than GET.

406

Is returned if the request accept header does not specify JSON as an accepted content type for the response.

409

Is returned if Pay Later is not available, has already been booked or has been withdrawn or the selected offer is not available for the given transaction_id. To avoid this error, check with the Pay Later status endpoint whether Pay Later is available for the order before calling this endpoint.

413

Is returned if the request is too large, e. g. a very large offer_id is set as the payload. This error cannot happen if an offer_id returned by the Pay Later Offers endpoint is used.

415

Is returned if the request does not contain content type headers or if the request content type is anything other than JSON.

500

Is returned in case of a technical server error at Ratepay. Try again later.

post/order/paylater/v1/{transaction_id}
Request samples
application/json;charset=UTF-8
{
  • "offer_id": "payl-1"
}
Response samples
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"
}