Skip to main content

Upload Attachment

Endpoint for attaching a PDF document to a Payment Link. The end-user can view and download it on the public payment page.

info

Please be aware that this endpoint requires a Manage Payment Links API Key.

A Payment Link can have only one attachment. Uploading a new file replaces the existing one. Only Active Payment Links that have not expired can be updated.

POST /api/v1/groups/{group_id}/payment-links/{payment_link_id}/attachment

Request Parameters​

The request body must be sent as multipart/form-data.

NameDescriptionTypeRequired
fileThe PDF file. The file part's Content-Type must be application/pdf. Maximum size is 10 MB.fileRequired
display_nameName of the document shown to the end-user and used as the download filename. Defaults to the uploaded file's name.string

Response​

CodeDescription
200Success
400Bad Request / Validation error (e.g. not a PDF, file too large, Payment Link is not Active or expired)
404Payment Link not found
500Internal Error

Example Usage​

uploadAttachment.js
var headers = new Headers();
headers.append('Authorization', 'API_KEY');

// file: a PDF File or Blob with type 'application/pdf'
var formData = new FormData();
formData.append('file', file, 'contract.pdf');
formData.append('display_name', 'Service contract.pdf');

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

Example Success Response​

{
"id": "7e44c370-078e-4fa3-9909-bdd8554eb068",
"group_id": "8059f5c6-e1cd-4e46-9196-1d7e47401a3e",
"title": "Consulting session",
"description": "1 hour consulting session",
"amount_mode": "fixed",
"amount": 15000,
"settings": {},
"currency": "USD",
"card_enabled": true,
"ach_enabled": true,
"processor_id": "fbf2e44a-eed6-426f-b0e2-a3a5b34377c0",
"expires_at": "2027-12-18T00:00:00Z",
"expires_on": "2027-12-18T00:00:00Z",
"redirect_url": "https://example.com/thank-you",
"status": "active",
"url": "https://merchant.reverepayments.dev/payment-links/7e44c370-078e-4fa3-9909-bdd8554eb068",
"created_at": "2026-11-18T14:27:10.661796389Z",
"updated_at": "2026-11-18T14:35:22.481203Z",
"has_attachment": true,
"attachment_display_name": "Service contract.pdf"
}