Get order correspondence

This endpoint allows you to get correspondence

Source of information


All parameters needed for the request can be obtained via webhooks. This is a service that is only available for registered merchants. The service informs the merchant when a new transaction has been made and further information such as invoices are available for retrieval. How to activate this service can be found at the following link: Subscription webhooks

Receivable information and its format


As you can see, the successful response does not contain information in form of a JSON structure. All the information that can be received is received in form of an invoice file. You can choose whether to receive the invoices as pdf, html or via e-mail depending on your request. This information to access the different formats is contained in the payload of the webhook.

SecurityBearer Authentication
Request
path Parameters
transaction_id
required
string

The transaction id of the order for which the correspondence is requested

Example: 12-34567890123456789
correspondence_id
required
string

The id of the requested correspondence

format
required
string

The response format of the requested correspondence. Possible values:
pdf and eml

Example: eml
header Parameters
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.

Content-Type
required
string
Example: application/json
Responses
200

Is returned if the requested artifact is returned

404

Is returned if transaction_id or correspondence_id are unknown, or the artifact cannot be found

405

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

406

Is returned if the request accept header is not json

415

Is returned if the request does not contain content type header, or if the requested content type is not json

500

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

get/api/order/{transaction_id}/correspondences/invoices/{correspondence_id}/{format}
Request samples