Skip to main content

Using API for recurring billing

Postman collection with all endpoints - Using_API_for_recurring_billing.postman_collection.zip

Recurring billings list

get
Endpoint GET /api/recurring-payment-client/plan/{contractId}

Responses

  • 200:OK
    {
    "status": "success",
    "data": {
    "id": "string",
    "contractId": "string",
    "owner": "string",
    "typeNetwork": "string",
    "nodeType": "string",
    "name": "string",
    "currency": {
    "id": "string",
    "name": "string",
    "title": "string",
    "nodeType": "string",
    "minReplenish": "number",
    "decimals": "number",
    "contractAddress": "string"
    },
    "payeeAddress": "string",
    "periodType": "number",
    "price": "number",
    "status": "boolean",
    "recurringContract": "string",
    "collectName": "boolean",
    "collectEmail": "boolean",
    "image": "string",
    "logoImage": "string",
    "description": "string",
    "accentColor": "string",
    "backgroundColor": "string"
    }
    }
  • 200:Example
    {
    "status": "success",
    "data": {
    "id": "674e456b9a04ba77620024a6",
    "contractId": "0xd6313dc992b1033b2d4fab268d295f338877f19ccc90f415e27efe25d83c67d9",
    "owner": "63d3fd14fdfa8e005676fb41",
    "typeNetwork": "testnet",
    "nodeType": "bsc",
    "name": "Test",
    "currency": {
    "id": "60eee72676d1ef1761cf916c",
    "name": "BUSD",
    "title": "BUSD (BEP-20)",
    "nodeType": "bsc",
    "minReplenish": 1,
    "decimals": 18,
    "contractAddress": "0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee"
    },
    "payeeAddress": "0x042DD25750229079b398B6ac463AF753461aa3E0",
    "periodType": 0,
    "price": 1,
    "status": true,
    "recurringContract": "0x67F05618Ba51601C496C30f651017ebEA8a36CE8",
    "collectName": true,
    "collectEmail": true,
    "image": "/uploads/44169496106737135.png",
    "logoImage": "/uploads/67662411062735734.png",
    "description": "test",
    "accentColor": "#2988EF",
    "backgroundColor": "#f1f3f6"
    }
    }

Subscriptions list

get
Endpoint GET /api/recurring-payment-client/subscription/{subscriptionId}

Responses

  • 200:OK
    {
    "status": "success",
    "data": {
    "subscriptionId": "string",
    "owner": "string",
    "periodType": "number",
    "amountRecurring": "number",
    "nextPaymentTime": "string",
    "customerName": "string",
    "customerEmail": "string",
    "customerOrderId": "string",
    "recurringContract": "string",
    "planName": "string",
    "typeNetwork": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "currency": {
    "id": "string",
    "name": "string",
    "title": "string",
    "nodeType": "string",
    "minReplenish": "number",
    "decimals": "number",
    "contractAddress": "string"
    },
    "subscriptionHistory": [
    {
    "type": "string",
    "hashTx": "string",
    "periodType": "number",
    "createdAt": "string",
    "amountRecurring": "number"
    },
    {
    "type": "string",
    "hashTx": "string",
    "periodType": "number",
    "createdAt": "string",
    "amountRecurring": "number"
    }
    ]
    }
    }
  • 200:Example
    {
    "status": "success",
    "data": {
    "subscriptionId": "0x202e45523e41d57168ef0e1472f274dec7a9247023ccb2168cd926922d3dc230",
    "owner": "0x23f7fd6ad94Ad3a0F743E59D4eCF5E51d728463C",
    "periodType": 0,
    "amountRecurring": 1,
    "nextPaymentTime": "2024-12-11T15:55:45.000Z",
    "customerName": "",
    "customerEmail": "",
    "customerOrderId": "",
    "recurringContract": "0x67F05618Ba51601C496C30f651017ebEA8a36CE8",
    "planName": "Test",
    "typeNetwork": "testnet",
    "createdAt": "2024-12-11T14:55:56.045Z",
    "updatedAt": "2024-12-11T14:56:26.139Z",
    "currency": {
    "id": "60eee72676d1ef1761cf916c",
    "name": "BUSD",
    "title": "BUSD (BEP-20)",
    "nodeType": "bsc",
    "minReplenish": 1,
    "decimals": 18,
    "contractAddress": "0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee"
    },
    "subscriptionHistory": [
    {
    "type": "RECURRING_PAYMENT_NEW_SUB",
    "hashTx": "0x2bddf857ec70b114e26746054656a5bc4f0c20b07217f32f6454fa2a83dcb6ce",
    "periodType": 0,
    "createdAt": "2024-12-11T14:55:56.049Z",
    "amountRecurring": 1
    },
    {
    "type": "RECURRING_PAYMENT_CANCEL_SUB",
    "hashTx": "0x938e4e832de2aa681736fe6557b765cd7b5556923d7d3ca9320ceb213799a46e",
    "periodType": 0,
    "createdAt": "2024-12-11T14:56:26.143Z",
    "amountRecurring": 1
    }
    ]
    }
    }