Skip to main content
POST
/
api
/
v1
/
subscription
/
plan
/
fetch
Fetch Plan
curl --request POST \
  --url https://api.paytring.com/api/v1/subscription/plan/fetch \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>",
  "id": "<string>",
  "hash": "<string>"
}
'
"{}"

Documentation Index

Fetch the complete documentation index at: https://docs.paytring.com/llms.txt

Use this file to discover all available pages before exploring further.

This API is used to fetch details of a subscription plan.

Request Body

{
  "plan_id": "string", // ID of the subscription plan to fetch
  "hash": "string" // Calculated hash for request validation
}

Responses

200 OK

{
  "status": true,
  "plan": {
    "id": "string",
    "name": "string",
    "amount": "integer",
    "currency": "string",
    "interval": "string"
  },
  "message": "Plan fetched successfully"
}

400 Bad Request

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

Body

application/json
key
string
required

Merchant key, available in dashboard profile section

id
string
required

Plan id provided by paytring.

hash
string
required

to be calculated by key sort of all non-object key values of this request

Response

200

The response is of type object.