Get subscriptions based on status
GET /subscriptions
Facades MERCHANT
HTTP Request
Example code for get all subscriptions. Also, can get subscription by status.
subscriptions = await client.GetSubscriptions();
HTTP Response
{
"facade": "merchant/subscription",
"data": [
{
"id": "6gqe8y5mkc5Qx2a9zmspgx",
"status": "draft",
"billData": {
"emailBill": true,
"cc": [
"[email protected]"
],
"number": "subscription1234-ABCD",
"currency": "USD",
"name": "John Doe",
"address1": "2630 Hegal Place",
"address2": "Apt 42",
"city": "Alexandria",
"state": "VA",
"zip": "23242",
"country": "US",
"email": "[email protected]",
"phone": "555-123-456",
"dueDate": "2021-05-31T00:00:00.000Z",
"passProcessingFee": true,
"items": [
{
"description": "Test Item 1",
"price": 6,
"quantity": 1
},
{
"description": "Test Item 2",
"price": 4,
"quantity": 1
}
],
"merchant": "5461e13dfd8b0047590d644a"
},
"schedule": "0 0 0 * * 1",
"nextDelivery": "2021-05-24T00:00:00.000Z",
"createdDate": "2021-05-21T12:41:51.841Z",
"token": "85yxWk7aEgPdJME6zTkXkA9UAGL1BW3TnJ3oTFYSa936qGRT2xDy6t5m9CUDhTt8w6"
},
{
"id": "2WDabp4eXU2UMbPYKYoPwA",
"status": "draft",
"billData": {
"emailBill": true,
"cc": [
"[email protected]"
],
"number": "subscription1234-EFGH",
"currency": "USD",
"name": "John Doe",
"address1": "2630 Hegal Place",
"address2": "Apt 42",
"city": "Alexandria",
"state": "VA",
"zip": "23242",
"country": "US",
"email": "[email protected]",
"phone": "555-123-456",
"dueDate": "2021-05-31T00:00:00.000Z",
"passProcessingFee": true,
"items": [
{
"description": "Test Item 1",
"price": 6,
"quantity": 1
},
{
"description": "Test Item 2",
"price": 4,
"quantity": 1
}
],
"merchant": "5461e13dfd8b0047590d644a"
},
"schedule": "0 0 0 * * 1",
"nextDelivery": "2021-05-24T00:00:00.000Z",
"createdDate": "2021-05-21T12:42:01.029Z",
"token": "85yxWk7aEgPdJME6zTkXkACFxcVxzQuhyGuYv4ESYEgdkReFnqzN5WdACzSNGEBE99"
}
]
}