> ## 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.

# ADHOC Charge

> in case of an SI ( standing Instructions ) this api can be used to charge end users accounts as per merchant needs.

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

### Request Body

```json theme={null}
{
  "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

```json theme={null}
{
  "status": true,
  "transaction": {
    "id": "string",
    "amount": 200,
    "currency": "SGD",
    "status": "success",
    "payment_attempt_at": "string"
  },
  "request_id": "string"
}
```

#### 400 Bad Request

```json theme={null}
{
  "status": false,
  "error": {
    "message": "string",
    "code": 400
  }
}
```


## OpenAPI

````yaml POST /api/v2/subscription/adhoc
openapi: 3.1.0
info:
  title: Orchestration
  version: '1'
servers:
  - url: https://api.paytring.com
security:
  - sec0: []
paths:
  /api/v2/subscription/adhoc:
    post:
      summary: ADHOC Charge
      description: >-
        in case of an SI ( standing Instructions ) this api can be used to
        charge end users accounts as per merchant needs.
      operationId: adhoc-charge
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - key
                - id
                - amount
                - currency
                - hash
              properties:
                key:
                  type: string
                id:
                  type: string
                  description: subscription id
                amount:
                  type: string
                  description: in cents / paisa
                currency:
                  type: string
                  description: 3 char currency code , insure it as subscription currency
                hash:
                  type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "status": true,
                        "transaction": {
                            "id": "7027355691xxx",
                            "amount": 200,
                            "currency": "SGD",
                            "status": "success",
                            "payment_attempt_at": "2023-11-28T06:58:23.000000Z"
                        },
                        "request_id": "674814xxxxx560"
                    }
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: true
                    default: true
                  transaction:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 7027355691xxx
                      amount:
                        type: integer
                        example: 200
                        default: 0
                      currency:
                        type: string
                        example: SGD
                      status:
                        type: string
                        example: success
                      payment_attempt_at:
                        type: string
                        example: '2023-11-28T06:58:23.000000Z'
                  request_id:
                    type: string
                    example: 674814xxxxx560
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````