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>"
}
}'
"{}"
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>"
}
}'
"{}"
{
"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
}
{
"status": true,
"subscription_id": "string",
"message": "Subscription created successfully"
}
{
"status": false,
"error": {
"message": "Invalid request",
"code": 400
}
}
200
The response is of type object
.