We provide the API which follows all the HTTP request and based on the ‘Rest’ theory. These API allows you to perform all the actions in your account just by requesting the call. These calls can be fired using any API development platform.
Every call is revealed with an URL. The URL of each resource can be obtained by accessing the API Root Endpoint.
All the API uses ‘Basic Auth’ as authorization channel.
The API key and Secret Key of your Pabbly Subscriptions account is used as the Client Authentication.
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
Fire the link with POST request and fill the following details in from data.
If the response status is success then a unique customer Id will be generated for that customer.
first_name | Required
First Name of your customer. |
---|---|
last_name | Required
Last Name of your customer. |
email_id | Required
Email address of your customer. |
Basic Details | Optional
Company name, Website, Phone number, Billing address, Shipping address are the optional fields. |
POST https://payments.pabbly.com/api/v1/customer
{
"first_name" : "Lance",
"last_name" : "Crews",
"email_id" : "[email protected]",
"company_name": "Omni Source",
"website": "anstudios.com",
"phone": "406-775-3868",
"is_affiliate" : "true",
"billing_address" : {
"attention" : "Mr. Lance Crews",
"street1" : "936 Tibbs Avenue",
"street2" : "Jenna Lane",
"city" : "Ekalaka",
"state" : "MT",
"zip_code" : "59324",
"country" : "US"
},
"shipping_address" : {
"attention" : "Mr. Lance Crews",
"street1" : "936 Tibbs Avenue",
"street2" : "Jenna Lane",
"city" : "Ekalaka",
"state" : "MT",
"zip_code" : "59324",
"country" : "US"
}
}
{
"status": "success",
"message": "Customer Created",
"data": {
"company_name": "Omni Source",
"website": "anstudios.com",
"phone": "406-775-3868",
"billing_address": {
"attention": "Mr. Lance Crews",
"street1": "936 Tibbs Avenue",
"street2": "Jenna Lane",
"city": "Ekalaka",
"state": "MT",
"zip_code": "59324",
"country": "US"
},
"shipping_address": {
"attention": "Mr. Lance Crews",
"street1": "936 Tibbs Avenue",
"street2": "Jenna Lane",
"city": "Ekalaka",
"state": "MT",
"zip_code": "59324",
"country": "US"
},
"portal_status": true,
"createdAt": "2019-06-06T12:21:13.050Z",
"updatedAt": "2019-06-06T12:21:13.063Z",
"id": "5cf905394ad3bf577d8394f8",
"first_name": "Lance",
"last_name": "Crews",
"email_id": "[email protected]"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
The post request API which is fired to create a new customer with a subscription.
In response you will get a unique customer Id and Subscription Id.
Basic Details | Required First_name, Last_name, and Email address of the customer. |
---|---|
Card Details | Required Card Number, Expiry, and CVV of the customers CC. |
gateway_type | Required It can be Stripe or Test |
gateway_id | Required Unique Id of the payment gateway from which the payment is processed. |
Billing Address | Optional Add the address details in respective fields. |
plan_id | Required Unique Id of the plan which you will assign to this customer. |
redirect_to | Optional The customer will be redirected to this link after successful payment. |
POST https://payments.pabbly.com/api/v1/subscription
{
"first_name": "john",
"last_name" : "smith",
"email": "[email protected]",
"card_number": "4111111111111111",
"month": "11",
"year": "2020",
"cvv" : "423",
"gateway_type":"test",
"gateway_id":"5ae0243aec4b151d26bbfe90",
"street": "arera colony",
"city":"Bhopal",
"state":"MP",
"zip_code":"462016",
"country":"india",
"plan_id": "5ae0243aec4b151d26bbfe90",
"coupon_code":"50Off",
"redirect_to": "https://www.pabbly.com/"
}
{
"status": "success",
"message": "Your payment is successful.",
"data": {
"user": {
"currency": "USD",
"createdAt": "2018-10-26T07:53:30.595Z",
"updatedAt": "2019-04-02T07:25:48.043Z",
"id": "5bd2c7fa2c0adc07ea53feae",
"parent": "5aec10df5354933812b51513",
"first_name": "john",
"last_name": "smith",
"email": "[email protected]",
"address_line1": "",
"address_line2": "",
"city": "",
"state": "",
"country": "India",
"zip_code": "",
"phone": "",
"mobile": "",
"facebook_url": "",
"twitter_url": "",
"time_zone": "Asia/Kolkata",
"date_format": "MM/DD/YYYY hh:mm A",
"ip_address": "::ffff:127.0.0.1",
"currency_symbol": "$"
},
"customer": {
"billing_address": {
"street1": "Arera colony",
"city": "Bhopal",
"state": "Madhya Pradesh",
"state_code": "MP",
"zip_code": "462016",
"country": "IN"
},
"shipping_address": {},
"client_portal": false,
"portal_status": true,
"id": "5c8f2601e1d9be0ed4bd1501",
"createdAt": "2019-03-18T05:00:49.091Z",
"updatedAt": "2019-03-18T05:00:51.293Z",
"first_name": "john",
"last_name": "smith",
"email_id": "[email protected]"
},
"product": {
"createdAt": "2019-02-07T05:26:34.665Z",
"updatedAt": "2019-02-07T05:26:34.665Z",
"id": "5c5bc18ab00702371c2860a1",
"product_name": "Product A",
"description": null,
"notification_email": null,
"redirect_url": null
},
"subscription": {
"plan": {
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-02-07T05:26:47.880Z",
"updatedAt": "2019-02-07T05:26:47.880Z",
"id": "5c5bc197b00702371c2860a2",
"product_id": "5c5bc18ab00702371c2860a1",
"user_id": "5bd2c7fa2c0adc07ea53feae",
"plan_name": "One Time",
"plan_code": "one-time",
"price": 20,
"billing_period": "",
"billing_period_num": "",
"billing_cycle": "onetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": ""
},
"setup_fee": null,
"payment_terms": "",
"currency_symbol": "$",
"payment_method": "custom",
"taxable": true,
"gateway_type": "custom",
"custom_fields": [],
"cron_process": "done",
"createdAt": "2019-03-27T11:52:43.492Z",
"updatedAt": "2019-03-27T11:52:43.492Z",
"id": "5c9b640b795c9554a83bd7d7",
"customer_id": "5c8f2601e1d9be0ed4bd1501",
"product_id": "5c5bc18ab00702371c2860a1",
"plan_id": "5c5bc197b00702371c2860a2",
"amount": 20,
"email_id": "[email protected]",
"status": "live",
"quantity": 1,
"starts_at": "2019-03-27T11:52:43.434Z",
"activation_date": "2019-04-02T10:59:25.252Z",
"expiry_date": "2119-03-27T11:52:43.434Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "",
"last_billing_date": "2019-04-02T10:59:25.252Z",
"canceled_date": null
},
"invoice": {
"invoice_id": "INV-81",
"quantity": "1",
"product_id": "5c5bc18ab00702371c2860a1",
"setup_fee": 0,
"currency_symbol": "₹",
"credit_note": {
"status": "success",
"new_plan_total": 24,
"credit_applied": []
},
"tax_apply": {
"taxes": {
"gst": 20
},
"state": "all",
"total_amount": "20.00",
"total_tax": 4
},
"cron_process": "done",
"retry": false,
"retry_count": 0,
"createdAt": "2019-03-27T11:52:43.579Z",
"updatedAt": "2019-03-27T11:52:43.588Z",
"id": "5c9b640b795c9554a83bd7d8",
"customer_id": "5c8f2601e1d9be0ed4bd1501",
"subscription_id": "5c9b640b795c9554a83bd7d7",
"status": "paid",
"payment_term": "",
"amount": 24,
"due_amount": 0,
"due_date": "2019-03-27T11:52:43.434Z",
"plan_id": [
"5c5bc197b00702371c2860a2"
]
}
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API is fired with GET request.
You will need to fill the customer Id in the link and fire it.
In response you will get all the details in customer like name, email, created date and so on.
GET https://payments.pabbly.com/api/v1/customer/{customer_id}
{
"status": "success",
"message": "Customer data",
"data": {
"user_id": "5a4b5db47cfab6872a7feafa",
"first_name" : "Lance",
"last_name" : "Crews",
"user_name": "LanceCrews",
"email_id" : "[email protected]",
"pcustomer_id": "5a4b776f7cfab6872a7feb06",
"billing_address": {
"street1": "",
"city": null,
"state": null,
"zip_code": null,
"country": null
},
"credit": {
"remaining": 0
},
"createdAt": "2018-01-02T12:16:05.496Z",
"updatedAt": "2018-01-02T12:16:05.496Z",
"id": "5a4b78053152df337d841348"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A GET request API used to get the details of all the customer in a single page.
Simply used to get the Customer Id and User Id of all the customers.
GET https://payments.pabbly.com/api/v1/customers
{
"status": "success",
"message": "Customers data",
"data": [
{
"user_id": "5a4b5db47cfab6872a7feafa",
"first_name" : "Lance",
"last_name" : "Crews",
"user_name": "LanceCrews",
"email_id" : "[email protected]",
"pcustomer_id": "5a4b776f7cfab6872a7feb06",
"billing_address": {
"street1": "",
"city": null,
"state": null,
"zip_code": null,
"country": null
},
"credit": {
"remaining": 0
},
"createdAt": "2018-01-02T12:16:05.496Z",
"updatedAt": "2018-01-02T12:16:05.496Z",
"id": "5a4b78053152df337d841348"
},
{
"user_id": "5a4b5db47cfab6872a7feafa",
"first_name" : "Dominique",
"last_name" : "Pierce",
"user_name": "Dominique Pierce",
"email_id" : "[email protected]",
"pcustomer_id": "5a4c539f7cfab6872a7feb08",
"billing_address": {
"street1": "1924 Ocello Street",
"city": "Moundridge",
"state": "KS",
"zip_code": "67107",
"country": "US"
},
"credit": {
"remaining": 0
},
"createdAt": "2018-01-03T03:56:05.714Z",
"updatedAt": "2018-01-03T03:56:05.714Z",
"id": "5a4c5455da43ed35b70e88c2"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This is a PUT request API in which you will add the customer Id in Request URL.
In response you will get the new details of the customer on same customer Id. That means the customer Id will remain the same but the details will be changed.
first_name | Optional
First Name of your customer. |
---|---|
last_name | Optional
Last Name of your customer. |
company_name | Optional
Customer’s company name |
website | Optional
Customer’s website name. |
phone | Optional
Customer’s phone number. |
Billing Address | Optional
Customer address will be added in the respective fields. |
Shipping Address | Optional
Customer’s shipping address will be added in the respective fields |
PUT https://payments.pabbly.com/api/v1/customer/{customer_id}
{
"first_name" : "Lance",
"last_name" : "Crews",
"company_name": "Omni Source",
"website": "anstudios.com",
"phone": "406-775-3868",
"billing_address" : {
"attention" : "Mr. Lance Crews",
"street1" : "936 Tibbs Avenue",
"street2" : "Jenna Lane",
"city" : "Ekalaka",
"state" : "MT",
"zip_code" : "59324",
"country" : "US"
},
"shipping_address" : {
"attention" : "Mr. Lance Crews",
"street1" : "936 Tibbs Avenue",
"street2" : "Jenna Lane",
"city" : "Ekalaka",
"state" : "MT",
"zip_code" : "59324",
"country" : "US"
}
}
{
"status": "success",
"message": "Customer updated",
"data": {
"user_id": "5a4b5db47cfab6872a7feafa",
"first_name" : "Lance",
"last_name" : "Crews",
"user_name": "LanceCrews",
"email_id" : "[email protected]",
"credit": {
"remaining": 0
},
"createdAt": "2018-01-06T09:49:28.522Z",
"updatedAt": "2018-01-08T10:53:12.835Z",
"company_name": "Omni Source",
"website": "anstudios.com",
"phone": "406-775-3868",
"id": "5a509ba81e33641bec7dd4c9",
"billing_address": {
"attention" : "Mr. Lance Crews",
"street1" : "936 Tibbs Avenue",
"street2" : "Jenna Lane",
"city" : "Ekalaka",
"state" : "MT",
"zip_code" : "59324",
"country" : "US"
},
"shipping_address": {
"attention" : "Mr. Lance Crews",
"street1" : "936 Tibbs Avenue",
"street2" : "Jenna Lane",
"city" : "Ekalaka",
"state" : "MT",
"zip_code" : "59324",
"country" : "US"
}
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
The POST request API. In which you will add the customer Id in the link.’
In response you will get the details of the subscribed plan and a subscription Id.
plan_id | Required Unique Id of the plan which you will assign to this customer. |
---|---|
gateway_type | Required It can be Stripe or Test |
gateway_id | Required When there is multiple payment gateways of same kind. Then Add the gateway_id from which you want to process the payment. |
method_id | Required When there is method id of same customer. Then Add the method_id from which you want to process the payment. |
POST https://payments.pabbly.com/api/v1/subscription/{customer_id}
{
"plan_id": "5ad1cec439fde06e87ea366a",
"addons": {"5dd3d45892210345d859b0bf": {"checked":true,"quantity":1},"5e0b2eb8e374105b09d8e190": {"checked":true,"quantity":1}},
"gateway_type":"test|stripe",
"gateway_id":"5ae0243aec4b151d26bbfe90",
"redirect_to": "https://www.pabbly.com/"
}
{
"status": "success",
"message": "Your payment is successful.",
"data": {
"customer": {
"first_name": "john",
"last_name": "smith",
"email_id": "[email protected]",
"company_name": "",
"createdAt": "2018-04-14T09:48:48.356Z",
"updatedAt": "2018-04-21T07:36:04.171Z",
"billing_address": {
"attention": "",
"street1": "",
"street2": "",
"city": "",
"state": "",
"zip_code": "",
"country": "IN"
},
"shipping_address": {
"attention": "",
"street1": "",
"street2": "",
"city": "",
"state": "",
"zip_code": "",
"country": "IN"
},
"website": "",
"phone": "",
"id": "5ad1ce8039fde06e87ea3668"
},
"product": {
"product_name": "Product 1",
"description": null,
"notification_email": null,
"redirect_url": "https://www.pabbly.com/",
"createdAt": "2018-04-14T09:49:27.848Z",
"updatedAt": "2018-04-26T05:47:41.256Z",
"id": "5ad1cea739fde06e87ea3669"
},
"subscription": {
"customer_id": "5ad1ce8039fde06e87ea3668",
"email_id": " [email protected]",
"product_id": "5ad1cea739fde06e87ea3669",
"plan_id": "5ae0243aec4b151d26bbfe90",
"status": "live",
"quantity": 1,
"amount": 25,
"starts_at": "2018-04-27T08:27:39.393Z",
"activation_date": "2018-04-27T08:27:39.393Z",
"expiry_date": "",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "",
"last_billing_date": "2018-04-27T08:27:39.333Z",
"plan": {
"product_id": "5ad1cea739fde06e87ea3669",
"user_id": "5ac2096ec57c2c5107dea058",
"plan_name": "plan2",
"plan_code": "plan2",
"price": 25,
"billing_period": "",
"billing_period_num": "",
"billing_cycle": "onetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": "Test plan 2
",
"redirect_link": null,
"bump_offer": {
"plan_id": null,
"title_label": null,
"tag_line": null,
"description": null
},
"createdAt": "2018-04-25T06:46:18.496Z",
"updatedAt": "2018-04-25T06:46:18.496Z",
"id": "5ae0243aec4b151d26bbfe90"
},
"setup_fee": 0,
"payment_terms": "",
"currency_symbol": "$",
"payment_method": "5ae1681022d2c23a78109ab4",
"createdAt": "2018-04-27T08:27:39.323Z",
"updatedAt": "2018-04-27T08:27:40.085Z",
"cron_process": "done",
"id": "5ae2defbfb82ab6597eb7c9d"
},
"invoice": {
"customer_id": "5ad1ce8039fde06e87ea3668",
"invoice_id": "INV-22",
"status": "paid",
"amount": 25,
"quantity": 1,
"due_amount": 0,
"due_date": "2018-04-27T08:27:39.393Z",
"plan_id": [
"5ae0243aec4b151d26bbfe90"
],
"payment_term": "",
"subscription_id": "5ae2defbfb82ab6597eb7c9d",
"setup_fee": 0,
"currency_symbol": "$",
"credit_note": {
"status": "success",
"new_plan_total": 25,
"credit_applied": []
},
"createdAt": "2018-04-27T08:27:39.333Z",
"updatedAt": "2018-04-27T08:27:40.092Z",
"cron_process": "done",
"id": "5ae2defbfb82ab6597eb7c9e"
}
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
Post request API in which you will add the subscription Id.
In response the subscription of that customer will be canceled and the customer will not be billed further.
Attributes :
cancel_at_end | Required Choose whether you want cancel at the end of subscription or cancel immediately |
---|
POST https://payments.pabbly.com/api/v1/subscription/{subscription_id}/cancel
{
"cancel_at_end":"true"
}
{
"status": "success",
"message": "Your suscription would be cancelled at the end of the term",
"data": null
}
{
"cancel_at_end":"false"
}
{
"status": "success",
"message": "Your suscription has been cancelled",
"data": null
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
API to be fired with GET request. In the link you will just need to add the subscription Id.
No form data is required in the API. You can just fire the link and get all the details of this subscription like – Billing dates, Product Id, plane name and plan code.
GET https://payments.pabbly.com/api/v1/subscription/{subscription_id}
{
"status": "success",
"message": "Subscription data",
"data": {
"plan": {
"plan_active": "true",
},
"createdAt": "2019-02-02T08:26:46.136Z",
"updatedAt": "2019-02-02T08:26:46.136Z",
"id": "5c555446a7b0834404a3f9aa",
"product_id": "5c555414a7b0834404a3f9a8",
"user_id": "5b716c5a5dfff7797d9cd81e",
"plan_name": "Intermediate",
"plan_code": "intermediate",
"price": 50,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"trial_period": 0,
"setup_fee": 0,
"plan_description": ""
},
"payment_terms": "",
"currency_symbol": "$",
"payment_method": "5c7f79de82ed5e6beb137ee5",
"taxable": true,
"gateway_type": "stripe",
"custom_fields": [
{
"type": "select",
"label": "Tutorial Type",
"value": "Digital Marketing"
},
{
"type": "radio",
"label": "Gender",
"value": "Male"
},
{
"type": "textarea",
"label": "Drop Your Message",
"value": "I want to learn about digital marketing through your tutorial."
},
{
"type": "number",
"label": "Altername Number",
"value": "7852416929"
},
{
"type": "file",
"label": "Upload Your File",
"value": "customfield/files/2019/3/brO5OjALuZ8q-1551858046-Checkoutpagebackgroundimage.png"
}
],
"cron_process": "done",
"createdAt": "2019-03-06T07:42:22.344Z",
"updatedAt": "2019-03-06T07:42:22.344Z",
"id": "5c7f79de82ed5e6beb137ee2",
"customer_id": "5c7f79de82ed5e6beb137ee1",
"product_id": "5c555414a7b0834404a3f9a8",
"plan_id": "5c555446a7b0834404a3f9aa",
"amount": 50,
"email_id": "[email protected]",
"status": "live",
"quantity": 1,
"starts_at": "2019-03-06T07:42:22.222Z",
"activation_date": "2019-03-06T07:42:24.242Z",
"expiry_date": "2119-03-06T07:42:22.222Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "2019-04-06T07:42:24.242Z",
"last_billing_date": "2019-03-06T07:42:24.242Z"
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
Another GET request API in which you will add the customer Id in the link and fire it.
There is no need to add the form data and in response you will get the details of all the subscription assigned to that particular customer.
GET https://payments.pabbly.com/api/v1/subscriptions/{customer_id}
{
"status": "success",
"message": "Subscriptions data",
"data": [
{
"customer_id": "5af96449ee385519983441b3",
"email_id": "[email protected]",
"product_id": "5ac6059c1947441b76cb3e1d",
"plan_id": "5ac605f11947441b76cb3e1e",
"status": "live",
"quantity": 1,
"amount": 30,
"starts_at": "2018-05-14T00:00:00.000Z",
"activation_date": "2018-05-14T10:26:40.404Z",
"expiry_date": "2018-06-14T00:00:00.000Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "",
"last_billing_date": "2018-05-14T00:00:00.000Z",
"plan": {
"product_id": "5ac6059c1947441b76cb3e1d",
"user_id": "5a5c8d8811e026d5150704cf",
"plan_name": "Life Time Plan",
"plan_code": "lifetime",
"price": 30,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "specific",
"billing_cycle_num": "1",
"trial_period": 0,
"setup_fee": 8,
"plan_description": "<p>This is a plan for 1 cycle.</p>",
"redirect_link": null,
"bump_offer": {
"plan_id": null,
"title_label": null,
"tag_line": null,
"description": null
},
"createdAt": "2018-04-05T11:18:09.908Z",
"updatedAt": "2018-04-07T05:32:31.220Z",
"id": "5ac605f11947441b76cb3e1e"
},
"setup_fee": 8,
"payment_terms": "net0",
"currency_symbol": "$",
"coupon": {
"discount_amount": 0
},
"payment_method": "5aec48a2ed1eda3e5ee19c5e",
"createdAt": "2018-05-14T10:26:39.924Z",
"updatedAt": "2018-05-14T10:26:40.040Z",
"cron_process": "done",
"id": "5af9645fee385519983441b4"
},
{
"customer_id": "5af96449ee385519983441b3",
"email_id": "[email protected]",
"product_id": "5a78432f3596331d04f40ec4",
"plan_id": "5a829709e4c7af6e6120f727",
"status": "live",
"quantity": 1,
"amount": 30.99,
"starts_at": "2018-05-14T00:00:00.000Z",
"activation_date": "2018-05-14T10:26:58.585Z",
"expiry_date": "2019-05-14T00:00:00.000Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "2019-05-14T00:00:00.000Z",
"last_billing_date": "2018-05-14T00:00:00.000Z",
"plan": {
"product_id": "5a78432f3596331d04f40ec4",
"user_id": "5a5c8d8811e026d5150704cf",
"plan_name": "Recurring Plan",
"plan_code": "recurring",
"price": 30.99,
"billing_period": "y",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 30,
"plan_description": "<p>This is a plan for recurring cycle.</p>",
"createdAt": "2018-02-13T07:43:05.426Z",
"updatedAt": "2018-04-04T10:56:46.044Z",
"id": "5a829709e4c7af6e6120f727"
},
"setup_fee": 30,
"payment_terms": "net0",
"currency_symbol": "$",
"coupon": {
"discount_amount": 0
},
"payment_method": "offline",
"createdAt": "2018-05-14T10:26:58.811Z",
"updatedAt": "2018-05-14T10:26:58.910Z",
"cron_process": "done",
"id": "5af96472ee385519983441b8"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
With this GET request API you can fetch the details of the scheduled subscription.
You will need to add the subscription Id in the API link and fire it in GET request.
In response you will get the details of old plan, new plans and the scheduled timings.
GET https://payments.pabbly.com/api/v1/scheduledchanges/{subscription_id}
{
"status": "success",
"message": "Scheduled Subscription",
"data": {
"old_plan": {
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-06-07T12:11:22.776Z",
"updatedAt": "2019-06-07T12:11:22.776Z",
"id": "5cfa546a22f7d918a4dca2f6",
"product_id": "5cefbd220114341f14ebebee",
"plan_name": "Starter Plan",
"plan_code": "starter-plan",
"price": 15,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 5,
"plan_description": ""
},
"new_plan": {
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-06-14T07:44:10.350Z",
"updatedAt": "2019-06-14T07:44:10.350Z",
"id": "5d03504ad58b3256507e08bd",
"product_id": "5cefbd220114341f14ebebee",
"plan_name": "Rookie",
"plan_code": "rookie",
"price": 20,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 6,
"plan_description": ""
},
"quantity": 1,
"currency_symbol": "$",
"addons": [
{
"id": "5d0b3883f9e188095c9b4fe7",
"name": "addon-name",
"product_id": "5cefbd220114341f14ebebee",
"code": "addon-name",
"price": 10,
"quantity": 1,
"billing_cycle": "lifetime",
"billing_period": "m",
"associate_plans": "selected_plans",
"plans_array": [
"5d08cd0e62c2ce2390ec407b",
"5d03504ad58b3256507e08bd"
],
"category_array": [
"5cfdef689ca9a5206ccfcd75",
"5cfdef719ca9a5206ccfcd76"
]
}
],
"coupon": {
"coupon_code": "25off",
"coupon_name": "25 Off",
"discount": 25,
"discount_type": "percent",
"redemption_type": "forever",
"discount_amount": 18
},
"customer_id": "5d08cdea62c2ce2390ec407e",
"next_billing_date": "2019-07-21T05:35:45.454Z",
"scheduled_date": "2019-07-21T05:35:45.454Z",
"when_apply": "eot"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This link will be fired with PUT request.
You will need to add the existing subscription Id in the Request URL
plan_id | Required Unique Id of the plan which you want to assign this customer. |
---|---|
customer_id | Required Unique Id of the customer who’s subscription is going to upgrade. |
payment_term | Optional Possible values of payment_term are net0/net15/net 30/net 45/net 60/neteom/neteonm. If this attribute is not used then net o will be the default value |
activated_at_val | Optional Add any back date from the presnet day as the activation date of subscription |
PUT https://payments.pabbly.com/api/v1/subscription/{subscription_id}/update
{
"plan_id": "5a7b12c0f2c1ed4c26e05247",
"customer_id": "5a7b12c0f225sd4c26e05247",
"payment_term": "net0",
"activated_at_val": "immediately"
}
{
"status": "success",
"message": "Subscription payment success",
"data": {
"customer": {
"user_id": "5a4c75ec65558d6f0748344f",
"first_name" : "Lance",
"last_name" : "Crews",
"user_name": "LanceCrews",
"email_id": "[email protected]",
"billing_address" : {
"attention" : "Mr. Lance Crews",
"street1" : "936 Tibbs Avenue",
"street2" : "Jenna Lane",
"city" : "Ekalaka",
"state" : "MT",
"zip_code" : "59324",
"country" : "US"
},
"credit": {
"remaining": 746
},
"createdAt": "2018-01-11T11:57:46.627Z",
"updatedAt": "2018-01-16T07:23:43.662Z",
"company_name": "",
"website": "",
"phone": "406-775-3868",
"shipping_address": {
"attention": "",
"street1": "",
"street2": "",
"city": "",
"state": "",
"zip_code": "",
"country": ""
},
"other_detail": {
"portal_language": "",
"client_portal": true,
"payment_term": "Net 15",
"currency": "",
"twitter": "",
"facebook": ""
},
"role": "",
"api": "",
"id": "5a57513abb01c005f479b0d8"
},
"subscription": {
"customer_id": "5a57513abb01c005f479b0d8",
"email_id": "[email protected]",
"product_id": "5a575094bb01c005f479b0d6",
"plan_id": "5a5750c5bb01c005f479b0d7",
"user_id": "5a4c75ec65558d6f0748344f",
"status": "live",
"quantity": "1",
"amount": 51,
"starts_at": "2018-01-15T07:33:46.464Z",
"activation_date": "2018-01-15T00:00:00.000Z",
"expiry_date": "2018-07-14T18:30:00.000Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "2018-02-16T07:23:46.464Z",
"last_billing_date": "2018-01-16T07:23:43.686Z",
"plan": {
"trial_period": 0,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": "",
"product_id": "5a575094bb01c005f479b0d6",
"id": "5a5750c5bb01c005f479b0d7",
"price": "51",
"user_id": "5a4c75ec65558d6f0748344f"
},
"setup_fee": null,
"payment_terms": "net30",
"createdAt": "2018-01-15T07:33:46.316Z",
"updatedAt": "2018-01-16T07:23:46.361Z",
"payment_method": "5a575160bb01c005f479b0da",
"id": "5a5c595ab61d331010af0a5b"
},
"invoice": {
"customer_id": "5a57513abb01c005f479b0d8",
"user_id": "5a4c75ec65558d6f0748344f",
"status": "paid",
"payment_term": "net0",
"amount": 0,
"used_credits": 51,
"due_amount": "0",
"due_date": "2018-01-16T07:23:43.434Z",
"subscription_id": "5a5c595ab61d331010af0a5b",
"subscription": {
"customer_id": "5a57513abb01c005f479b0d8",
"email_id": "[email protected]",
"product_id": "5a575094bb01c005f479b0d6",
"plan_id": "5a5750c5bb01c005f479b0d7",
"user_id": "5a4c75ec65558d6f0748344f",
"status": "live",
"quantity": "1",
"amount": 51,
"starts_at": "2018-01-15T07:33:46.464Z",
"activation_date": "2018-01-15T00:00:00.000Z",
"expiry_date": "2018-07-14T18:30:00.000Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "2018-02-16T07:23:46.464Z",
"last_billing_date": "2018-01-16T07:23:43.686Z",
"plan": {
"trial_period": 0,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": "",
"product_id": "5a575094bb01c005f479b0d6",
"id": "5a5750c5bb01c005f479b0d7",
"price": "51",
"user_id": "5a4c75ec65558d6f0748344f"
},
"setup_fee": null,
"payment_terms": "net30",
"createdAt": "2018-01-15T07:33:46.316Z",
"updatedAt": "2018-01-16T07:23:46.361Z",
"payment_method": "5a575160bb01c005f479b0da",
"id": "5a5c595ab61d331010af0a5b"
},
"plan_id": [
"5a5750c5bb01c005f479b0d7"
],
"createdAt": "2018-01-16T07:23:43.686Z",
"updatedAt": "2018-01-16T07:23:46.374Z",
"id": "5a5da87f9e9312130c8b4d38"
}
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A post request API.
It will create a product in your Pabbly Subscriptions account and also generates a unique Id for your product.
product_name | Required Name the Product which you are going to sell through Pabbly Subscriptions. |
---|---|
description | Optional Product description is for your reference only |
redirect_url | Optional After successful payment the customer can be redirected to the link you add here with hosted page data. By default they are redirected to the custom thank you page of Pabbly Subscriptions. |
POST https://payments.pabbly.com/api/v1/product/create
{
"product_name":"Product 1",
"description":"product description",
"redirect_url":"www.exampledomain.com"
}
{
"status": "success",
"message": "Product Created",
"data": {
"createdAt": "2018-11-02T07:35:54.163Z",
"updatedAt": "2018-11-02T07:35:54.163Z",
"id": "5bdbfe5af6836f03dcab1643",
"product_name": "Product 1",
"description": "product description",
"notification_email": "[email protected]",
"redirect_url": "www.exampledomain.com",
"hostedPage": null
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A GET request API.
It will give you the list of single product like Product Name, Product Description, Create product date etc.
product_name | Required Name the Product which you are going to sell through Pabbly Subscriptions. |
---|---|
description | Optional Product description is for your reference only |
redirect_url | Optional After successful payment the customer can be redirected to the link you add here with hosted page data. By default they are redirected to the custom thank you page of Pabbly Subscriptions. |
GET https://payments.pabbly.com/api/v1/product/{product_id}
{
"status": "success",
"message": "Product",
"data": {
"createdAt": "2018-03-21T11:40:00.612Z",
"updatedAt": "2018-03-21T11:40:00.612Z",
"id": "5ab24490b7975c0c08201083",
"product_name": "PayPal Webhook Testing",
"description": null,
"notification_email": null,
"redirect_url": ""
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A GET request API which can be fired directly as it is given.
In response you will get the list of all the products. Product Id, Created and updated name, and basic details like Product name and description.
GET https://payments.pabbly.com/api/v1/products
{
"status": "success",
"message": "Product data",
"data": [
{
"user_id": "5a4b5db47cfab6872a7feafa",
"product_name": "Pabbly Payments",
"description": null,
"notification_email": null,
"redirect_url": "https://payments.pabbly.com/",
"createdAt": "2018-01-02T10:26:54.630Z",
"updatedAt": "2018-01-02T10:26:54.630Z",
"id": "5a4b5e6ecb9bc82fd2b4bfef"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
The PUT request API.
You will need to add the existing Product Id in the Request URL.
In response the details of the product will be updated without changing the product Id.
product_name | Required Name the Product which you are going to sell through Pabbly Subscriptions. |
---|---|
description | Optional Product description is for your reference only |
redirect_url | Optional After successful payment the customer can be redirected to the link you add here with hosted page data. By default they are redirected to the custom thank you page of Pabbly Subscriptions. |
PUT https://payments.pabbly.com/api/v1/product/update/{product_id}
{
"product_name":"Product 1",
"description":"edit product description",
"redirect_url":"www.exampledomain.com"
}
{
"status": "success",
"message": "Plan Created",
"data": {
"plan_active": "true",
"redirect_url": "https://www.pabbly.com/",
"currency_code": "INR",
"createdAt": "2019-10-04T05:37:19.832Z",
"updatedAt": "2019-10-04T05:37:19.832Z",
"id": "5d96da8f68bb5940bc4642c2",
"product_id": "5d8de292e05efd2ec02232e6",
"plan_name": "plan1",
"plan_code": "plan1",
"price": 10,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": "2",
"trial_period": 2,
"setup_fee": 2,
"plan_description": "",
"checkout_page": "http://localhost:1337/subscribe/5d96da8f68bb5940bc4642c2/plan1"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This is a POST request API used to create the selling plan for a product.
In response you will get the plan Id, Created date and other important details.
product_id | Required Unique product Id in which you are creating this plan |
---|---|
plan_name | Required Name of the plan. |
plan_code | Required Plan Code can be same as plan name. This will be displayed at the end of the checkout page link. |
billing_cycle | Required It can be*onetime – for one time billing. *lifetime – is used for “Auto renews until cancel”*Specific – Is used for “Expire after a specified number of billing” |
setup_fee | Optional One time payment deducted at the time of purchase only. |
billing_cycle_num | Optional Used only when the billing_cycle is ‘Specific’ |
Price | Required Add the amount. |
billing_period | Required It can be’m – Monthy Billing”y – Yearly Billing”w – Weekly Billing’ |
billing_period_num | Required It can be the number of month/weeks for the billing frequency. |
plan_active | Required It is active by default. You can deactivate it also. |
plan_description | Optional Description of the plan. |
trial_period | Optional Assign trail days to your customers. |
redirect_url | Optional Customer will be redirected to this link after successful payment. |
currency_code | Optional Currency code of your account. |
meta_data | Optional Pass additional information in plan and track it in subscription details of a customer. |
payment_gateway | Optional add the gateway selection |
gateways_array | Optional pass the gateway arrays |
POST https://payments.pabbly.com/api/v1/plan/create
{
"product_id": "5d8de292e05efd2ec02232e6",
"plan_name": "plan1",
"plan_code": "plan1",
"billing_cycle": "lifetime",
"setup_fee": 2,
"billing_cycle_num": "2",
"price": 10,
"billing_period": "m",
"billing_period_num": "1",
"plan_active": "true",
"plan_description": "",
"trial_period": 2,
"redirect_url": "https://www.pabbly.com/",
"currency_code": "INR"
"meta_data": {
"value1":"{value_details}",
"value2":"{value_details}",
"value3":"{value_details}",
"payment_gateway ": "selected" (selected|all) (optional),
"gateways_array": ["5ce63ce36ed67d35124ae78a",…] (optional)
}
}
{
"status": "success",
"message": "Plan Created",
"data": {
"plan_active": "true",
"redirect_link": null,
"createdAt": "2019-05-02T10:15:21.489Z",
"updatedAt": "2019-05-02T10:15:21.489Z",
"id": "5ccac339bc78893214636d92",
"product_id": "5cb9a705b1b68a4f476f1d83",
"plan_name": "Video Tutoria;",
"plan_code": "video-tutorial",
"price": 10,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": "2",
"trial_period": 2,
"setup_fee": 2,
"plan_description": "",
"checkout_page": "http://payments.pabbly.com/subscribe/5ccac339bc78893214636d92/video-tutorial"
}
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This is a GET request API used to get the list of single plan.
In response you will get the plan name, plan amount, billing type and other important details.
product_id | Required Unique product Id in which you are creating this plan |
---|---|
plan_name | Required Name of the plan. |
plan_code | Required Plan Code can be same as plan name. This will be displayed at the end of the checkout page link. |
billing_cycle | Required It can be*onetime – for one time billing. *lifetime – is used for “Auto renews until cancel”*Specific – Is used for “Expire after a specified number of billing” |
setup_fee | Optional One time payment deducted at the time of purchase only. |
billing_cycle_num | Optional Used only when the billing_cycle is ‘Specific’ |
Price | Required Add the amount. |
billing_period | Required It can be’m – Monthy Billing”y – Yearly Billing”w – Weekly Billing’ |
billing_period_num | Required It can be the number of month/weeks for the billing frequency. |
plan_active | Required It is active by default. You can deactivate it also. |
plan_description | Optional Description of the plan. |
trial_period | Optional Assign trail days to your customers. |
redirect_url | Optional Customer will be redirected to this link after successful payment. |
currency_code | Optional Currency code of your account. |
meta_data | Optional Pass additional information in plan and track it in subscription details of a customer. |
payment_gateway | Optional add the gateway selection |
gateways_array | Optional pass the gateway arrays |
https://payments.pabbly.com/api/v1/plan/{plan_id}
{
"status": "success",
"message": "Plan data",
"data": {
"plan_active": "true",
"payment_gateway": "all",
"gateways_array": [
"5fe45c9a00168c46d1a91a71"
],
"createdAt": "2020-12-24T09:03:00.842Z",
"updatedAt": "2020-12-31T06:27:41.967Z",
"id": "5fe4594400168c46d1a91a29",
"product_id": "5fe458f600168c46d1a91a27",
"plan_name": "Zero Touch Orders Booking",
"plan_code": "zero-touch-orders-booking",
"price": 10,
"billing_period": "",
"billing_period_num": "",
"billing_cycle": "onetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": ""
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
The GET request type API which can be fired directly without adding any data.
You just need to add the API keys of your account and fire the API
In response you will get the details of all the plans of all the products.
GET https://payments.pabbly.com/api/v1/plans
{
"status": "success",
"message": "Plan data",
"data": [
{
"plan_active": "true",
"bump_offer": {
"plan_id": null,
"title_label": null,
"tag_line": null,
"description": null
},
"redirect_link": null,
"createdAt": "2019-04-06T05:51:35.228Z",
"updatedAt": "2019-04-06T05:51:35.228Z",
"id": "5ca83e67f195d158746ccc3d",
"product_id": "5ca83e1df195d158746ccc3b",
"plan_name": "Monthly plan",
"plan_code": "monthly-plan",
"price": 50,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": "With the purchase of Pabbly Hub, you'll get access to -
- Pabbly Subscriptions - 250 Customers (All features)
- FormGet - 3 Forms (All features)
- MailGet - 10K Subscribers limit (All features)
- MailGet Bolt - 10K Subscribers limit (All features)
- InkThemes - ColorWay Sites single domain license
Stack up to increase limits.
",
"checkout_page": "http://payments.pabbly.com/subscribe/5ca83e67f195d158746ccc3d/monthly-plan"
},
{
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-04-06T05:52:04.903Z",
"updatedAt": "2019-04-06T05:52:04.903Z",
"id": "5ca83e84f195d158746ccc3e",
"product_id": "5ca83e1df195d158746ccc3b",
"plan_name": "Quarterly plan",
"plan_code": "quarterly-plan",
"price": 200,
"billing_period": "m",
"billing_period_num": "4",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": "",
"checkout_page": "http://payments.pabbly.com/subscribe/5ca83e84f195d158746ccc3e/quarterly-plan"
},
{
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-04-06T05:52:22.601Z",
"updatedAt": "2019-04-06T05:52:22.601Z",
"id": "5ca83e96f195d158746ccc3f",
"product_id": "5ca83e1df195d158746ccc3b",
"plan_name": "Yearly plan",
"plan_code": "yearly-plan",
"price": 500,
"billing_period": "y",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": "",
"checkout_page": "http://payments.pabbly.com/subscribe/5ca83e96f195d158746ccc3f/yearly-plan"
},
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API will be fired on GET request. You will need to add the Product Id in the link.
Directly fire the API, there is nothing to be add in form data.
In response you will get the details of all the plans related to that particular product.
GET https://payments.pabbly.com/api/v1/plans/{product_id}
{
"status": "success",
"message": "Plan data",
"data": [
{
"plan_active": "true",
"bump_offer": {
"plan_id": null,
"title_label": null,
"tag_line": null,
"description": null
},
"redirect_link": null,
"createdAt": "2019-04-06T05:52:43.598Z",
"updatedAt": "2019-04-06T05:52:43.598Z",
"id": "5ca83eabf195d158746ccc40",
"product_id": "5ca83e33f195d158746ccc3c",
"plan_name": "Diet for bulky",
"plan_code": "diet-for-bulky",
"price": 20,
"billing_period": "",
"billing_period_num": "",
"billing_cycle": "onetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": "With the purchase of Pabbly Hub, you'll get access to -
- Pabbly Subscriptions - 250 Customers (All features)
- FormGet - 3 Forms (All features)
- MailGet - 10K Subscribers limit (All features)
- MailGet Bolt - 10K Subscribers limit (All features)
- InkThemes - ColorWay Sites single domain license
Stack up to increase limits.
",
"checkout_page": "http://payments.pabbly.com/subscribe/5ca83eabf195d158746ccc40/diet-for-bulky"
},
{
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-04-06T05:53:06.460Z",
"updatedAt": "2019-04-06T05:53:06.460Z",
"id": "5ca83ec2f195d158746ccc41",
"product_id": "5ca83e33f195d158746ccc3c",
"plan_name": "Diet plans of lean gainers",
"plan_code": "diet-plans-of-lean-gainers",
"price": 25,
"billing_period": "",
"billing_period_num": "",
"billing_cycle": "onetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": "",
"checkout_page": "http://payments.pabbly.com/subscribe/5ca83ec2f195d158746ccc41/diet-plans-of-lean-gainers"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A PUT request API which can used to update or edit the details of an existing plan.
You will need to add the plan Id in Request URL
In response you will get the new details of the plan on same plan Id.
product_id | Required Product Id with which this plan is associated. |
---|---|
redirect_url | Optional The customer will be redirected to this link after successful payment. |
currency_code | Required Add the currency of your account. |
plan_name | Optional Update the plan name. |
plan_code | Optional Update the plan code. |
billing_cycle | Optional Update the billing frequency. |
setup_fee | Optional Fees deducted at the time of first payment only. |
billing_cycle_num | Optional Update the billing time line. |
price | Optional Update the price of the plan. |
billing_period | Optional Update the billing period. |
billing_period_num | Optional Number of billing number of weeks, months or year. |
plan_active | Optional True for plan active and false for inactive |
plan_description | Optional update the plan description |
payment_gateway | Optional update the gateway selection |
gateways_array | Optional pass the gateway arrays |
PUT https://payments.pabbly.com/api/v1/plan/update/{plan_id}
{
"Product_id":"5b3242f1f8d759218ba0316d",
"redirect_url": "https://www.pabbly.com/",
"currency_code": "INR",
"plan_name":"plan19",
"plan_code":"planabc",
"billing_cycle":"lifetime",
"setup_fee" : 2,
"billing_cycle_num":"2",
"price":10,
"billing_period":"m",
"billing_period_num":"1",
"plan_active" : "true",
"plan_description" : "",
"trial_period" : 2,
"payment_gateway ": "selected" (selected|all) (optional),
"gateways_array": ["5ce63ce36ed67d35124ae78a",…] (optional)
}
{
"status": "success",
"message": "Plan Updated",
"data": {
"redirect_url": "https://www.pabbly.com/",
"currency_code": "INR",
"plan_active": "true",
"createdAt": "2018-06-26T13:43:46.544Z",
"updatedAt": "2018-07-11T10:31:44.959Z",
"id": "5b324312f8d759218ba0316e",
"product_id": "5b3242f1f8d759218ba0316d",
"plan_name": "plan19",
"plan_code": "planabc",
"price": 10,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": "2",
"trial_period": 2,
"setup_fee": 2,
"plan_description": "",
"checkout_page": "http://payments.pabbly.com/subscribe/5b324312f8d759218ba0316e/planabc"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
The POST request API, which is used to create a new coupon.
product_id will be added in the Request URL.
coupon_name | Required Name of your coupon. |
---|---|
coupon_code | Required This code will be used by the customer to avail discounts. |
discount | Required Discounted number either percentage or flat. |
discount_type | Required Can be Flat or Percent. |
redemption_type | Required Choose how many times this coupon will be used.*one_time – Will be applied for a single time on a subscription.*lifetime – Forever type discount.*number_time – For limited redemption type discount. |
redemption_cycle | Optional Filled when the redemption_type is number_time. |
associate_plans | Optional All plans are selected by default. Or enable this discount for specific plans |
plans_array | Optional If associated plans is ‘Selected’ then add the plan Id in array. |
valid_upto | Required Select the future date in which the coupon can be applied. |
apply_to | Optional Applied on subscription amount only if true. If false then the discount is applied on the total amount. |
maximum_redemption | Required How many times this coupon can be used. |
POST https://payments.pabbly.com/api/v1/coupon/{product_id}
{
"coupon_name": "TestNew2",
"coupon_code" : "test123456",
"discount": 25,
"discount_type": "flat",
"redemption_type": "number_time",
"redemption_cycle": 2,
"associate_plans": "selected_plans",
"plans_array": ["5b03b6b77fd11b1634f15f0f","5b03b6cc7fd11b1634f15f10"],
"valid_upto": "2022-10-02",
"apply_to":false,
"maximum_redemption":10,
"status": "active"
}
{
"status": "success",
"message": "Coupon created",
"data": {
"product_id": "5b03b6837fd11b1634f15f0e",
"coupon_name": "TestNew2",
"coupon_code": "test123456",
"discount": 25,
"discount_type": "flat",
"redemption_type": "number_time",
"redemption_cycle": 2,
"associate_plans": "selected_plans",
"status": "active",
"plans_array": [
"5b03b6b77fd11b1634f15f0f",
"5b03b6cc7fd11b1634f15f10"
],
"valid_upto": "2018-10-01T18:30:00.000Z",
"apply_to": "total_amount",
"maximum_redemption": 10,
"used_redemption": 0,
"createdAt": "2018-07-03T05:29:08.011Z",
"updatedAt": "2018-07-03T05:29:08.011Z",
"id": "5b3b09a4f6c77706ccb2cdf2"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
The GET request API in which you will add the product Id in the link.
You can directly fire the API as there is no from data needed.
In response you will get the details of all the coupons associated with that Product. You will also get the data that the particular coupon is associated with how many plans.
GET https://payments.pabbly.com/api/v1/coupon/{product_id}
{
"status": "success",
"message": "Get Coupon",
"data": [
{
"product_id": "5b03b6837fd11b1634f15f0e",
"coupon_name": "test",
"coupon_code": "test24",
"discount": 25,
"discount_type": "flat",
"redemption_type": "onetime",
"redemption_cycle": 0,
"associate_plans": "all_plans",
"status": "active",
"plans_array": "",
"valid_upto": "2018-10-01T18:30:00.000Z",
"apply_to": "total_amount",
"maximum_redemption": 10,
"used_redemption": 0,
"createdAt": "2018-07-02T13:06:32.773Z",
"updatedAt": "2018-07-02T13:06:32.773Z",
"id": "5b3a23586dd1621234e0d99f"
},
{
"product_id": "5b03b6837fd11b1634f15f0e",
"coupon_name": "TestNew",
"coupon_code": "test1234",
"discount": 25,
"discount_type": "flat",
"redemption_type": "number_time",
"redemption_cycle": 2,
"associate_plans": "selected_plans",
"status": "active",
"plans_array": [
"5b03b6b77fd11b1634f15f0f",
"5b03b6cc7fd11b1634f15f10"
],
"valid_upto": "2018-10-01T18:30:00.000Z",
"apply_to": "total_amount",
"maximum_redemption": 10,
"used_redemption": 0,
"createdAt": "2018-07-03T05:18:51.021Z",
"updatedAt": "2018-07-03T05:18:51.021Z",
"id": "5b3b073babb4e618c4ed4259"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This is a GET request API which is used to get the data of a single invoice.
The Invoice Id is added in the link and fired without any formdata.
In response You will get the customer Id user Id, email product Id, plan Id and all the data which is present in the invoice.
Most important you get the status of the Invoice. If the status is paid then the payment is successful from the customer’s end.
GET https://payments.pabbly.com/api/v1/invoice/{invoice_id}
{
"status": "success",
"message": "Invoice data",
"data": {
"customer_id": "5a4b78053152df337d841348",
"user_id": "5a4b5db47cfab6872a7feafa",
"status": "paid",
"amount": 99,
"due_date": "2018-01-02T12:16:05.055Z",
"plan_id": [
"5a4b5e7fcb9bc82fd2b4bff0"
],
"subscription_id": "5a4b78053152df337d841349",
"subscription": {
"customer_id": "5a4b78053152df337d841348",
"email_id": "[email protected]",
"product_id": "5a4b5e6ecb9bc82fd2b4bfef",
"plan_id": "5a4b5e7fcb9bc82fd2b4bff0",
"user_id": "5a4b5db47cfab6872a7feafa",
"status": "live",
"quantity": "1",
"amount": 99,
"starts_at": "2018-01-02T12:16:05.055Z",
"activation_date": "2018-01-02T12:16:05.055Z",
"expiry_date": "",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "",
"last_billing_date": "2018-01-02T12:16:05.508Z",
"plan": {
"product_id": "5a4b5e6ecb9bc82fd2b4bfef",
"user_id": "5a4b5db47cfab6872a7feafa",
"plan_name": "Life Time Plan",
"plan_code": "lifetime",
"price": "99",
"billing_period": "y",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": null,
"setup_fee": null,
"plan_description": null,
"createdAt": "2018-01-02T10:27:11.365Z",
"updatedAt": "2018-01-02T10:27:11.365Z",
"id": "5a4b5e7fcb9bc82fd2b4bff0"
},
"setup_fee": null,
"payment_terms": "",
"pcustomer_id": "5a4b776f7cfab6872a7feb06",
"createdAt": "2018-01-02T12:16:05.503Z",
"updatedAt": "2018-01-02T12:16:05.535Z",
"payment_method": "5a4b78053152df337d841346",
"id": "5a4b78053152df337d841349"
},
"setup_fee": null,
"pcustomer_id": "5a4b776f7cfab6872a7feb06",
"createdAt": "2018-01-02T12:16:05.508Z",
"updatedAt": "2018-01-02T12:16:05.541Z",
"id": "5a4b78053152df337d84134a"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A GET request type API. You will add the customer Id in the link and fire it.
There is need of any from data to use this API.
In response you will get the Invoice Id of all the invoices sent to this particular customer with the respective status and also all the other important data like subscription Id, plan Id and so on.
GET https://payments.pabbly.com/api/v1/invoices/{customer_id}
{
"status": "success",
"message": "Invoice data",
"data": [
{
"customer_id": "5a4b78053152df337d841348",
"user_id": "5a4b5db47cfab6872a7feafa",
"status": "paid",
"amount": 99,
"due_date": "2018-01-02T12:16:05.055Z",
"plan_id": [
"5a4b5e7fcb9bc82fd2b4bff0"
],
"subscription_id": "5a4b78053152df337d841349",
"subscription": {
"customer_id": "5a4b78053152df337d841348",
"email_id": "[email protected]",
"product_id": "5a4b5e6ecb9bc82fd2b4bfef",
"plan_id": "5a4b5e7fcb9bc82fd2b4bff0",
"user_id": "5a4b5db47cfab6872a7feafa",
"status": "live",
"quantity": "1",
"amount": 99,
"starts_at": "2018-01-02T12:16:05.055Z",
"activation_date": "2018-01-02T12:16:05.055Z",
"expiry_date": "",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "",
"last_billing_date": "2018-01-02T12:16:05.508Z",
"plan": {
"product_id": "5a4b5e6ecb9bc82fd2b4bfef",
"user_id": "5a4b5db47cfab6872a7feafa",
"plan_name": "Life Time Plan",
"plan_code": "lifetime",
"price": "99",
"billing_period": "y",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": null,
"setup_fee": null,
"plan_description": null,
"createdAt": "2018-01-02T10:27:11.365Z",
"updatedAt": "2018-01-02T10:27:11.365Z",
"id": "5a4b5e7fcb9bc82fd2b4bff0"
},
"setup_fee": null,
"payment_terms": "",
"pcustomer_id": "5a4b776f7cfab6872a7feb06",
"createdAt": "2018-01-02T12:16:05.503Z",
"updatedAt": "2018-01-02T12:16:05.535Z",
"payment_method": "5a4b78053152df337d841346",
"id": "5a4b78053152df337d841349"
},
"setup_fee": null,
"pcustomer_id": "5a4b776f7cfab6872a7feb06",
"createdAt": "2018-01-02T12:16:05.508Z",
"updatedAt": "2018-01-02T12:16:05.541Z",
"id": "5a4b78053152df337d84134a"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
POST request API. Used to record the payment of any customer.
invoice_id will be added in the Request URL.
In response you will get the ‘Success’ status and the status of invoice will be updated.
payment_mode | Required Name the source in which you have collected the payment like cash, bank transfer etc |
---|---|
payment_note | Optional Add a note in for future reference. |
transaction | Optional Add transaction details if any. |
POST https://payments.pabbly.com/api/v1/invoice/recordpayment/{invoice_id}
{
"payment_mode":"cash/bank/etc",
"payment_note":"Payment notes if any",
"transaction":"Transaction data if any"
}
{
"status": "success",
"message": "Your payment is successful.",
"data": {
"user": {
"currency": "USD",
"createdAt": "2018-10-26T07:53:30.595Z",
"updatedAt": "2019-04-02T07:25:48.043Z",
"id": "5bd2c7fa2c0adc07ea53feae",
"parent": "5aec10df5354933812b51513",
"first_name": "Krish",
"last_name": "Th",
"email": "[email protected]",
"address_line1": "",
"address_line2": "",
"city": "",
"state": "",
"country": "India",
"zip_code": "",
"phone": "",
"mobile": "",
"facebook_url": "",
"twitter_url": "",
"time_zone": "Asia/Kolkata",
"date_format": "MM/DD/YYYY hh:mm A",
"ip_address": "::ffff:127.0.0.1",
"currency_symbol": "$"
},
"customer": {
"billing_address": {
"street1": "Arera colony",
"city": "Bhopal",
"state": "Madhya Pradesh",
"state_code": "MP",
"zip_code": "462016",
"country": "IN"
},
"shipping_address": {},
"client_portal": false,
"portal_status": true,
"id": "5c8f2601e1d9be0ed4bd1501",
"createdAt": "2019-03-18T05:00:49.091Z",
"updatedAt": "2019-03-18T05:00:51.293Z",
"first_name": "Krishna",
"last_name": "Thapa",
"email_id": "[email protected]"
},
"product": {
"createdAt": "2019-02-07T05:26:34.665Z",
"updatedAt": "2019-02-07T05:26:34.665Z",
"id": "5c5bc18ab00702371c2860a1",
"product_name": "Product A",
"description": null,
"notification_email": null,
"redirect_url": null
},
"subscription": {
"plan": {
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-02-07T05:26:47.880Z",
"updatedAt": "2019-02-07T05:26:47.880Z",
"id": "5c5bc197b00702371c2860a2",
"product_id": "5c5bc18ab00702371c2860a1",
"user_id": "5bd2c7fa2c0adc07ea53feae",
"plan_name": "One Time",
"plan_code": "one-time",
"price": 20,
"billing_period": "",
"billing_period_num": "",
"billing_cycle": "onetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": ""
},
"setup_fee": null,
"payment_terms": "",
"currency_symbol": "$",
"payment_method": "custom",
"taxable": true,
"gateway_type": "custom",
"custom_fields": [],
"cron_process": "done",
"createdAt": "2019-03-27T11:52:43.492Z",
"updatedAt": "2019-03-27T11:52:43.492Z",
"id": "5c9b640b795c9554a83bd7d7",
"customer_id": "5c8f2601e1d9be0ed4bd1501",
"product_id": "5c5bc18ab00702371c2860a1",
"plan_id": "5c5bc197b00702371c2860a2",
"amount": 20,
"email_id": "[email protected]",
"status": "live",
"quantity": 1,
"starts_at": "2019-03-27T11:52:43.434Z",
"activation_date": "2019-04-02T10:59:25.252Z",
"expiry_date": "2119-03-27T11:52:43.434Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "",
"last_billing_date": "2019-04-02T10:59:25.252Z",
"canceled_date": null
},
"invoice": {
"invoice_id": "INV-81",
"quantity": "1",
"product_id": "5c5bc18ab00702371c2860a1",
"setup_fee": 0,
"currency_symbol": "₹",
"credit_note": {
"status": "success",
"new_plan_total": 24,
"credit_applied": []
},
"tax_apply": {
"taxes": {
"gst": 20
},
"state": "all",
"total_amount": "20.00",
"total_tax": 4
},
"cron_process": "done",
"retry": false,
"retry_count": 0,
"createdAt": "2019-03-27T11:52:43.579Z",
"updatedAt": "2019-03-27T11:52:43.588Z",
"id": "5c9b640b795c9554a83bd7d8",
"customer_id": "5c8f2601e1d9be0ed4bd1501",
"subscription_id": "5c9b640b795c9554a83bd7d7",
"status": "paid",
"payment_term": "",
"amount": 24,
"due_amount": 0,
"due_date": "2019-03-27T11:52:43.434Z",
"plan_id": [
"5c5bc197b00702371c2860a2"
]
}
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
POST request API . can be used the record the transaction of Payment Invoice.
You need to add invoice Id in the link.
In response you will get the ‘Failed’ status and the status of invoice will be updated.
error_message | Required Error message received by the payment processor on your server. |
---|---|
transaction | Optional Add transaction details if any. |
POST https://payments.pabbly.com/api/v1/invoice/failedpayment/{invoice_id}
{
"error_message":"Error message returned by payment processor",
"transaction":"Transaction data if any"
}
{
"status": "failed",
"message": "Your payment is failed.",
"data": {
"customer": {
"billing_address": {
"street1": "arera colony",
"city": "Bhopal",
"state": "MP",
"zip_code": "462016",
"country": "india"
},
"shipping_address": {},
"portal_status": true,
"createdAt": "2019-05-23T06:14:13.613Z",
"updatedAt": "2019-05-23T06:14:15.654Z",
"id": "5ce63a35224e6b25d0bc0455",
"first_name": "Krishna",
"last_name": "Thapa",
"email_id": "[email protected]"
},
"product": {
"createdAt": "2019-02-07T05:26:34.665Z",
"updatedAt": "2019-02-07T05:26:34.665Z",
"id": "5c5bc18ab00702371c2860a1",
"product_name": "Product A",
"description": null,
"notification_email": null,
"redirect_url": null
},
"subscription": {
"plan": {
"plan_active": "true",
"redirect_link": null,
"createdAt": "2019-02-07T05:26:47.880Z",
"updatedAt": "2019-02-07T05:26:47.880Z",
"id": "5c5bc197b00702371c2860a2",
"product_id": "5c5bc18ab00702371c2860a1",
"user_id": "5bd2c7fa2c0adc07ea53feae",
"plan_name": "One Time",
"plan_code": "one-time",
"price": 20.56,
"billing_period": "",
"billing_period_num": "",
"billing_cycle": "onetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": ""
},
"setup_fee": null,
"payment_terms": "net0",
"currency_symbol": "$",
"coupon": {
"discount_amount": 0
},
"payment_method": "offline",
"create_type": "offline",
"taxable": true,
"cron_process": "done",
"createdAt": "2019-06-04T10:51:38.930Z",
"updatedAt": "2019-06-04T10:51:38.930Z",
"id": "5cf64d3addf90b25f41d721c",
"customer_id": "5ce63a35224e6b25d0bc0455",
"product_id": "5c5bc18ab00702371c2860a1",
"plan_id": "5c5bc197b00702371c2860a2",
"amount": 20.56,
"email_id": "[email protected]",
"status": "pending",
"quantity": 1,
"starts_at": "2019-06-03T18:30:00.000Z",
"activation_date": "2019-06-03T18:30:00.000Z",
"expiry_date": "2119-06-03T18:30:00.000Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "",
"last_billing_date": "",
"canceled_date": null
},
"invoice": {
"invoice_id": "INV-216",
"quantity": 1,
"product_id": "5c5bc18ab00702371c2860a1",
"setup_fee": 0,
"currency_symbol": "$",
"coupon": {
"discount_amount": 0
},
"credit_note": {
"status": "success",
"new_plan_total": 20.56,
"credit_applied": []
},
"tax_apply": "not_exist",
"cron_process": "done",
"retry": true,
"retry_count": 1,
"createdAt": "2019-06-04T10:51:39.852Z",
"updatedAt": "2019-06-04T10:51:39.856Z",
"id": "5cf64d3bddf90b25f41d721d",
"customer_id": "5ce63a35224e6b25d0bc0455",
"subscription_id": "5cf64d3addf90b25f41d721c",
"status": "pending",
"payment_term": "net0",
"amount": 20.56,
"due_amount": 20.56,
"due_date": "2019-06-04T10:51:39.393Z",
"plan_id": [
"5c5bc197b00702371c2860a2"
]
}
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
POST request API. Can be used t add a new payment method for an existing customer.
In response you will get the ‘success’ status and then you can bill this customer using the newly added payment method.
gateway_type | Required Can be stripe only. |
---|---|
first_name | Required Name on the Card |
last_name | Required Name on the Card |
Required Customer registered email address. | |
Card Details | Required Card Number, Expiry and CVV will be added in the respective fields. These details will be stored in the payment gateways only. |
POST https://payments.pabbly.com/api/v1/paymentmethod/{customer_id}
{
"gateway_type":"stripe",
"first_name":"Akash",
"last_name":"Agrsh",
"email":"[email protected]",
"card_number":"4111111111111111",
"month":"01",
"year":"2029",
"cvv":"864",
"street":"",
"city":"",
"state":"",
"zip_code":"",
"country":""
}
{
"status": "success",
"message": "Payment method created successfully"
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
GET request API which will be fired with the customer Id in the link.
Since you are grabbing our some data from the account then you will not need any form data.
In response you will get the details of all the payment method saved on this customers.
GET https://payments.pabbly.com/api/v1/paymentmethods/{customer_id}
{
"status": "success",
"message": "PaymentMethod data",
"data": [
{
"customer_id": "5ad1ce8039fde06e87ea3668",
"type": "credit_card",
"gateway": {
"id": "5adaeba584f8f1033e1e4b41",
"name": "Test",
"type": "test"
},
"createdAt": "2018-04-21T07:44:34.743Z",
"updatedAt": "2018-04-21T07:46:09.528Z",
"id": "5adaebe284f8f1033e1e4b46"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
PUT request API.
Can be fired to update the payment method for an existing customer.
customer_id will be added in the Request URL.
In response you will get a success message and the next recurring billing of this customer will be deducted from the newly added card.
Card Details | Required Card Number, Expiry and CVV will be added in the respective fields. These details will be stored in the payment gateways only. |
---|---|
mid | Required You will need to fire List all payment method API to get the MID. |
PUT https://payments.pabbly.com/api/v1/paymentmethod/{customer_id}
{
"card_number": "4012888888881881",
"month": "11",
"year": "2020",
"cvv" : "423",
"mid":"5a5070fbf6fb701824c6fc78"
}
{
"status": "success",
"message": "Payment method updated",
"data": null
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
The GET request API which can be used to get the links of all the checkout pages associated to a product.
You will need to add the product Id in the API link and fire it.
There is no form data in this call.
In response you will get the plan name, plan code,plan Id and the checkout page link of the plan.
GET https://payments.pabbly.com/api/v1/checkoutpage/{product_id}
{
"status": "success",
"message": "Checkout Page data",
"data": [
{
"plan_active": "true",
"bump_offer": {
"plan_id": null,
"title_label": null,
"tag_line": null,
"description": null
},
"redirect_link": null,
"createdAt": "2019-04-06T05:52:43.598Z",
"updatedAt": "2019-04-06T05:52:43.598Z",
"id": "5ca83eabf195d158746ccc40",
"product_id": "5ca83e33f195d158746ccc3c",
"plan_name": "Diet for bulky",
"plan_code": "diet-for-bulky",
"price": 20,
"billing_period": "",
"billing_period_num": "",
"billing_cycle": "onetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": "With the purchase of Pabbly Hub, you'll get access to -
- Pabbly Subscriptions - 250 Customers (All features)
- FormGet - 3 Forms (All features)
- MailGet - 10K Subscribers limit (All features)
- MailGet Bolt - 10K Subscribers limit (All features)
- InkThemes - ColorWay Sites single domain license
Stack up to increase limits.
",
"checkout_page": "http://payments.pabbly.com/subscribe/5ca83eabf195d158746ccc40/diet-for-bulky"
},
{
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-04-06T05:53:06.460Z",
"updatedAt": "2019-04-06T05:53:06.460Z",
"id": "5ca83ec2f195d158746ccc41",
"product_id": "5ca83e33f195d158746ccc3c",
"plan_name": "Diet plans of lean gainers",
"plan_code": "diet-plans-of-lean-gainers",
"price": 25,
"billing_period": "",
"billing_period_num": "",
"billing_cycle": "onetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": "",
"checkout_page": "http://payments.pabbly.com/subscribe/5ca83ec2f195d158746ccc41/diet-plans-of-lean-gainers"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A very important API for the developers and majorly used in the integration process.
Get the data from the thank you page link.
Example – https://www.inkthemes.com/?hostedpage=8ebdaa43b300805b078e66c014ed8625%3A9f42ed7e8275debf7df823bdd1a6cd070b8c2df97c23ae6bcf3f2d469967cee6ab8e614867af1f57df39449308469cb74051b16b5
Data in bold is the hosted page data
In response you will get the “Success or Failed” and the respective message along with all the important details about the customer and the purchased subscription.
hostedpage | Required Get the data from the thank you page link. |
---|
POST https://payments.pabbly.com/api/v1/verifyhosted
{
"hostedpage": "c9e3330c134941ab88fc7d44a566ffa4:091bf4dc53f6a842f0a5d1efbe91533b38538197d4b90134180f862879db373f62866ad6488112e8965d4df666884608ca16cb547414a9ef4e4fe049e55f81456b9435e7da33e6465707aeb16deb8ce4f5acd8dc533814e58e8c5df2a91417ad6a29c0a2f796a4057d70c782765c642515b414bd2b0f66a196f36043df722d981192336af1c02ee8cea81c56964f8669"
}
{
"status": "success",
"message": "Valid hosted page data",
"data": {
"plan": {
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-02-19T10:59:38.751Z",
"updatedAt": "2019-02-19T10:59:38.751Z",
"id": "5c6be19a44b44833b0c4e59c",
"product_id": "5c6bde9944b44833b0c4e596",
"user_id": "5c6bd93bebdd8a0e8b7ef6c9",
"plan_name": "2 Novel Pack",
"plan_code": "2-novel-pack",
"price": 20,
"billing_period": "m",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": ""
},
"setup_fee": null,
"payment_terms": "",
"currency_symbol": "$",
"payment_method": "5c6ce419b3eb0a4759bf851d",
"taxable": true,
"gateway_type": "stripe",
"custom_fields": [],
"cron_process": "done",
"createdAt": "2019-02-20T05:22:33.683Z",
"updatedAt": "2019-02-20T05:22:33.683Z",
"id": "5c6ce419b3eb0a4759bf851a",
"customer_id": "5c6ce419b3eb0a4759bf8519",
"product_id": "5c6bde9944b44833b0c4e596",
"plan_id": "5c6be19a44b44833b0c4e59c",
"amount": 20,
"email_id": "[email protected]",
"status": "live",
"quantity": 1,
"starts_at": "2019-02-20T05:22:33.333Z",
"activation_date": "2019-02-20T05:22:35.353Z",
"expiry_date": "2119-02-20T05:22:33.333Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "2019-03-20T05:22:35.353Z",
"last_billing_date": "2019-02-20T05:22:35.353Z",
"canceled_date": null
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A GET request API in which you will add the the customer Id in the link.
Like all the GET request API you will not need to add any form data in the links.
In response you will get the details of all the transaction made by this particular customer.
GET https://payments.pabbly.com/api/v1/transactions/{customer_id}
{
"status": "success",
"message": "Transactions data",
"data": [
{
"user_id": "5a4b5db47cfab6872a7feafa",
"type": "payment",
"status": "success",
"amount": "99",
"description": "Payment create",
"transaction": {
"on_test_gateway": true,
"created_at": "2018-01-02T12:16:05Z",
"updated_at": "2018-01-02T12:16:05Z",
"succeeded": true,
"state": "succeeded",
"token": "IPvlssXzEuAMs6cTeZrtvRppbrJ",
"transaction_type": "Purchase",
"order_id": null,
"ip": null,
"description": null,
"email": null,
"merchant_name_descriptor": null,
"merchant_location_descriptor": null,
"gateway_specific_fields": null,
"gateway_specific_response_fields": {},
"gateway_transaction_id": "51",
"gateway_latency_ms": 0,
"amount": 9900,
"currency_code": "USD",
"retain_on_success": false,
"payment_method_added": false,
"message_key": "messages.transaction_succeeded",
"message": "Succeeded!",
"gateway_token": "Pbape1Z3LswxvIbWa23P26Q5x74",
"gateway_type": "test",
"response": {
"success": true,
"message": "Successful purchase",
"avs_code": null,
"avs_message": null,
"cvv_code": null,
"cvv_message": null,
"pending": false,
"result_unknown": false,
"error_code": "",
"error_detail": null,
"cancelled": false,
"fraud_review": null,
"created_at": "2018-01-02T12:16:05Z",
"updated_at": "2018-01-02T12:16:05Z"
},
"shipping_address": {
"name": null,
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"phone_number": null
},
"api_urls": [
{
"referencing_transaction": []
}
],
"payment_method": {
"token": "IVjOg56CBsPn5sse1xRULxUTG6D",
"created_at": "2018-01-02T12:16:05Z",
"updated_at": "2018-01-02T12:16:05Z",
"gateway_type": "test",
"storage_state": "retained",
"third_party_token": "test_vault:4111111111111111",
"payment_method_type": "third_party_token",
"errors": []
}
},
"pcustomer_id": "5a4b776f7cfab6872a7feb06",
"createdAt": "2018-01-02T12:16:05.491Z",
"updatedAt": "2018-01-02T12:16:05.503Z",
"customer_id": "5a4b78053152df337d841348",
"id": "5a4b78053152df337d841347"
},
{
"user_id": "5a4b5db47cfab6872a7feafa",
"customer_id": "5a4b78053152df337d841348",
"type": "invoice",
"status": "paid",
"reference_number": "5a4b78053152df337d84134a",
"amount": "99",
"description": "Invoice paid",
"pcustomer_id": "5a4b776f7cfab6872a7feb06",
"createdAt": "2018-01-02T12:16:05.547Z",
"updatedAt": "2018-01-02T12:16:05.547Z",
"id": "5a4b78053152df337d84134b"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
Another GET request API in which you will add the customer Id in the link.
No need of form data.
And in response you will get the details of all the refunds made to this particular customer.
GET https://payments.pabbly.com/api/v1/refund/{customer_id}
{
"status": "success",
"message": "Refund data",
"data": [
{
"customer_id": "5b02662c7f65100c0c4fbd53",
"subscription_id": "5b02662c7f65100c0c4fbd54",
"invoice_id": "5b0266787f65100c0c4fbd5c",
"plan_id": "5afaaef21dc9a63cbd50c44f",
"product_id": "5afaaecf1dc9a63cbd50c44e",
"type": "refund",
"type_formated": "Refund",
"status": "success",
"status_formatted": "Success",
"amount": 105,
"reference_id": "5b0266797f65100c0c4fbd5e",
"description": "Refund created",
"gateway_type": "Stripe",
"createdAt": "2018-05-21T06:36:22.004Z",
"updatedAt": "2018-05-21T06:36:22.004Z",
"id": "5b0268e67f65100c0c4fbd61"
},
{
"customer_id": "5b02662c7f65100c0c4fbd53",
"subscription_id": "5b02662c7f65100c0c4fbd54",
"invoice_id": "5b02665a7f65100c0c4fbd59",
"plan_id": "5afaaef21dc9a63cbd50c44f",
"product_id": "5afaaecf1dc9a63cbd50c44e",
"type": "refund",
"type_formated": "Refund",
"status": "success",
"status_formatted": "Success",
"amount": 60,
"reference_id": "5b02665b7f65100c0c4fbd5b",
"description": "Refund created",
"gateway_type": "Stripe",
"createdAt": "2018-05-21T06:36:41.312Z",
"updatedAt": "2018-05-21T06:36:41.312Z",
"id": "5b0268f97f65100c0c4fbd62"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API is used to create the portal session and generate get the signin link of the client portal.
This link can be passed to the customer so that they can login directly into the account.
A POST request API which is fired with the customer Id in the form data.
In response you will get the access URL and the other details like create date, and token Id.
customer_id | Required Customer Id for which you want to generate the portal session |
---|
POST https://payments.pabbly.com/api/v1/portal_sessions/
{
"customer_id":"5d89f6555a08b235d8365c10",
"redirect_url":"https://www.pabbly.com/"
}
{
"status": "success",
"message": "Portal token created successfully",
"data": {
"token": "$2a$10$Vel9B9FMpmY2LhEgslgu/OzLy56SBqK8dK745J18CAL8comddS1oS",
"status": "created",
"customer_id": "5b59717ef3d917676e219db1",
"access_url": "http://localhost:5000/portal/access/magnetbrains?tk=$2a$10$Vel9B9FMpmY2LhEgslgu/OzLy56SBqK8dK745J18CAL8comddS1oS",
"expires_at": "2018-07-29T12:15:44.444Z",
"createdAt": "2018-07-28T12:15:44.323Z",
"updatedAt": "2018-07-28T12:15:44.323Z",
"id": "5b5c5e70d98aa73767aa8e1b"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A POST request API by which you can get the stats of dashboard like total sales, total refund, recurring amount and so on.
In response you can get all the stats which is shown on the dashboard of your Pabbly Subscriptions account.
product_id | Required Get the stats product wise or for all products. |
---|---|
interval | Required Fill the interval for States like last_30_days, this_week and so on. |
POST https://payments.pabbly.com/api/v1/getdashboardstats/
{
"product_id":"5b83a91d7e47a82380e45002", //all
"interval":"last_30_days", //this_week/previous_month
}
{
"total_sales": "390.00",
"subscription_count": 14,
"total_refund": 0,
"total_subscription_count": 14,
"total_cancel": 0,
"rebills": "140.00",
"rebills_count": 14
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
Another POST request API which can be fired with the same form data as the “Create dashboard stats”. That means you need to add product Id and the interval and fire the API.
In response you will get the sales stats for this particular product. You can get the details of all the customer who has purchased the plans of this product.
product_id | Required Get the stats product wise or for all products. |
---|---|
interval | Required Fill the interval for States like last_30_days, this_week and so on. |
POST https://payments.pabbly.com/api/v1/revenuetransaction/
{
"product_id":"5b83a91d7e47a82380e45002", //all
"interval":"last_30_days", //this_week/previous_month
}
[
{
"amount": 47.5,
"created_at": "2019-02-20T12:38:05.921Z",
"type": "invoice",
"status": "paid",
"reference_id": "INV-304",
"first_name": "Andrew",
"last_name": "Pang",
"email_id": "[email protected]"
},
{
"amount": 23.75,
"created_at": "2019-02-20T12:34:43.687Z",
"type": "invoice",
"status": "paid",
"reference_id": "INV-303",
"first_name": "Philip",
"last_name": "Chan",
"email_id": "[email protected]"
},
{
"amount": 100,
"created_at": "2019-02-15T10:39:17.206Z",
"type": "invoice",
"status": "paid",
"reference_id": "INV-293",
"first_name": "James",
"last_name": "Rocker",
"email_id": "[email protected]"
},
{
"amount": 50,
"created_at": "2019-02-15T10:38:45.398Z",
"type": "invoice",
"status": "paid",
"reference_id": "INV-292",
"first_name": "Ayobi",
"last_name": "Ray",
"email_id": "[email protected]"
}
]
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A POST request API in which you will add the Product Id and the days interval in the form data.
In response you will get the details of all the customer whose recurring billing is going to occur in the selected interval.
product_id | Required Get the stats product wise or for all products. |
---|---|
interval | Required Fill the interval for States like last_30_days, this_week and so on. |
POST https://payments.pabbly.com/api/v1/mrrsubscription/
{
"product_id":"5b83a91d7e47a82380e45002", //all
"interval":"last_30_days", //this_week/previous_month
}
[
{
"created_at": "2019-02-20T12:38:05.797Z",
"status": "live",
"first_name": "Andrew",
"last_name": "Pang",
"email_id": "[email protected]",
"total_amount": 45
},
{
"created_at": "2019-02-15T10:39:17.175Z",
"status": "live",
"first_name": "James",
"last_name": "Rocker",
"email_id": "[email protected]",
"total_amount": 100
},
{
"created_at": "2019-02-15T10:38:45.366Z",
"status": "live",
"first_name": "Ayobi",
"last_name": "Ray",
"email_id": "[email protected]",
"total_amount": 50
},
{
"created_at": "2019-02-15T10:38:11.536Z",
"status": "live",
"first_name": "Philip",
"last_name": "Chan",
"email_id": "[email protected]",
"total_amount": 50
}
]
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
A GET request API in which you will need to add the plan Id in the link and fire it.
In response you will get the details of the added custom fields in this plan.
GET http://payments.pabbly.com/api/v1/customfields/plan_id
{
"status": "success",
"message": "custom_fields",
"data": [
{
"type": "number",
"label": "Phone Number",
"name": "phone_number",
"required": false
},
{
"type": "select",
"label": "Additional Magazines",
"name": "additional_magazines",
"options": [
{
"value": "Weekly Magazine",
"value_label": "Weekly Magazine"
},
{
"value": "Monthly Magazine",
"value_label": "Monthly Magazine"
}
],
"required": false
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API can be used to add custom fields in a particular subscription.
It will be fired with PUT request.
subscription_id will be added in Request URL.
In response you will get Success status and the plan checkout page will be updated with the custom fields.
plan_id | Required Plan Id assigned in this subscription |
---|---|
customer_id | Required Unique Id of this customer. |
payment_term | Optional Can be net 0, net 45 and so on. |
activated_at_val | Optional Can be immediately or on next_renewal. |
Custom Field | Optional Phone number and additional_magazines in the form data are custom fields. You can add fileds according to your needs. |
PUT https://payments.pabbly.com/api/v1/subscription/:subscription_id/update
{
"plan_id": "5a7b12c0f2c1ed4c26e05247",
"customer_id": "5a7b12c0f225sd4c26e05247",
"payment_term": "net0",
"activated_at_val": "immediately",
"phone_number":"7852416589",
"additional_magazines":"Weekly Magazine"
}
{
"status": "success",
"message": "Subscription activated.",
"data": {
"customer": {
"company_name": "InkThemes",
"billing_address": {
"street1": "936 Tibbs Avenue",
"city": "Ekalaka",
"state": "MT",
"zip_code": "59324",
"country": "US"
},
"shipping_address": {},
"portal_status": true,
"createdAt": "2019-05-17T12:23:42.404Z",
"updatedAt": "2019-05-17T12:23:42.430Z",
"id": "5cdea7cebf45c542d4238a1d",
"first_name": "Lance",
"last_name": "Crews",
"email_id": "[email protected]"
},
"subscription": {
"plan": {
"plan_active": "true",
"bump_offer": {},
"createdAt": "2019-04-19T10:46:59.855Z",
"updatedAt": "2019-04-19T10:46:59.855Z",
"id": "5cb9a723b1b68a4f476f1d85",
"product_id": "5cb9a705b1b68a4f476f1d83",
"user_id": "5b716c5a5dfff7797d9cd81e",
"plan_name": "Weekly Plan",
"plan_code": "weekly-plan",
"price": 20,
"billing_period": "w",
"billing_period_num": "1",
"billing_cycle": "lifetime",
"billing_cycle_num": null,
"trial_period": 0,
"setup_fee": 0,
"plan_description": ""
},
"setup_fee": null,
"payment_terms": "net15",
"currency_symbol": "$",
"payment_method": "offline",
"taxable": true,
"gateway_type": "paypal",
"gateway_id": "5ccfd9fdd49e3716e0e50778",
"custom_fields": [
{
"type": "textarea",
"label": "Text Area",
"value": "Weekly Magazine"
},
{
"type": "number",
"label": "Number",
"value": "7854215263"
},
{
"type": "radio",
"label": "Gender",
"value": "Female"
},
{
"type": "file",
"label": "Upload Your File",
"value": "customfield/files/2019/5/10UmIZBPcOvC-1558095819-PabblyLogo1.png"
}
],
"billing_agreement_id": "I-49TDDK704K7E",
"cron_process": "done",
"coupon": {
"discount_amount": 0
},
"createdAt": "2019-05-17T12:23:42.417Z",
"updatedAt": "2019-05-17T12:23:42.417Z",
"id": "5cdea7cebf45c542d4238a1e",
"customer_id": "5cdea7cebf45c542d4238a1d",
"product_id": "5cb9a705b1b68a4f476f1d83",
"plan_id": "5cb9a723b1b68a4f476f1d85",
"amount": 20,
"email_id": "[email protected]",
"status": "live",
"quantity": 1,
"starts_at": "2019-05-18T07:31:10.101Z",
"activation_date": "2019-05-18T07:31:10.101Z",
"expiry_date": "2019-06-18T07:31:10.101Z",
"trial_days": 0,
"trial_expiry_date": "",
"next_billing_date": "2019-06-18T07:31:10.101Z",
"last_billing_date": "2019-05-17T12:24:29.292Z",
"canceled_date": null
},
"invoice": {
"invoice_id": "INV-461",
"quantity": 1,
"product_id": "5cb9a705b1b68a4f476f1d83",
"setup_fee": 0,
"currency_symbol": "$",
"coupon": {
"discount_amount": 0
},
"credit_note": {
"status": "success",
"new_plan_total": 20,
"current_plan_total": 10,
"used_amount": 0,
"update_type": "upgrade",
"credit_applied": [
{
"id": "5cdfb4bea338cf6317a43f2b",
"amount": 10
}
]
},
"createdAt": "2019-05-18T07:31:10.609Z",
"updatedAt": "2019-05-18T07:31:10.835Z",
"id": "5cdfb4bea338cf6317a43f2d",
"customer_id": "5cdea7cebf45c542d4238a1d",
"subscription_id": "5cdea7cebf45c542d4238a1e",
"status": "sent",
"payment_term": "net15",
"amount": 20,
"due_amount": 10,
"due_date": "2019-06-02T07:31:10.101Z",
"plan_id": [
"5cb9a723b1b68a4f476f1d85"
]
}
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API can be used to add Add-ons in a plan.
This request will be fired with POST request and you will add the plan ID in the API link.
In form data you will need to add the billing cycle and details about the add-on and fire the API.
In response you will get the details of the added add-on along with the add-on Id.
POST https://payments.pabbly.com/api/v1/addon/:product_id
{
"billing_period": "m",
"billing_cycle": "lifetime",
"status": "true",
"associate_plans": "selected_plans",
"billing_period_num": 1,
"category_array": ["5cfdef689ca9a5206ccfcd75"],
"code": "extra-5gb-data",
"name": "Extra 5GB Data",
"price": 10,
"plans_array": ["5d03504ad58b3256507e08bd","5cfa546a22f7d918a4dca2f6"],
"description": "By adding this addon, you'll get extra 5GB data
",
"product_id": "5cefbd220114341f14ebebee"
}
{
"status": "success",
"message": "Addon Created Successfully",
"data": {
"billing_period": "m",
"category_array": [
"5cfdef689ca9a5206ccfcd75"
],
"createdAt": "2019-06-20T07:51:15.488Z",
"updatedAt": "2019-06-20T07:51:15.488Z",
"id": "5d0b3af3e5737c07e424cef0",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"name": "Extra 5GB Data",
"code": "extra-5gb-data",
"price": 10,
"billing_cycle": "lifetime",
"status": true,
"associate_plans": "selected_plans",
"plans_array": [
"5d03504ad58b3256507e08bd",
"5cfa546a22f7d918a4dca2f6"
],
"description": "By adding this addon, you'll get extra 5GB data
"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API can be used to get the details of a single add-on.
The request is fired on GET along with the add-on id in the API link.
In response you will get all the details related to that particular add-on.
PUT https://payments.pabbly.com/api/v1/addon/:addon_id
{
"status": "success",
"message": "Addon data",
"data": {
"billing_period": "m",
"category_array": [
"5cfdef689ca9a5206ccfcd75",
"5cfdef719ca9a5206ccfcd76"
],
"createdAt": "2019-06-11T11:46:26.206Z",
"updatedAt": "2019-06-11T11:46:26.206Z",
"id": "5cff94928695012afc5c1663",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"name": "Extra 5GB Data",
"code": "extra-5gb-data",
"price": 20,
"billing_cycle": "lifetime",
"status": false,
"associate_plans": "all_plans",
"plans_array": null,
"description": ""
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
By this API you can get the details of all the ad-on related to a particular product.
The API will be fired in GET request along with the product Id in the API link.
In response you will get the details of all the added add-ons of that particular product.
GET https://payments.pabbly.com/api/v1/addons/:product_id
{
"status": "success",
"message": "Addons data",
"data": [
{
"billing_period": "w",
"category_array": [
"5cfdef689ca9a5206ccfcd75"
],
"createdAt": "2019-06-10T05:58:23.061Z",
"updatedAt": "2019-06-10T05:58:23.061Z",
"id": "5cfdf17f9ca9a5206ccfcd78",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"name": "addon weekly",
"code": "addon-weekly",
"price": 10,
"billing_cycle": "lifetime",
"status": true,
"associate_plans": "all_plans",
"plans_array": null,
"description": "",
"category_list": [
{
"category_code": "addon category 1",
"createdAt": "2019-06-10T05:49:28.627Z",
"updatedAt": "2019-06-10T05:49:28.627Z",
"id": "5cfdef689ca9a5206ccfcd75",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"category_name": "Addon Category 1"
}
]
},
{
"billing_period": "m",
"category_array": [
"5cfdef689ca9a5206ccfcd75",
"5cfdef719ca9a5206ccfcd76"
],
"createdAt": "2019-06-11T11:46:26.206Z",
"updatedAt": "2019-06-11T11:46:26.206Z",
"id": "5cff94928695012afc5c1663",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"name": "Extra 5GB Data",
"code": "extra-5gb-data",
"price": 20,
"billing_cycle": "lifetime",
"status": false,
"associate_plans": "all_plans",
"plans_array": null,
"description": "",
"category_list": [
{
"category_code": "addon category 1",
"createdAt": "2019-06-10T05:49:28.627Z",
"updatedAt": "2019-06-10T05:49:28.627Z",
"id": "5cfdef689ca9a5206ccfcd75",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"category_name": "Addon Category 1"
},
{
"category_code": "addon category 2",
"createdAt": "2019-06-10T05:49:37.691Z",
"updatedAt": "2019-06-10T05:49:37.691Z",
"id": "5cfdef719ca9a5206ccfcd76",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"category_name": "Addon Category 2"
}
]
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API can be used to update the details of an existing add-on.
The API will be fired with PUT request along with the add-on Id in the API link.
In the form data you will add all the new details for the add-on and fire it.
In response you will get the update details of the existing add-on on the same add-on Id.
PUT https://payments.pabbly.com/api/v1/addon/:addon_id
{
"name": "Addon 5",
"code": "addon-5",
"price": 20,
"category_array": [ "5cfdef689ca9a5206ccfcd75", "5cfdef719ca9a5206ccfcd76" ],
"status": true,
"associate_plans": "all_plans",
"billing_cycle": "lifetime",
"billing_period": "m",
"billing_period_num": 1,
"description": "",
"plans_array": null,
"product_id": "5cefbd220114341f14ebebee",
"addon_id": "5cff94928695012afc5c1663"
}
{
"status": "success",
"message": "Addon Updated Successfully",
"data": {
"billing_period": "m",
"category_array": [
"5cfdef689ca9a5206ccfcd75",
"5cfdef719ca9a5206ccfcd76"
],
"createdAt": "2019-06-11T11:46:26.206Z",
"updatedAt": "2019-06-11T11:46:26.206Z",
"id": "5cff94928695012afc5c1663",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"name": "Extra 5GB Data",
"code": "extra-5gb-data",
"price": 20,
"billing_cycle": "lifetime",
"status": false,
"associate_plans": "all_plans",
"plans_array": null,
"description": ""
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API can be used to delete the add-on.
The API will be fired with DELETE request along with the add-on Id in the API link.
In response you will get the successful message of delete Addon.
DELETE https://payments.pabbly.com/api/v1/addon/:addon_id
{
"status": "success",
"message": "Addon deleted successfully"
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
You can use this API when you want to create a category for the added add-ons.
The API will be fired in POST request and in the form data you will need to add the category name and product Id.
In response a category will be created which you can add in the add-on.
POST https://payments.pabbly.com/api/v1/addoncategory
{
"category_name": "Addon Category 5",
"product_id": "5cefbd220114341f14ebebee"
}
{
"status": "success",
"message": "Category Created",
"data": "Category Created"
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
By this API you can get the details of any particular categories.
The API will be fired in get request along with the category Id in the link.
In response you will get the details of that particular category.
GET https://payments.pabbly.com/api/v1/addoncategory/:category_id
{
"status": "success",
"message": "Addon category",
"data": {
"category_code": "extra-data",
"createdAt": "2019-06-10T05:49:37.691Z",
"updatedAt": "2019-06-10T05:49:37.691Z",
"id": "5cfdef719ca9a5206ccfcd76",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"category_name": "Extra Data"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
By this API you can get the list of all the available categories in a single product.
The API will be fired in GET request along with the product Id in the link.
In response you will get the details of all the categories added in that particular product.
GET https://payments.pabbly.com/api/v1/addonlistcategory/:product_id
{
"status": "success",
"message": "Addon category list",
"data": [
{
"id": "5cfdef689ca9a5206ccfcd75",
"category_name": "Email Marketing"
},
{
"id": "5cfdef719ca9a5206ccfcd76",
"category_name": "Subscription Management"
},
{
"id": "5d020a6fdea0113458a85c7a",
"category_name": "WordPress Themes"
},
{
"id": "5d0b5c51edd43d02349e3a99",
"category_name": "Addon Category 4"
},
{
"id": "5d0b63a2edd43d02349e3a9a",
"category_name": "Email Verification"
}
]
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API can be used if you want to update the name of any existing category.
It will be fired in the PUT request along with the category Id in the link.
In the form data you will add the new name -> which you want to assign to that category and fire it.
In response you will get the success message of the updated category.
PUT https://payments.pabbly.com/api/v1/addoncategory/:category_id
{
"category_name": "Subscription Management"
}
{
"status": "success",
"message": "Category Updated",
"data": {
"category_code": "subscription-management",
"createdAt": "2019-06-10T05:49:37.691Z",
"updatedAt": "2019-06-10T05:49:37.691Z",
"id": "5cfdef719ca9a5206ccfcd76",
"product_id": "5cefbd220114341f14ebebee",
"user_id": "5ac2096ec57c2c5107dea058",
"category_name": "Subscription Management"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API can be used if you want to delete the addon category.
It will be fired in the DELETE request along with the category Id in the link.
In response you will get the success message of the delete addon category.
DELETE https://payments.pabbly.com/api/v1/addoncategory/:category_id
{
"status": "success",
"message": "Addon category deleted successfully"
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
This API can be used if you create the license using the form data.
It will be fired in the POST request along with the required data.
In response you will get the success message of the create License.
POST https://payments.pabbly.com/api/v1/products/{product_id}/licenses
{
"name":"Pabbly connect",
"plan_id":"5fe444b28f28a70a9f1a125d",
"method":"list",/* method will be list or auto*/
"license_codes":"FIRSTCODE\nSECONDCODE\nTHIRDCODE",
"status":"active"
}
{
"status": "success",
"message": "License is created successfully",
"data": {
"createdAt": "2021-01-27T09:46:32.359Z",
"updatedAt": "2021-01-27T09:46:32.359Z",
"id": "60113678f75d510fc027f4ce",
"product_id": "5fe444a38f28a70a9f1a125c",
"name": "Pabbly connect",
"method": "list",
"license_codes": "FIRSTCODE\nSECONDCODE\nTHIRDCODE",
"plan_id": "5fe444b28f28a70a9f1a125d",
"status": "active"
}
}
Authorization Type : Basic auth
User Name : apikey
Password : secretkey
Fire the link with PUT request and fill the following details in from data.
If the response status is success then a license code will be generated for that customer.
PUT https://payments.pabbly.com/api/v1/products/{product_id}/licenses/{license_id}
{
"name":"Pabbly connect",
"plan_id":"5fe444b28f28a70a9f1a125d",
"method":"list",
"license_codes":"FIRSTCODE\nSECONDCODE\nTHIRDCODE\nFOURTHCODE",
"status":"active"
}
{
"status": "success",
"message": "License is created successfully",
"data": {
"createdAt": "2021-01-27T09:46:32.359Z",
"updatedAt": "2021-01-27T09:46:32.359Z",
"id": "60113678f75d510fc027f4ce",
"product_id": "5fe444a38f28a70a9f1a125c",
"name": "Pabbly connect",
"method": "list",
"license_codes": "FIRSTCODE\nSECONDCODE\nTHIRDCODE",
"plan_id": "5fe444b28f28a70a9f1a125d",
"status": "active"
}
}