Skip to main content

Get All Plans

Endpoint for getting all Plans.

info

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

GET /api/v1/groups/{group_id}/revere_pay/{linked_account_id}/recurring/plans

Query Parameters

NameDescriptionType
limitOptional parameter to limit the number of results in the queryuint64
offsetThe number of items to skip before starting to collect the result set.uint64

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: 'GET',
headers: headers,
redirect: 'follow'
};
const group_id = '';
const linked_account_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/revere_pay/${linked_account_id}/recurring/plans`;
fetch(url, requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));

Example Success Response

{
"data": {
"items": [
{
"id": "4e178777-201e-4815-abbe-c88fa8a5246e",
"name": "Starter plan",
"duration": 0,
"amount": 1100,
"initial_amount": 500,
"billing_cycle": "annual",
"billing_factor": 1,
"linked_account_id": "771f7f31-1e91-4355-ae12-d163f7064f5b",
"description": "Annual subscription",
"tax": 0,
"shipping_amount": 0,
"custom_fields": null,
"trial_period_days": 14,
"max_retry_count": 3,
"created_at": "2024-02-06T21:58:58.611953Z",
"updated_at": "2024-02-06T21:58:58.611953Z"
},
{
"id": "81f9f105-aa23-4a3f-8af6-20769d206a30",
"name": "Early Bird Plan",
"duration": 3,
"amount": 2000,
"initial_amount": 0,
"billing_cycle": "monthly",
"billing_factor": 1,
"linked_account_id": "771f7431-1e91-4359-ae12-d163f7064f5b",
"description": "Early bird discount for new members.",
"tax": 0,
"shipping_amount": 0,
"custom_fields": null,
"trial_period_days": 14,
"max_retry_count": 3,
"created_at": "2024-02-06T21:58:27.057239Z",
"updated_at": "2024-02-06T21:58:27.057239Z"
},
{
"id": "39f306c8-d132-4c68-9962-121991014e4e",
"name": "Premium plan",
"duration": 0,
"amount": 10000,
"initial_amount": 0,
"billing_cycle": "annual",
"billing_factor": 1,
"linked_account_id": "76827f31-1e91-4359-ae12-d163f7064f5b",
"description": "Annual premium plan for our enterprise users.",
"tax": 0,
"shipping_amount": 0,
"custom_fields": null,
"trial_period_days": 14,
"max_retry_count": 3,
"created_at": "2024-02-06T21:58:07.601196Z",
"updated_at": "2024-02-06T21:58:07.601196Z"
},
{
"id": "09f0190e-9f1e-46b3-9914-449565e3147b",
"name": "Plus plan",
"duration": 0,
"amount": 3000,
"initial_amount": 600,
"billing_cycle": "monthly",
"billing_factor": 1,
"linked_account_id": "451f7f31-1e91-4359-ae12-d163f7064f5b",
"description": "Monthly plus plan for our users",
"tax": 0,
"shipping_amount": 0,
"custom_fields": null,
"trial_period_days": 14,
"max_retry_count": 3,
"created_at": "2024-02-05T19:17:34.092236Z",
"updated_at": "2024-02-05T19:17:34.092236Z"
}
],
"total_count": 4
}
}