POST
/
api
/
v2
/
subscription
/
adhoc
curl --request POST \
  --url https://api.paytring.com/api/v2/subscription/adhoc \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "id": "<string>",
  "amount": "<string>",
  "currency": "<string>",
  "hash": "<string>"
}'
"{\n    \"status\": true,\n    \"transaction\": {\n        \"id\": \"7027355691xxx\",\n        \"amount\": 200,\n        \"currency\": \"SGD\",\n        \"status\": \"success\",\n        \"payment_attempt_at\": \"2023-11-28T06:58:23.000000Z\"\n    },\n    \"request_id\": \"674814xxxxx560\"\n}"

This API is used to charge end users’ accounts as per merchant needs in case of standing instructions (SI).

Request Body

{
  "key": "string", // Merchant key
  "id": "string", // Subscription ID
  "amount": "string", // Amount in cents/paisa
  "currency": "string", // 3-character currency code
  "hash": "string" // Calculated hash for request validation
}

Responses

200 OK

{
  "status": true,
  "transaction": {
    "id": "string",
    "amount": 200,
    "currency": "SGD",
    "status": "success",
    "payment_attempt_at": "string"
  },
  "request_id": "string"
}

400 Bad Request

{
  "status": false,
  "error": {
    "message": "string",
    "code": 400
  }
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
key
string
required
id
string
required

subscription id

amount
string
required

in cents / paisa

currency
string
required

3 char currency code , insure it as subscription currency

hash
string
required

Response

200
application/json
200
status
boolean
default:true
Example:

true

transaction
object
request_id
string
Example:

"674814xxxxx560"