> For the complete documentation index, see [llms.txt](https://docs.idrx.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.idrx.co/api/callback.md).

# Callback

Get notified when there is an update for transactions

{% hint style="info" %}
Using an AI assistant or LLM? An index of these docs is available at [llms.txt](https://docs.idrx.co/llms.txt), and the full docs in one file at [llms-full.txt](https://docs.idrx.co/llms-full.txt).
{% endhint %}

Callback allows you to receive a notification when a minting or redemption transaction is completed. To use Callback, you must first generate an [**API Key**](/api/getting-started.md). Once you have your API Key, navigate to the **API Key** menu and select the **Callback URL** tab to set it up.

<figure><img src="https://3627254584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaxcQeErhSMXyyLFdF0D5%2Fuploads%2Fl6ERQyN9a8yi7J6ZahXB%2Fimage.png?alt=media&amp;token=feaa20cf-0405-4fcc-9d1a-f48f491c8dd3" alt=""><figcaption></figcaption></figure>

Enter your Mint and Redeem Callback URLs. You may use a single endpoint for both callbacks if preferred. Once done, click the **Save Callback URL** button to confirm.

<figure><img src="https://3627254584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaxcQeErhSMXyyLFdF0D5%2Fuploads%2F2U5yKxnlVdj2okhr0yfx%2Fimage.png?alt=media&amp;token=a39f0a2e-da74-44d6-90e6-b1763fed7271" alt=""><figcaption></figcaption></figure>

You’ll see a notification in the bottom-right corner once the Callback URL is successfully saved.

<figure><img src="https://3627254584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaxcQeErhSMXyyLFdF0D5%2Fuploads%2F2U5yKxnlVdj2okhr0yfx%2Fimage.png?alt=media&amp;token=a39f0a2e-da74-44d6-90e6-b1763fed7271" alt=""><figcaption></figcaption></figure>

You can then use the endpoint to receive callbacks in your logs whenever there’s an update to your mint or redeem transactions. Please refer to the example below.

### Delivery rules

These rules apply to both mint and redeem callbacks:

* **One callback per terminal state.** The mint callback fires once when `adminMintStatus` transitions to `MINTED`. The redeem callback fires once per burn when `burnStatus` reaches `SUCCESS`, `FAILED` or `REFUNDED`. If your endpoint is unreachable, the callback is **not** retried automatically — respond with `2xx` quickly and process asynchronously on your side.
* **No signature on the outgoing webhook.** Reconcile by `merchantOrderId` against your own state. Treat the request as untrusted until you've matched it and re-verified via Transaction History API.
* **Body is `application/json`.** Headers are minimal — only the standard `Content-Type`.

{% hint style="warning" %}
Since callbacks are not retried, missed deliveries must be reconciled by polling the Transaction History API using `merchantOrderId`.
{% endhint %}

***

## Mint callback

### Payload structure

Every mint callback body has these top-level fields:

| Field                        | Type           | Description                                                                           |
| ---------------------------- | -------------- | ------------------------------------------------------------------------------------- |
| `id`                         | number         | Internal MintRequest ID                                                               |
| `paymentAmount`              | number         | Amount the user paid in IDR (before fees)                                             |
| `toBeMinted`                 | string         | IDRX amount minted (= `paymentAmount` minus deducted fees)                            |
| `merchantOrderId`            | string         | Your order ID                                                                         |
| `destinationWalletAddress`   | string         | Wallet that received the IDRX                                                         |
| `chainId`                    | number         | EVM chain ID                                                                          |
| `paymentStatus`              | enum           | `WAITING_FOR_PAYMENT` / `PAID` / `EXPIRED`                                            |
| `userMintStatus`             | enum           | `PROCESSING` / `MINTED` / `NOT_AVAILABLE`                                             |
| `adminMintStatus`            | enum           | Internal operational state. Informational only — build your logic on `userMintStatus` |
| `txHash`                     | string         | On-chain mint transaction hash                                                        |
| `reference`                  | string         | Payment gateway reference                                                             |
| `requestType`                | string         | `null` / `"idrx"`                                                                     |
| `customerVaName`             | string         | Source account name                                                                   |
| `paymentProviderId`          | number \| null | Internal payment routing reference. Informational only                                |
| `returnUrl`                  | string \| null | Echoed back from original request                                                     |
| `expiryTimestamp`            | string         | Unix epoch milliseconds                                                               |
| `isApproved`                 | boolean        | Multisig approval flag                                                                |
| `reportStatus`               | enum           | `NONE` / `REJECTED` / `PROCESSING` / `APPROVED`                                       |
| `processByUserId`            | number \| null | Admin processor                                                                       |
| `qredoTxId`                  | string \| null | Safe multisig transaction hash                                                        |
| `signedTx`                   | string \| null | Solana signed transaction blob                                                        |
| `deleted`                    | boolean        | Soft-delete flag                                                                      |
| `createdAt`                  | ISO 8601       | Creation timestamp                                                                    |
| `updatedAt`                  | ISO 8601       | Last updated timestamp                                                                |
| `TransactionHistory`         | object         | Payment gateway notification                                                          |
| `MintRequestTransactionFees` | array          | Fee breakdown                                                                         |

{% hint style="info" %}
The callback payload and all status fields are identical whether the order was created through [Flow A or Flow B](/api/transaction-api/post-api-transaction-mint-request.md#choosing-a-flow).
{% endhint %}

***

### `TransactionHistory` sub-object

```jsonc
{
  "id": 21468,
  "merchantCode": "D11808",
  "amount": "55000",
  "merchantOrderId": "20260508154603",
  "productDetail": "Deposit USD",
  "additionalParam": "toBeMinted: 55000 destinationWalletAddress: 0x...",
  "resultCode": "00",
  "signature": "4f9cabb4aac2b04fbc02a3b039a906fc",
  "paymentCode": "BR",
  "merchantUserId": 5002,
  "reference": "D11808261VSEBJBL43V2ZIW",
  "spUserHash": null,
  "issuerCode": null,
  "settlementDate": "2026-05-09",
  "publisherOrderId": "BR26BOLMOR7DDYK18WA",
  "sourceAccount": "",
  "deleted": false,
  "createdAt": "2026-05-08T15:47:58.487Z",
  "updatedAt": "2026-05-08T15:47:58.487Z"
}
```

***

### `MintRequestTransactionFees` array

```jsonc
{
  "name": "Payment Method Fee",
  "amount": "609"
}
```

{% hint style="warning" %}
An empty array (`[]`) means the payment channel charges no IDRX-layer fee.\
This is expected behaviour, not missing data.
{% endhint %}

***

## Fee structure by payment method

Two patterns exist depending on the channel:

* **Fee added on top at checkout**
  * `paymentAmount === toBeMinted`
  * `MintRequestTransactionFees = []`
* **Fee deducted from minted IDRX**
  * `toBeMinted` is lower than `paymentAmount`
  * A fee row appears in `MintRequestTransactionFees`

| Channel | `paymentCode` | IDRX fee  | Charged how  | Effect           |
| ------- | ------------- | --------- | ------------ | ---------------- |
| BNI VA  | `IQ`          | 3,000 IDR | Added on top | Fees array empty |
| BRI VA  | `BR`          | 3,000 IDR | Added on top | Fees array empty |
| OVO     | `OV`          | 1.67%     | Added on top | Fees array empty |
| DANA    | `DA`          | 1.67%     | Added on top | Fees array empty |

{% hint style="info" %}
**QRIS is temporarily undocumented.** QRIS remains a supported payment method and is not being withdrawn — its documentation is hidden while we carry out maintenance, and will be restored afterwards. If you need QRIS details in the meantime, contact <support@idrx.co>.
{% endhint %}

***

### Worked example — 100,000 IDR top-up

| Channel       | User pays | IDRX delivered | `paymentAmount` | `toBeMinted` | Fees |
| ------------- | --------- | -------------- | --------------- | ------------ | ---- |
| BRI VA (`BR`) | 103,000   | 100,000        | `100000`        | `"100000"`   | `[]` |
| OVO (`OV`)    | 101,670   | 100,000        | `100000`        | `"100000"`   | `[]` |

Universal reconciliation formula:

```ts
const idrxFee =
  body.paymentAmount -
  parseInt(body.toBeMinted, 10);
```

***

## Mint examples

### IDRX mint via BRI VA (`BR`)

```json
{
  "id": 33687,
  "paymentAmount": 100000,
  "toBeMinted": "100000",
  "merchantOrderId": "20260509093000",
  "destinationWalletAddress": "0xA3aE7A9562E6DDdc693be0c34013637730E2bA00",
  "chainId": 8453,
  "paymentStatus": "PAID",
  "userMintStatus": "MINTED",
  "adminMintStatus": "MINTED",
  "txHash": "0x4b1f8d...c91e72",
  "reference": "D11808261VKLMNO78PQRS",
  "requestType": "idrx",
  "MintRequestTransactionFees": []
}
```

{% hint style="info" %}
Empty `MintRequestTransactionFees` on VA payments is expected behaviour.
{% endhint %}

***

## Reconciliation tips

```ts
// Universal fee calculation
const idrxFee =
  body.paymentAmount -
  parseInt(body.toBeMinted, 10);

// IDRX delivered
const idrxMinted = body.toBeMinted;
```

For high-value transactions, verify on-chain delivery using `txHash`.

***

## Status handling

Build your logic on `userMintStatus`, together with `paymentStatus`.

| `userMintStatus` | Meaning                 | Action         |
| ---------------- | ----------------------- | -------------- |
| `MINTED`         | Tokens delivered        | Mark success   |
| `REFUND`         | Payment refunded        | Mark cancelled |
| `REJECTED`       | Request rejected        | Mark cancelled |
| `PROCESSING`     | Delivery in flight      | Keep waiting   |
| `NOT_AVAILABLE`  | No minting activity yet | Keep waiting   |

Also treat `paymentStatus: EXPIRED` as terminal — the payment window closed before the customer paid.

{% hint style="info" %}
`adminMintStatus` is an internal operational field. It appears in the payload for reference, but its values can change as our operational process changes — don't build integration logic around it.
{% endhint %}

***

## Redeem callback

### IDRX

```json
{
  id: 1234,
  chainId: 56,
  userId: 1234,
  requester: 'NUR MUHAMMAD LUTHFI',
  txHash: '0xabcdefghijk',
  fromAddress: '0xlmnopqrstuvwxyz',
  amount: '15000',
  bankName: 'BANK JAGO',
  bankCode: '542',
  bankAccountNumber: '123456789',
  bankAccountName: 'NUR MUHAMMAD LUTHFI',
  bankAccountNumberHash: null,
  custRefNumber: '123456789',
  disburseId: 123456789,
  burnStatus: 'SUCCESS',
  createdAt: '2025-07-29T10:48:50.417Z',
  updatedAt: '2025-07-29T10:49:54.691Z',
  deleted: false,
  reportStatus: 'NONE',
  notes: ' | ',
  RedeemRequestTransactionFees: [
    {
      id: 1234,
      name: 'Payment Gateway Fee',
      amount: '5000',
      redeemRequestId: 3456,
      deleted: false
    }
  ]
}
```

***

### Refunded redeem

A burn can be returned to you as IDRX instead of being paid out in rupiah. IDRX mints the burned amount back to the wallet that burned it, and the redeem ends in `burnStatus: "REFUNDED"`. No rupiah payout follows, and the status is final.

You receive one redeem callback for each refunded burn. The body is the usual redeem object, with `burnStatus: "REFUNDED"` and an extra `refund` object that describes the IDRX mint that returned the funds:

```json
{
  "id": 1234,
  "chainId": 8453,
  "userId": 1234,
  "requester": "JOHN SMITH",
  "txHash": "0x3f9a...b21c04",
  "fromAddress": "0x8BD53F7fF88fD895D3686fe6369a07432822d30F",
  "amount": "50000",
  "bankName": "BANK CENTRAL ASIA",
  "bankCode": "014",
  "bankAccountNumber": "7255759001",
  "bankAccountName": "JOHN SMITH",
  "bankAccountNumberHash": null,
  "custRefNumber": "000028880723",
  "disburseId": null,
  "burnStatus": "REFUNDED",
  "createdAt": "2026-11-12T08:15:20.104Z",
  "updatedAt": "2026-11-13T05:40:11.392Z",
  "deleted": false,
  "reportStatus": "NONE",
  "notes": null,
  "RedeemRequestTransactionFees": [],
  "refund": {
    "txHash": "0x7d2e...a94f10",
    "chainId": 8453,
    "toAddress": "0x8BD53F7fF88fD895D3686fe6369a07432822d30F",
    "amount": "50000",
    "createdAt": "2026-11-13T05:40:11.120Z"
  }
}
```

| Field              | Type     | Description                                                                                              |
| ------------------ | -------- | -------------------------------------------------------------------------------------------------------- |
| `refund.txHash`    | string   | On-chain transaction hash of the IDRX mint that returned the funds                                       |
| `refund.chainId`   | number   | EVM chain ID of the refund mint                                                                          |
| `refund.toAddress` | string   | Wallet that received the refunded IDRX — the wallet that burned it                                       |
| `refund.amount`    | string   | Total IDRX minted in the refund. One refund can cover several burns, so this can be larger than `amount` |
| `refund.createdAt` | ISO 8601 | When the refund was recorded                                                                             |

The `refund` object is only present when `burnStatus` is `REFUNDED`. `SUCCESS` and `FAILED` callbacks do not have it.

To match a refunded burn to the IDRX you received:

1. Match the callback to your redeem by `txHash` (your burn transaction) or `id`.
2. Find the incoming IDRX transfer on chain `refund.chainId` with the hash `refund.txHash`. Several burns refunded together share the same `refund.txHash`; their `amount` values add up to `refund.amount`.
3. Mark the redeem as refunded on your side. Do not wait for a bank transfer for this burn, and do not submit the same burn again.

***

### Redeem status handling

Build your logic on `burnStatus`. The redeem callback is sent for these final statuses:

| `burnStatus` | Meaning                                                      | Action        |
| ------------ | ------------------------------------------------------------ | ------------- |
| `SUCCESS`    | Rupiah sent to the bank account                              | Mark success  |
| `FAILED`     | Redeem failed, no rupiah sent                                | Mark failed   |
| `REFUNDED`   | Burned amount returned as IDRX to the wallet, no rupiah sent | Mark refunded |

For every `burnStatus` value, see [Transaction History API](/api/transaction-api/get-api-transaction-user-transaction-history.md).

***

## See also

* [POST /transaction/mint-request](/api/transaction-api/post-api-transaction-mint-request.md) — how mint orders are created.
* [Processing Mint IDRX Requests](/integration/processing-mint-idrx-requests.md) — end-to-end mint flow with reconciliation pattern.
* [Processing Redeem IDRX Requests](/integration/processing-redeem-idrx-requests.md) — end-to-end redeem flow.
* [Transaction History API](/api/transaction-api/get-api-transaction-user-transaction-history.md) — pull state by `merchantOrderId` if a webhook is missed.
