# Purchase OTP verification

Verify OTP for a Direct Debit BRI purchase.

Send the same payload as purchase initiation, plus OTP fields in `order`.

### Endpoint

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

### Body Request

<table><thead><tr><th width="79" data-type="number">No</th><th>Name</th><th>Type</th><th>Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>customer</td><td>object</td><td>M</td><td>Customer identity and contact details.</td></tr><tr><td>2</td><td>customer.email</td><td>string</td><td>M</td><td></td></tr><tr><td>3</td><td>customer.firstName</td><td>string</td><td>M</td><td></td></tr><tr><td>4</td><td>customer.lastName</td><td>string</td><td>M</td><td></td></tr><tr><td>5</td><td>customer.mobilePhone</td><td>string</td><td>M</td><td>Use international format (example: <code>+628...</code>).</td></tr><tr><td>6</td><td>order</td><td>object</td><td>M</td><td>Order details.</td></tr><tr><td>7</td><td>order.id</td><td>string</td><td>M</td><td>Unique order ID from your system.</td></tr><tr><td>8</td><td>order.amount</td><td>string</td><td>M</td><td>Amount as string (example: <code>"1000"</code>).</td></tr><tr><td>9</td><td>order.currency</td><td>string</td><td>M</td><td>Currency code (example: <code>IDR</code>).</td></tr><tr><td>10</td><td>order.description</td><td>string</td><td>M</td><td></td></tr><tr><td>11</td><td>order.otp</td><td>string</td><td>M</td><td>OTP code (example: <code>"999999"</code>).</td></tr><tr><td>12</td><td>order.referenceNumber</td><td>string</td><td>M</td><td>Reference number from the initiation response.</td></tr><tr><td>13</td><td>url</td><td>object</td><td>M</td><td>Redirect/callback configuration.</td></tr><tr><td>14</td><td>url.callbackUrl</td><td>string</td><td>M</td><td>URL to receive payment result callback.</td></tr><tr><td>15</td><td>sourceOfFunds</td><td>object</td><td>M</td><td>Funding source configuration.</td></tr><tr><td>16</td><td>sourceOfFunds.type</td><td>string</td><td>M</td><td>Value for BRI Direct Debit: <code>ddbri</code>.</td></tr><tr><td>17</td><td>sourceOfFunds.accountId</td><td>string</td><td>M</td><td>BRI Direct Debit account token (example format: <code>card_...</code>).</td></tr></tbody></table>

**Sample Request**

```json
{
  "customer": {
    "email": "finnet@finpay.id",
    "firstName": "Finnet",
    "lastName": "Finpay",
    "mobilePhone": "+628133560008"
  },
  "order": {
    "id": "6f2f8d90-5f2f-4b70-9a22-7cb8bdf641b1",
    "amount": "1000",
    "currency": "IDR",
    "description": "Testing",
    "otp": "999999",
    "referenceNumber": "0cd45935-3f7f-4de8-8fb6-48bd6f563e66"
  },
  "url": {
    "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultsuccess.php"
  },
  "sourceOfFunds": {
    "type": "ddbri",
    "accountId": "card_<your_token>"
  }
}
```

### Body Response

#### `200 OK`

Returns `application/json`.

<table><thead><tr><th width="79" data-type="number">No</th><th>Name</th><th>Type</th><th>Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>responseCode</td><td><a href="/pages/6ETR85uss1c5zyIS5Bhv">enum</a></td><td>M</td><td></td></tr><tr><td>2</td><td>responseMessage</td><td>string</td><td>M</td><td></td></tr><tr><td>3</td><td>referenceNumber</td><td>string</td><td>M</td><td>Reference number for tracking.</td></tr><tr><td>4</td><td>processingTime</td><td>number</td><td>M</td><td>Processing time in seconds.</td></tr><tr><td>5</td><td>traceId</td><td>string</td><td>M</td><td>Trace ID for debugging/troubleshooting.</td></tr></tbody></table>

**Sample Response**

```json
{
  "responseCode": "2000000",
  "responseMessage": "Request has been processed successfully",
  "referenceNumber": "e6440606-2007-46e5-acfc-731508be9bd3",
  "processingTime": 6.438631057739258,
  "traceId": "e6440606-2007-46e5-acfc-731508be9bd3"
}
```


---

# 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/core-api/direct-debit/bri/purchase-otp-verification.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.
