# Binding

### Endpoint

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

### Body Request

Content-Type: `application/json`.

| No | Name                         | Type   | Mandatory | Description                                    |
| -- | ---------------------------- | ------ | --------- | ---------------------------------------------- |
| 1  | customer                     | Object | M         | Customer identity and contact details.         |
| 2  | customer.id                  | String | M         | Customer identifier on your system.            |
| 3  | customer.email               | String | M         | Customer email.                                |
| 4  | customer.firstName           | String | M         | Customer first name.                           |
| 5  | customer.lastName            | String | M         | Customer last name.                            |
| 6  | customer.mobilePhone         | String | M         | Use international format (example: `+628...`). |
| 7  | sourceOfFunds                | Object | M         | Funding source configuration.                  |
| 8  | sourceOfFunds.type           | String | M         | Value for Mandiri Direct Debit: `ddmandiri`.   |
| 9  | recurring                    | Object | M         | Recurring configuration for the binding.       |
| 10 | recurring.type               | String | M         | Recurring type. Example: `PURCHASE`.           |
| 11 | recurring.id                 | String | M         | Recurring identifier.                          |
| 12 | recurring.amount             | String | M         | Amount as string. Example: `"1000"`.           |
| 13 | recurring.interval           | String | M         | Interval value. Example: `"1"`.                |
| 14 | recurring.intervalUnit       | String | M         | Interval unit. Example: `monthly`.             |
| 15 | recurring.maxInterval        | String | M         | Max interval value. Example: `"2"`.            |
| 16 | recurring.startDate          | String | M         | Start date. Format: `yyyyMMdd`.                |
| 17 | recurring.endDate            | String | M         | End date. Format: `yyyyMMdd`.                  |
| 18 | recurring.retry              | Object | M         | Retry configuration.                           |
| 19 | recurring.retry.interval     | String | M         | Retry interval value. Example: `"1"`.          |
| 20 | recurring.retry.intervalUnit | String | M         | Retry interval unit. Example: `minutes`.       |
| 21 | recurring.retry.maxInterval  | String | M         | Retry max interval value. Example: `"1"`.      |

#### Sample Request

```json
{
  "customer": {
    "id": "finnet@finpay.id",
    "email": "finnet@finpay.id",
    "firstName": "Finnet",
    "lastName": "Finpay",
    "mobilePhone": "+628123456789"
  },
  "sourceOfFunds": {
    "type": "ddmandiri"
  },
  "recurring": {
    "type": "PURCHASE",
    "id": "abcd",
    "amount": "1000",
    "interval": "1",
    "intervalUnit": "monthly",
    "maxInterval": "2",
    "startDate": "20250725",
    "endDate": "20300726",
    "retry": {
      "interval": "1",
      "intervalUnit": "minutes",
      "maxInterval": "1"
    }
  }
}
```

### 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.                       |
| 3  | redirecturl     | String                                                            | M         | Redirect URL.                           |
| 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",
  "redirecturl": "https://devo.finpay.id/pg/payment/card/directdebit/ddmandiri/41cc1289f4d3a52cd2f84e58281f36b7d092bae8b62d462b3bb312651c21d047",
  "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/binding.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.
