> For the complete documentation index, see [llms.txt](https://docs.finpay.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finpay.id/finpay-pg/core-api/direct-debit/blu-by-bca-digital/purchase-with-pin.md).

# Purchase with PIN

Create a blu by BCA Digital Direct Debit purchase confirmed with PIN and OTP. Redirect the customer to `pinUrl` to confirm payment.

{% hint style="info" %}
Complete [Binding](https://docs.finpay.id/finpay-pg/core-api/direct-debit/blu-by-bca-digital/binding.md) first. Use the binded phone number as `sourceOfFunds.accountId`.
{% endhint %}

### Endpoint <a href="#technical-specification" id="technical-specification"></a>

| 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="67.71429443359375">No</th><th width="199.85723876953125">Name</th><th width="116">Type</th><th width="113.7142333984375">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td><code>customer</code></td><td>object</td><td>M</td><td>Customer identity and contact details.</td></tr><tr><td>2</td><td><code>customer.id</code></td><td>string</td><td>M</td><td>Customer ID used during binding.</td></tr><tr><td>3</td><td><code>customer.email</code></td><td>string</td><td>M</td><td>Customer email.</td></tr><tr><td>4</td><td><code>customer.firstName</code></td><td>string</td><td>M</td><td>Customer first name.</td></tr><tr><td>5</td><td><code>customer.lastName</code></td><td>string</td><td>M</td><td>Customer last name.</td></tr><tr><td>6</td><td><code>customer.mobilePhone</code></td><td>string</td><td>M</td><td>International phone format.</td></tr><tr><td>7</td><td><code>order</code></td><td>object</td><td>M</td><td>Customer order details.</td></tr><tr><td>8</td><td><code>order.id</code></td><td>string</td><td>M</td><td>Unique order ID.</td></tr><tr><td>9</td><td><code>order.amount</code></td><td>string</td><td>M</td><td>Amount as a string.</td></tr><tr><td>10</td><td><code>order.currency</code></td><td>string</td><td>M</td><td><code>IDR</code>.</td></tr><tr><td>11</td><td><code>order.description</code></td><td>string</td><td>M</td><td>Order description.</td></tr><tr><td>12</td><td><code>url</code></td><td>object</td><td>M</td><td></td></tr><tr><td>13</td><td><code>url.callbackUrl</code></td><td>string</td><td>M</td><td>URL for push notification.</td></tr><tr><td>14</td><td><code>url.redirectUrl</code></td><td>string</td><td>M</td><td>blu by BCA Digital hosted authorization page.</td></tr><tr><td>15</td><td><code>sourceOfFunds</code></td><td>object</td><td>M</td><td>Funding source configuration.</td></tr><tr><td>16</td><td><code>sourceOfFunds.type</code></td><td>string</td><td>M</td><td><code>ddblu</code>.</td></tr><tr><td>17</td><td><code>sourceOfFunds.accountId</code></td><td>string</td><td>M</td><td>Binded blu by BCA Digital mobile phone number.</td></tr></tbody></table>

#### **Sample Request**

```json
{
  "customer": {
        "id": "whyasta@gmail.com",
        "email": "whyasta@gmail.com",
        "firstName": "Asta",
        "lastName": "Finnet",
        "mobilePhone": "+6286500018995"
    },
    "order": {
        "id": "1781755284447",
        "amount": "19982",
        "currency": "IDR",
        "description": "Testing DD Blu PIN"
    },
    "url": {
        "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultsuccess.php",
        "redirectUrl": "https://{blu-hosted-page}/account-binding/linkage/76d229ea-7fcb-43a7-8fc4-a6c4f9dbe238"
    },
    "sourceOfFunds": {
        "type": "ddblu",
        "accountId": "+6286500018995"
    }
}
```

### Body Response

**`200 OK`**

| Name              | Type   | Description                         |
| ----------------- | ------ | ----------------------------------- |
| `responseCode`    | enum   | Response code.                      |
| `responseMessage` | string | Response message.                   |
| `pinUrl`          | string | blu by BCA Digital hosted PIN page. |
| `processingTime`  | number | Processing time in seconds.         |
| `traceId`         | string | Trace ID.                           |

#### **Sample Response**

```json
{
  "responseCode": "2000000",
  "responseMessage": "Request has been processed successfully",
  "pinUrl": "https://{blu-hosted-page}/input-pin/auth-payments?authPaymentId=c03a36ad-8164-4fc3-aeaa-85102936a9e5&accountNumber={blu-account-number}&partner=FINNET&deviceId={device-id}",
  "processingTime": 2.1104049682617188,
  "traceId": "f4bf97f7-b925-4eaa-9d12-22a503569c41"
}
```

### Response Code & Message <a href="#response-code-message" id="response-code-message"></a>

<table><thead><tr><th width="70.16667175292969">No</th><th width="134.07135009765625">HTTP Code</th><th width="149.66668701171875">Code</th><th>Message</th></tr></thead><tbody><tr><td>1</td><td>200</td><td>2000000</td><td>Request has been processed successfully</td></tr><tr><td>2</td><td>404</td><td>4042000</td><td>Invalid Transaction Status. Customer Not Found</td></tr></tbody></table>

***

### Customer Journey

{% stepper %}
{% step %}

#### Enter blu by BCA Digital PIN

<figure><img src="https://1043525006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0e6BKtpYpb5u7FWksQC3%2Fuploads%2F3B6ztUPpKy972jjRHIZq%2Fdd-blu-purchase-01-pin.png?alt=media&amp;token=592c346b-27e6-458e-95ea-32e0ea8ea0ab" alt="Enter blu PIN" width="300"><figcaption><p>Enter blu by BCA Digital PIN</p></figcaption></figure>
{% endstep %}

{% step %}

#### Choose OTP channel

<div align="center"><figure><img src="https://1043525006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0e6BKtpYpb5u7FWksQC3%2Fuploads%2FDZi1ZxClZ88zHLoQP7OR%2Fdd-blu-purchase-02-otp-channel.png?alt=media&amp;token=c67f5380-70a7-4339-81d8-e7a91c2739fd" alt="Choose OTP channel" width="300"><figcaption><p>Choose OTP channel (blu by BCA Digital app or WhatsApp)</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Enter OTP

<figure><img src="https://1043525006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0e6BKtpYpb5u7FWksQC3%2Fuploads%2FqY0bes7979oC8BR83sEE%2Fdd-blu-purchase-03-otp.png?alt=media&amp;token=29ec8a1d-b7d1-48e5-88e7-886e7be8e1b5" alt="Enter 4-digit OTP" width="300"><figcaption><p>Enter 4-digit OTP</p></figcaption></figure>
{% endstep %}

{% step %}

#### Payment Success

<figure><img src="https://1043525006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0e6BKtpYpb5u7FWksQC3%2Fuploads%2FVnHtd5fM4ta7OP9yeg0V%2Fdd-blu-purchase-04-success.png?alt=media&amp;token=93ba75b2-6a16-4195-9d70-e6c07b233654" alt="Payment success" width="300"><figcaption><p>Payment Success</p></figcaption></figure>
{% endstep %}
{% endstepper %}

If the customer enters a wrong PIN or OTP, the blu by BCA Digital page shows an error and the customer can retry.

<figure><img src="https://1043525006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0e6BKtpYpb5u7FWksQC3%2Fuploads%2FniiU4698KiNceLKUholU%2Fdd-blu-purchase-err-wrong-pin.png?alt=media&amp;token=bac9da0e-b3fe-4ff5-8400-28c514d0b0a3" alt="Wrong PIN" width="300"><figcaption><p>Wrong PIN</p></figcaption></figure>

<figure><img src="https://1043525006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0e6BKtpYpb5u7FWksQC3%2Fuploads%2FrcmbP8idIWmI4u70cCU5%2Fdd-blu-purchase-err-wrong-otp.png?alt=media&amp;token=4b9b9cae-bfb5-4035-9306-0598fed911ee" alt="Wrong OTP" width="300"><figcaption><p>Wrong OTP</p></figcaption></figure>

### Transaction Report

A paid transaction appears in **Dashboard → Report → Transaction Report** with payment method **Direct Debit blu by BCA Digital** and status **PAID**.

<figure><img src="https://1043525006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0e6BKtpYpb5u7FWksQC3%2Fuploads%2FxSce1aK5JgJse0rEYr4g%2Fdd-blu-dashboard-paid-with-pin.png?alt=media&amp;token=ef009e9f-f9f8-43ca-ada4-f8b21c5ac0a4" alt="Transaction Report showing Direct Debit Blu PAID"><figcaption><p>Transaction Report – Direct Debit blu by BCA Digital</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.finpay.id/finpay-pg/core-api/direct-debit/blu-by-bca-digital/purchase-with-pin.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
