# Request OTP Purchase

### Endpoint

| Environment | Method | URL                                                                  |
| ----------- | ------ | -------------------------------------------------------------------- |
| Development | POST   | <https://devo.finnet.co.id/pg/payment/card/directdebit/purchase/otp> |
| Production  | POST   | <https://live.finnet.co.id/pg/payment/card/directdebit/purchase/otp> |

### Body Request

Content-Type: `application/json`.

| No | Name                    | Type   | Mandatory | Description                                  |
| -- | ----------------------- | ------ | --------- | -------------------------------------------- |
| 1  | sourceOfFunds           | Object | M         | Funding source configuration.                |
| 2  | sourceOfFunds.type      | String | M         | Value for Mandiri Direct Debit: `ddmandiri`. |
| 3  | sourceOfFunds.accountId | String | M         | Mandiri Direct Debit account token.          |

#### Sample Request

```json
{
  "sourceOfFunds": {
    "type": "ddmandiri",
    "accountId": "1B69E74FE55FECDE80F58404CE22F2CB"
  }
}
```

### Body Response

| No | Name            | Type                                                              | Mandatory | Description                             |
| -- | --------------- | ----------------------------------------------------------------- | --------- | --------------------------------------- |
| 1  | responseCode    | [Enum](/api-reference/appendix/enumeration/response-code-list.md) | M         | Response Code.                          |
| 2  | responseMessage | String                                                            | M         | Response Message.                       |
| 4  | processingTime  | Number                                                            | M         | Processing time.                        |
| 5  | traceId         | String                                                            | M         | Trace ID for debugging/troubleshooting. |

#### Sample Response

```json
{
  "responseCode": "2000000",
  "responseMessage": "Request has been processed successfully",
  "processingTime": 0.04789113998413086,
  "traceId": "a420b67f-87ce-46c9-a2c1-ce2f5128f02b"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.finpay.id/api-reference/finpay-pg/copy-of-core-api/direct-debit/mandiri/request-otp-purchase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
