POST
/
api
/
v1
/
subscription
/
plan
/
create
curl --request POST \
  --url https://api.paytring.com/api/v1/subscription/plan/create \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<string>",
  "description": "<string>",
  "amount": "<string>",
  "currency": "<string>",
  "frequency": 123,
  "key": "<string>",
  "mer_reference_id": "<string>",
  "hash": "<string>",
  "notes": {
    "udf1": "<string>",
    "udf2": "<string>",
    "udf3": "<string>",
    "udf4": "<string>",
    "udf5": "<string>"
  },
  "cycle": 12
}'
"{}"

This API is used to create a subscription plan.

Request Body

{
  "name": "string", // Name of the subscription plan
  "amount": "integer", // Amount in cents/paisa
  "currency": "string", // Currency code (e.g., USD, INR)
  "interval": "string", // Billing interval (e.g., monthly, yearly)
  "hash": "string" // Calculated hash for request validation
}

Responses

200 OK

{
  "status": true,
  "plan_id": "string",
  "message": "Plan created successfully"
}

400 Bad Request

{
  "status": false,
  "error": {
    "message": "Invalid request",
    "code": 400
  }
}

Body

application/json

Response

200
application/json

200

The response is of type object.