API Documentation
Paytring Checkout Payment
Merchant Hosted Checkout Payment
Subscription Management
Payout Management
Settlement Management
Vendor Management
Subscription Management
Create Subscription
POST
/
api
/
v1
/
subscription
/
create
Copy
curl --request POST \
--url https://api.paytring.com/api/v1/subscription/create \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"pg": "<string>",
"pg_pool_id": "<string>",
"callback_url": "<string>",
"cname": "<string>",
"email": "<string>",
"phone": "<string>",
"initial_amount": "<string>",
"plan_id": "<string>",
"mer_reference_id": "<string>",
"hash": "<string>",
"notes": {
"udf1": "<string>",
"udf2": "<string>",
"udf3": "<string>",
"udf4": "<string>",
"udf5": "<string>"
},
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": 123,
"country": "<string>",
"phone": "<string>",
"firstname": "<string>",
"lastname": "<string>"
},
"shipping_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": 123,
"country": "<string>",
"phone": "<string>",
"firstname": "<string>",
"lastname": "<string>"
}
}'
Copy
"{}"
This API is used to create a new subscription for a customer.
Request Body
Copy
{
"customer_id": "string", // ID of the customer
"plan_id": "string", // ID of the subscription plan
"start_date": "string", // Start date of the subscription
"hash": "string" // Calculated hash for request validation
}
Responses
200 OK
Copy
{
"status": true,
"subscription_id": "string",
"message": "Subscription created successfully"
}
400 Bad Request
Copy
{
"status": false,
"error": {
"message": "Invalid request",
"code": 400
}
}
Body
application/json
Response
200
application/json
200
The response is of type object
.
Copy
curl --request POST \
--url https://api.paytring.com/api/v1/subscription/create \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"pg": "<string>",
"pg_pool_id": "<string>",
"callback_url": "<string>",
"cname": "<string>",
"email": "<string>",
"phone": "<string>",
"initial_amount": "<string>",
"plan_id": "<string>",
"mer_reference_id": "<string>",
"hash": "<string>",
"notes": {
"udf1": "<string>",
"udf2": "<string>",
"udf3": "<string>",
"udf4": "<string>",
"udf5": "<string>"
},
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": 123,
"country": "<string>",
"phone": "<string>",
"firstname": "<string>",
"lastname": "<string>"
},
"shipping_address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": 123,
"country": "<string>",
"phone": "<string>",
"firstname": "<string>",
"lastname": "<string>"
}
}'
Copy
"{}"
Assistant
Responses are generated using AI and may contain mistakes.