Process Payment - Subscriptions

This page will help you get started with Process Payment - Subscriptions.

Use the below endpoint to Process Payment for Subscriptions

Request Parameters:

AttributeparamsNested ParamsData TypeDescription
merchantId*stringOnboarded Merchant ID
clientUniqueReference*stringunique reference number assigned to a merchant
enableNotificationfalse/truebooleandefault false
plan*{}plan details
planIdstringrequired if its plural maintained plan
merchantMaintainedPlanbooleanfalse: if its plural maintained plan true: if its merchant maintained plan
merchantPlanIdstring
merchantIdstring
planNamestring
planDescriptionstring
frequencystring
frequencyTypestring
maxUsersstring
notesstring
amount
valueintegervalue given in numbers
currencystringwhich currency used for transaction: INR
maxLimitAmount
valueintegervalue given in numbers
currencystringwhich currency used for transaction: INR
trialPeriodInDaysinteger
startDatestring(UTC format date time example: 2023-02-06 18:30:00)stringstart date of the plan 2023-02-06 18:30:00
endDatestring(UTC format date time example: 2023-02-06 18:30:00)stringend date of the plan 2023-02-06 18:30:00
quantity*number of subscription needed
default is 1
integernumber of subscription needed
startDate*startDatestring(UTC format example: 2023-02-06 18:30:00)stringstart date of subscription 2023-02-06 18:30:00
endDate*endDatestring(UTC format date time example: 2023-02-06 18:30:00)stringend date of subscription
customerData*{}
firstNamestringforst name of the customer
lastNamestringlast name of the customer
countryCode*stringfor india its 91, phone country code
customerMobile*stringcustomer mobile number to send any notification
customerEmail*stringemail to send any notification
autoDebitdefault truebooleanwhether auto-debit opted or not
upi_data*{}
txnMode: "C/I""stringcustomer upi id I:INTENT vpa will not be needed C: COLLECT vpa will be needed
payments{}
amountLimitstring
debitDayintegerwhich day debit should happen, default:1
debitRulestringdefault is ON
blockFundstringshould customer blocked for this customer.default: N

Request Body payload:

{
	"merchantId": "3000004",
	"clientUniqueReference": "Merchant_Plan_001",
	"enableNotification": true,
	"plan": {
		"planId": "",
		"merchantMaintainedPlan": false,		
		"merchantPlanId": "merch007",
		"merchantId": "3004",
		"planName": "MPPlanDayNT",
		"planDescription": "Merchant Maintained Plan feb 06 ",
		"frequency": 1,
		"frequencyType": "Day",
		"maxUsers": "100",
		"notes": "Sample message",
		"amount": {
			"value": 220,
			"currency": "INR"
		},
		"maxLimitAmount": {
			"value": 220,
			"currency": "INR"
		},
		"trialPeriodInDays": 0,
		"startDate": "2023-02-06 18:30:00",
		"endDate": "2023-02-10 18:30:00"
	},
	"quantity": 1,
	"startDate": "2023-02-06 18:30:00",
	"endDate": "2023-02-10 18:30:00",
	"customerData": {
		"firstName": "Dhakshin",
		"lastName": "K",
		"countryCode": "91",
		"customerMobile": "9444600695",
		"customerEmail": "[email protected]"
	},
	"autoDebit": true,
	"upi_data": {
		"vpa": "dhakshin@okaxis"
	},
	"payments": {
		"amountLimit": "M",
		"debitDay": 1,
		"debitRule": "ON",
		"blockFund": "N"
	}
}

Response Payload:

{
	"response_code": "1",
	"response_message": "Transaction initiated",
	"merchant_order_id": "3565203",
	"order_id": 3565203,
	"subscription_id": "130",
	"plan_id": "17"
}
{
    "response_code": 12404,
    "response_message": "Create subscription failed"
}
{    "response_code": 12408,  
     "response_message": "Invalid Upi Details"
}

Response Parameters

Parameter NameTypeDescription
response_codestringresponse code received
response_messagestringShort message about code.
subscription_idstringcreated subscription id on successful scenario
plan_idstringid captured while processing the payment
Language
Click Try It! to start a request and see the response here!