Skip to main content

Download Receipt PDF

Endpoint for downloading the receipt PDF of a paid Payment Link.

info

This endpoint does not use an API Key. Send the session_token obtained from the Get Public response as the Authorization header instead. The session token is scoped to the specific Payment Link it was issued for.

The Payment Link must already be paid, otherwise a 400 Bad Request is returned.

GET /api/v1/groups/{group_id}/payment-links/{payment_link_id}/receipt/pdf

Response

CodeDescription
200Success
400The Payment Link has not been paid yet
403The session token does not belong to this Payment Link
404Not Found
500Internal Error

Example Usage

downloadPdf.js
var headers = new Headers();
headers.append('Authorization', 'SESSION_TOKEN');

var requestOptions = {
method: 'GET',
headers: headers,
redirect: 'follow'
};
const group_id = '';
const payment_link_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/payment-links/${payment_link_id}/receipt/pdf`;
fetch(url, requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));

Example Success Response

Content Type: application/pdf

Body

PDF binary data