cURL
curl --request POST \ --url https://api.paytring.com/api/v1/subscription/plan/fetch \ --header 'Authorization: Basic <encoded-value>' \ --header 'Content-Type: application/json' \ --data ' { "key": "<string>", "id": "<string>", "hash": "<string>" } '
{}
{ "plan_id": "string", // ID of the subscription plan to fetch "hash": "string" // Calculated hash for request validation }
{ "status": true, "plan": { "id": "string", "name": "string", "amount": "integer", "currency": "string", "interval": "string" }, "message": "Plan fetched successfully" }
{ "status": false, "error": { "message": "Invalid request", "code": 400 } }
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Basic <encoded-value>
<encoded-value>
username:password
Merchant key, available in dashboard profile section
Plan id provided by paytring.
to be calculated by key sort of all non-object key values of this request
200
The response is of type object.
object