Get subscriptions
Endpoint for getting all Subscriptions.
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
Query Parameters
| Name | Description | Type | 
|---|---|---|
| limit | Optional parameter to limit the number of results in the query | uint64 | 
| offset | The number of items to skip before starting to collect the result set. | uint64 | 
| subscription_id | Subscription ID | string | 
| name | Name of the customer | string | 
| Email of the customer | string | 
Response
| Code | Description | 
|---|---|
| 200 | Success | 
| 500 | Internal Error | 
Example Usage
- JavaScript
- Python
- Go
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/subscription?limit=10&offset=0`;
fetch(url, requestOptions)
	.then((response) => response.text())
	.then((result) => console.log(result))
	.catch((error) => console.log('error', error));
plans.py
import requests
group_id = ""
linked_account_id = ""
url = "https://api.reverepayments.dev/api/v1/groups/"+group_id+"/revere_pay/"+linked_account_id+"/recurring/subscription?limit=10&offset=0"
headers = {
  'Authorization': 'API_KEY'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
plans.go
package main
import (
	"fmt"
	"io"
	"net/http"
)
func main() {
	const group_id = ""
	const linked_account_id = ""
	url := "https://api.reverepayments.dev/api/v1/groups/" + group_id + "/revere_pay/" + linked_account_id + "/recurring/subscription?limit=10&offset=0"
	client := &http.Client{}
	req, _ := http.NewRequest("GET", url, nil)
	req.Header.Add("Authorization", "API_KEY")
	res, _ := client.Do(req)
	defer res.Body.Close()
	bytes, err := io.ReadAll(res.Body)
	if err != nil {
		fmt.Println(err.Error())
		return
	}
	fmt.Println(string(bytes))
}
Example Success Response
{
	"data": {
		"items": [
			{
				"id": "<subscription_id>",
				"plan_id": "<plan_id>",
				"plan_name": "Daily $2",
				"duration": null,
				"amounts": {
					"amount": 200,
					"tax_amount": 5,
					"initial_amount": 100
				},
				"billing_cycle": "daily",
				"billing_factor": 1,
				"next_bill_date": "2024-07-28T00: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": 5
				},
				"trial_period_days": 0,
				"payment_method": "wallet",
				"payment_details": {
					"wallet": {
						"group_id": "<group_id>",
						"group_name": "Test Company",
						"wallet_id": "<wallet_id>"
					}
				},
				"billing_address": {
					"address": {
						"first_name": "John",
						"last_name": "Doe",
						"company": "Test Company",
						"city": "New York",
						"line_1": "1st Ave.",
						"line_2": "1217",
						"subdivision": "NY",
						"postal_code": "10065",
						"country": "US",
						"email": "johndoe@example.com"
					}
				},
				"status": "completed",
				"gateway_customer_id": "<customer_id>"
			}
		],
		"total_count": 1
	}
}