Skip to main content

Pay Payment Link

Endpoint for paying a 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.

This endpoint is rate limited by IP address.

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

Request Parameters

NameDescriptionTypeRequired
tokenPayment token received by the tokenizer to pay for the Payment Link.stringRequired
billing_addressBilling address of the end-user.objectRequired
billing_address.first_nameFirst name of the end-user.stringRequired
billing_address.last_nameLast name of the end-user.stringRequired
billing_address.companyCompany of the end-user.string
billing_address.line_1First address line of the end-user.stringRequired
billing_address.line_2Second address line of the end-user.string
billing_address.cityCity of the end-user.stringRequired
billing_address.subdivisionState/province/county of the end-user.stringRequired
billing_address.postal_codePostal code / ZIP code of the end-user.stringRequired
billing_address.countryCountry of the end-user.stringRequired
billing_address.emailEmail address of the end-user.stringRequired
billing_address.phonePhone number of the end-user.string

Response

CodeDescription
200Success
400Bad Request / Validation error, or the Payment Link is no longer available
403The session token does not belong to this Payment Link
500Internal Error

Example Usage

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

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

Example Request

{
"token": "9d3edfce-3029-40ad-bfcc-467a49f2d5ea",
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"line_1": "E 123 22",
"city": "Brooklyn",
"subdivision": "NY",
"postal_code": "11001",
"country": "US",
"email": "test@example.com"
}
}

Example Success Response

{
"id": "7e44c370-078e-4fa3-9909-bdd8554eb068",
"status": "paid",
"transaction_status": "pending",
"redirect_url": "https://example.com/thank-you"
}