Skip to main content

Pay Invoice

Endpoint for paying an Invoice.

POST /api/v1/groups/{group_id}/invoices/{invoice_id}/pay

Request Parameters

NameDescriptionTypeRequired
tokenThe payment token received by tokenizer to pay for the invoice.stringRequired

Response

CodeDescription
200Success
400Bad Request / Validation error
500Internal Error

Example Usage

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

var requestOptions = {
method: 'POST',
headers: headers,
redirect: 'follow',
body: {
// request body data
}
};
const group_id = '';
const invoice_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/invoices/${invoice_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"
}

Example Success Response

The response body will be null, the status code is 200.