Skip to main content

Get subscription

Endpoint for getting Subscription by id.

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/subscription/{subscription_id}

Response

CodeDescription
200Success
400Bad Request
404Not Found
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 subscription_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/revere_pay/${linked_account_id}/recurring/subscription/${subscription_id}`;
fetch(url, requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));

Example Success Response

{
"data": {
"id": "eef1b240-6e4d-42f7-93ea-873d165aa696",
"plan_id": "6f8df983-62a1-4d36-85fd-2e37114fa694",
"duration": 0,
"amounts": {
"amount": 30000,
"tax_amount": 1000,
"initial_amount": 20000
},
"billing_cycle": "daily",
"billing_factor": 7,
"next_bill_date": "2024-04-18T00:00:00Z",
"description": "Endless subscription",
"currency": "USD",
"processor_id": "<processor_id>",
"retry_count": 3,
"metadata": {
"max_retry_count": 3,
"form_layout_id": null,
"form_layout_external_id": null,
"form_entry_id": null,
"charge_count": 1
},
"trial_period_days": 0,
"payment_method": "card",
"payment_details": {
"card": {
"brand": "Visa",
"first_six": "411111",
"last_four": "1111"
}
},
"billing_address": {
"address": {
"first_name": "John",
"last_name": "Doe",
"city": "New York",
"line_1": "1st Ave.",
"line_2": "1217",
"subdivision": "NY",
"postal_code": "10065",
"country": "US",
"email": "johndoe@example.com"
}
},
"status": "active",
"gateway_customer_id": "<customer_id>"
}
}