---
updatedAt: 2026-11-13T20:09:18.000Z
agentTools:
  projectIndex: https://docs.zerohash.com/llms.txt
---

# Payins API Integration Guide

Power your checkout with crypto and stablecoins - end to end integration guide

See core product page [here](https://docs.zerohash.com/docs/payins).

## Definitions

| Term     | Definition                                                                                                                                                                                                                                                                                |
| :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Platform | The company that is under contract with zerohash and integrates directly with the zerohash's API                                                                                                                                                                                          |
| Merchant | A business entity (non-natural person) that serves as the customer-facing front-end in the transaction flow. Typically, the Merchant is a customer of the Platform and is where the Shopper initiates their interaction. In some cases, the Merchant and Platform may be the same entity. |
| Shopper  | The natural person that pays for the good or service                                                                                                                                                                                                                                      |

## How the Integration Works

A high-level summary of each step of the Payins API integration

| Step                       | Notes                                                                                                                                                                   |
| :------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Merchant onboarding        | Onboard the merchants that sell goods and services through your platform. Only applicable when Platform is not acting as the Merchant (ex. PSPs that acquire merchants) |
| Shopper onboarding         | Onboard Shoppers making their first crypto or stablecoin purchases                                                                                                      |
| Initiate Shopper's payment | Generate deposit instructions for Shoppers                                                                                                                              |
| Initiate refund            | Link external account where Shopper will receive funds and facilitate repayment                                                                                         |

## Payins prerequisites

| Pre-condition                                                          | If missing:                                                                                                                                            |
| :--------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ask zerohash to enable this product for you                            | `POST /pay/rfq` returns: `401` — `"Your Platform is not configured to use the Pay product"`                                                            |
| Transacting participant has signed the `ACCOUNT_FUNDING_PAY` agreement | `POST /pay/rfq` returns: `401` — `"Participant has not signed the required agreement for Pay"`                                                         |
| API key has Pay `READ_AND_WRITE` permission                            | `POST /pay/rfq` returns: `403` — `"This api key does not have write permission to this endpoint"` (`GET` endpoints return the read-permission variant) |
| Pre-fund Refund Float Account                                          | You wont be able to initiate refunds to shoppers                                                                                                       |

## Transaction Fees (optional)

Platforms can charge a transaction fee on Payins, paid by either the Shopper or the Merchant. zerohash configures fees for your Platform. Contact your zerohash Relationship Manager to enable or change them. All collected fees settle to the Platform's `pay_transaction_fees` account (see "7. Accounts").

### Configuration options

| Setting           | Options                                                                                                                                                                     |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fee type          | **Flat**: a single bps rate applied to the payment amount.<br />**Tiered**: bps rates that vary by amount. Each portion of the payment is charged at the rate for its tier. |
| Minimum fee floor | The minimum fee charged per transaction, in USD.                                                                                                                            |
| Fee payor         | `Shopper` or `Merchant`                                                                                                                                                     |
| Scope             | A Platform-wide default, or a per-Merchant configuration. A Merchant configuration overrides the Platform default for that Merchant.                                        |

### How fees flow

| Scenario                                       | Shopper sends       | Settlement                                                                         |
| ---------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------- |
| Platform is the Merchant, Shopper pays fee     | Quoted amount + fee | Fee → Platform `pay_transaction_fees`<br />Remainder → Platform `pay`              |
| Platform has many Merchants, Shopper pays fee  | Quoted amount + fee | Fee → Platform `pay_transaction_fees`<br />Quoted amount → Merchant `pay`          |
| Platform has many Merchants, Merchant pays fee | Quoted amount       | Fee → Platform `pay_transaction_fees`<br />Quoted amount less fee → Merchant `pay` |

<Callout icon="📘" theme="info">
  ### Shopper as Fee Payor

  When the Shopper pays the fee, the `quoted_total` and `underlying_quantity` returned by `POST /pay/rfq` **already include the fee**. Present these values to the Shopper as the amount due. Over and under payments are evaluated against this fee-inclusive amount.

  **When the Merchant pays the fee, the RFQ amounts are not affected. The fee is deducted from the amount settled to the Merchant.**
</Callout>

## 1. Submit Merchant

<Callout icon="ℹ️" theme="info">
  ### Who this applies to

  This guide is relevant when the Platform has many merchants. If the Platform is itself the merchant, this step is not required.&#x20;
</Callout>

Begin by submitting the Merchant via [POST /participants/entity/new.](https://docs.zerohash.com/reference/post_participants-entity-new) See more information [here](https://docs.zerohash.com/docs/merchant-onboarding-guide).

<br />

## 2. Query Merchant

You can query already-submitted Merchants via the [GET /participants](https://docs.zerohash.com/reference/get_participants) endpoint. If you'd like to query a specific Merchant, use the`participant_code` parameter.

<br />

## 3. Fund Refund Account

To enable future refunds, you must pre-fund your Refund account by sending a wire transfer to the designated bank account provided by our settlement team. Ensure the wire **memo** is tagged with your Platform code + "\_refund" (ie, PLAT01\_refund):

Here are the [account](https://docs.zerohash.com/docs/what-is-an-account) details:

* Participant\_code: PLAT01 (replace with your `participant_code`)
* Account\_group: PLAT01 (replace with your `participant_code`)
* Account\_label: pay\_refund
* Account\_type: available
* Asset: USD

<br />

## 4. Submit Shopper

Next, you'll need to onboard the end users (ie, "Shoppers"). Depending on transaction type and the Shopper's transaction volume and residence, we have differing level of diligence requirements. See more information on Shopper Onboarding [here](https://docs.zerohash.com/docs/onboard-shoppers).

Use [POST /participants/customers/new ](https://docs.zerohash.com/reference/post_participants-customers-new)to create a new shopper. Set  `onboarding_profile = "shopper"`  and `partial = true` to distinguish this participant from a standard participant.

**Sample Request**

```json
{
  "onboarding_profile": "shopper",
  "email": "shopper@example.com",
  "partial": true
}
```

Shoppers with `onboarding_profile = "shopper"` and `partial = true` are auto-approved upon creation as long as the minimum required data is present: a `phone_number` or `email`. No additional fields are required at creation time — further data can be added later via PATCH as the shopper's transaction tier requires it.

<Callout icon="📘" theme="info">
  ### Signature Collection

  For the Payins API Solution, it is critical that you collect consent from the Shopper to zerohash's user agreements and share confirmation that consent was collected through the [POST /participants/customers/new](https://docs.zerohash.com/reference/post_participants-customers-new) endpoint.
</Callout>

<br />

## 5. Query Shopper

To retrieve general information about the Shopper, query the [GET /participants](https://docs.zerohash.com/reference/get_participants) endpoint. You can use the `participant_code` filter to retrieve an individual Shopper.

<br />

## 6. Query Shopper Limits

To retrieve transaction limits for a Shopper's tier, query the <Anchor target="_blank" href="https://docs.zerohash.com/reference/get_pay-limits">GET /pay/limits</Anchor> endpoint. You can use the `participant_code` attribute to retrieve an individual Shopper. Use the `merchant_participant_code `attribute to query total volume aggregated for a particular merchant.

Example Response:

```c JSON
{
  "message": {
    "request_id": "test-request-id",
    "participant_code": "SHOPP1",
    "merchant_participant_code": "MERCH1",
    "merchant_classification": "NON-TRANSFERABLE-3",
    "current_level": 2,
    "current_limits": [
      {
        "limit": "1000.00",
        "spent": "250.00",
        "remaining": "750.00",
        "window": "daily"
      }
    ],
    "platform_totals": [
      {
        "window": "daily",
        "currency": "USD",
        "total_amount": "5000.00",
        "transaction_count": 12
      }
    ],
    "merchant_totals": [
      {
        "window": "daily",
        "currency": "USD",
        "total_amount": "250.00",
        "transaction_count": 3
      }
    ]
  }
}
```

<br />

## 7. Accounts

The Platform will have the following [accounts](https://docs.zerohash.com/docs/what-is-an-account) at zerohash:

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Account
      </th>

      <th>
        Description
      </th>

      <th>
        Technical Details
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Settlement Account
      </td>

      <td>
        The fiat account that contains the balance of **successful payments**
      </td>

      <td>
        - `participant_code` = \[your platform code or merchant's participant code]
        - &#x20;`account_group` = \[your platform code]    - `account_label` = pay  &#x20;
        - &#x20;`account_type` = available   &#x20;
        - `asset` = USD (or other fiat currency being used)
      </td>
    </tr>

    <tr>
      <td>
        Refund Float Account
      </td>

      <td>
        The fiat account, funded by the Platform, that is used to refund Shoppers. The balances here will be converted to a crypto or stablecoin asset and sent on-chain to the Shopper. See section, "11. Refund a Payment" below for details
      </td>

      <td>
        - `participant_code` = \[your platform code]
        - &#x20;`account_group` = \[your platform code]  &#x20;
        - &#x20;\- `account_label` = pay_refund   &#x20;
        - `account_type` = available   &#x20;
        - `asset` = USD (or other fiat currency being used)
      </td>
    </tr>

    <tr>
      <td>
        Error Account
      </td>

      <td>
        The fiat account that accumulates due to error scenarios (over payment, under payment, incorrect asset or network, late payment
      </td>

      <td>
        - `participant_code` = \[your platform code or merchant's participant code]
        - &#x20;`account_group` = \[your platform code]   &#x20;
        - &#x20;`account_label` = pay_error
        - &#x20;`account_type` = available&#x20;
        - &#x20;`asset` = USD (or other fiat currency being used)
      </td>
    </tr>

    <tr>
      <td>
        Transaction Fees Account
      </td>

      <td>
        The fiat account that collects Payins transaction fees charged by the Platform. Only used when fees are enabled. See "Transaction Fees" above
      </td>

      <td>
        - `participant_code` = 00SCXM
        - &#x20;`account_group` = \[your platform code]
        - `account_label` = pay_transaction_fees
        - &#x20;`account_type` = available
        - &#x20;`asset` = USD (or other fiat currency being used)
      </td>
    </tr>
  </tbody>
</Table>

<br />

## 8. Initiate Payment&#x20;

### Request a quote - [POST /pay/rfq](https://docs.zerohash.com/reference/post_pay-rfq-1)

Generate quote for the payment amount.

**Example Request:**

```json
{
  "participant_code": "SHOPP1",
  "pay_asset": "USDC",
  "quoted_total": "100.00",
  "quoted_currency": "USD",
  "account_label": "pay",
  "client_reference_id": "order-12345",
  "merchant_participant_code": "MERCH01" //optional, only use when Platform!= Merchant
}

```

Interpretation of this request - the Shopper (`SHOPP1`) is making a $100 payment to the Merchant (`MERCH01`)using `USDC` as the payment asset. `quoted_currency` is an enum with one supported value: `USD`.&#x20;

If the Shopper (`SHOPP1`) has sufficient PII data for the diligence Tier required for the transaction, [POST /pay/rfq](https://docs.zerohash.com/reference/post_pay-rfq-1) will return the quote with a `deposit_address`.

**Example Response:**

```json
{
  "request_id": "14f8ebb8-7530-4aa4-bef9-9d73d56313f3",
  "participant_code": "SHOPP1",
  "pay_asset": "USDC",
  "rate": "1",
  "quoted_currency": "USD",
  "quoted_total": "100",
  "underlying_quantity": "100",
  "price_expire_ts": null,
  "deposit_address": "0x5f59B625036ccB4f7aD27Ca4Cb896e4452AfFDAF",
  "transaction_id": "550e8400-e29b-41d4-a716-446655440000",
  "client_reference_id": "order-1001",
  "is_static": true
}
```

| Field                 | Type                          | Notes                                                                                                                                                             |
| :-------------------- | :---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `request_id`          | UUID string                   | Echoed back from Zero Hash for request correlation.                                                                                                               |
| `participant_code`    | string                        | Shopper participant code.                                                                                                                                         |
| `pay_asset`           | string                        | Network-qualified asset, such as `USDC.SOL`, `USDC.BASE`, or `BTC`.                                                                                               |
| `rate`                | decimal string                | Quoted rate at the moment of RFQ.                                                                                                                                 |
| `quoted_currency`     | string                        | Enum: `USD`.                                                                                                                                                      |
| `quoted_total`        | decimal string                | Amount in `quoted_currency`.                                                                                                                                      |
| `underlying_quantity` | decimal string                | Amount in `pay_asset`.                                                                                                                                            |
| `price_expire_ts`     | ISO 8601 UTC string or `null` | May be `null` for stablecoins.                                                                                                                                    |
| `deposit_address`     | string                        | Blockchain address on the `pay_asset` network.                                                                                                                    |
| `transaction_id`      | UUID string                   | Use this as the path parameter for `POST /pay/{id}/rfq`. This is distinct from the settled `transaction_id` in webhook payloads and `GET /pay/transactions` rows. |
| `client_reference_id` | string, optional              | Whatever you sent on the request, echoed back. This is a free-form string.                                                                                        |
| `is_static`           | boolean                       | Indicates whether the deposit address is reused or generated per RFQ                                                                                              |

### Quotes with fees enabled

If fees are configured for the Platform or Merchant, the RFQ response includes the fee configuration. In this example, the Shopper is the Fee Payor with a 100 bps flat fee, so the $100 request returns a fee-inclusive total of $101.

**Example Response (flat fee, Shopper pays):**

```json
{
  "request_id": "14f8ebb8-7530-4aa4-bef9-9d73d56313f3",
  "participant_code": "SHOPP1",
  "pay_asset": "USDC",
  "rate": "1",
  "quoted_currency": "USD",
  "quoted_total": "101",
  "underlying_quantity": "101",
  "price_expire_ts": null,
  "deposit_address": "0x5f59B625036ccB4f7aD27Ca4Cb896e4452AfFDAF",
  "transaction_id": "550e8400-e29b-41d4-a716-446655440000",
  "client_reference_id": "order-1001",
  "is_static": true,
  "deposit_fee_type": "flat",
  "fee_bps": 100,
  "minimum_fee_floor": "0.50",
  "fee_payor": "SHOPP1"
}
```

**Example Response (tiered fee, Shopper pays):**

```json
{
  "request_id": "14f8ebb8-7530-4aa4-bef9-9d73d56313f3",
  "participant_code": "SHOPP1",
  "pay_asset": "USDC",
  "rate": "1",
  "quoted_currency": "USD",
  "quoted_total": "101",
  "underlying_quantity": "101",
  "price_expire_ts": null,
  "deposit_address": "0x5f59B625036ccB4f7aD27Ca4Cb896e4452AfFDAF",
  "transaction_id": "550e8400-e29b-41d4-a716-446655440000",
  "client_reference_id": "order-1001",
  "is_static": true,
  "deposit_fee_type": "tiered",
  "fee_bps": 20,
  "minimum_fee_floor": "1.00",
  "fee_tiers": [
    { "tier": 1, "min_amount": 0, "max_amount": 1000, "fee_bps": 40 },
    { "tier": 2, "min_amount": 1000, "max_amount": null, "fee_bps": 20 }
  ],
  "fee_payor": "SHOPP1"
}
```

| Field               | Type           | Notes                                                                                                                                                |
| ------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `deposit_fee_type`  | string         | `flat` or `tiered`. Returned only when fees are enabled.                                                                                             |
| `fee_bps`           | integer        | The flat fee rate. For tiered fees, this is the lowest tier's rate, kept for backward compatibility. Use `fee_tiers` for the full schedule.          |
| `minimum_fee_floor` | decimal string | The minimum fee charged per transaction, in USD.                                                                                                     |
| `fee_tiers`         | array          | Tiered fees only. Each object contains `tier` (integer), `min_amount` (USD), `max_amount` (USD, `null` for the final tier), and `fee_bps` (integer). |
| `fee_payor`         | string         | The participant code of the party paying the fee: the Shopper's or the Merchant's.                                                                   |

When the Shopper is the Fee Payor, `quoted_total` and `underlying_quantity` include the fee on top.

### Error Responses

**KYC Requirements Not Met**

If the Shopper (`SHOPP1`) has **insufficient** PII data for the [Shopper Tier ](https://docs.zerohash.com/docs/onboard-shoppers)required for the transaction, [POST /pay/rfq](https://docs.zerohash.com/reference/post_pay-rfq-1) will return an error message identifying missing requirements:

```json
{
  "error": "Shopper KYC requirements for this transaction are not met",
  "missing_requirements": [
    "first_name",
    "last_name",
    "date_of_birth"
  ]
}
```

You can use these guidelines to update the Shopper accordingly via [PATCH /participants/customers,](https://docs.zerohash.com/reference/patch_participants-customers-participant-code) and then call [POST /pay/rfq](https://docs.zerohash.com/reference/post_pay-rfq-1) again.

**Manual Approval Required**

Manual approval by zerohash is required for transactions at or above $500,000, or when a Shopper's lifetime spend reaches $500,000 or more. When a Platform calls [POST /pay/rfq](https://docs.zerohash.com/reference/post_pay-rfq-1) to generate a quote and `deposit_address` for a transaction that breaches $500,000, the response will look like this:

```json
{
   "error": "Manual approval required for this transaction",
  "transaction_id": "txn_01HZF7QWXJ8XK3VYNS6TKDM4G2"
}
```

This response means that the transaction has been submitted for zerohash approval. You will receive a [webhook](https://docs.zerohash.com/reference/payins-transaction-updates) once the status of the transaction has been updated, and can then use the `transaction_id` returned in the response as the path parameter when calling [POST /pay/{id}/rfq ](https://docs.zerohash.com/reference/post_pay-rfq-1)to refresh the quote.

<br />

### End customer initiates on-chain payment

On the Platform's user interface, the Shopper is presented with the deposit\_address returned by [POST /pay/rfq](https://docs.zerohash.com/reference/post_pay-rfq-1), and the amount to deposit. They use their Metamask wallet, for example, to trigger a withdrawal into the `deposit_address` for the amount of the payment.

<br />

### Payment Successful

#### Successful Payment (exact amount)

Once a successful payment is received for the exact amount, we'll send a webhook to you. The webhook payload includes all fields returned by `GET /pay/transactions` (see "9. Query payments"), including fee fields when fees are enabled. This example shows a 100 bps flat fee paid by the Shopper:

```json
{
  "participant_code": "SHOPP1",
  "fund_asset": "USDC.BASE",
  "rate": "1",
  "quoted_currency": "USD",
  "source_address": "external",
  "deposit_address": "0xb07C48f0BF25A97034c818Dc643A98e42703D20c",
  "quantity": "101",
  "notional": "101",
  "fund_id": "6767a149-4771-4166-ba07-a2542e361318",
  "fund_timestamp": 1756376889792000000,
  "deposit_timestamp": 1756376889499000000,
  "transaction_id": "d1d731ed-952c-410e-b62b-eb00e3d096fc",
  "account_label": "general",
  "success": true,
  "status_reason_code": "DEPOSIT_PROCESSED",
  "reference_id": "04918aef-41d1-4dfb-82b8-2fdc232a8d88",
  "deposit_fee_type": "flat", //only returned if fees are enabled
  "deposit_fee_bps": 100,  //only returned if fees are enabled
  "deposit_fee_notional": "1.00",  //only returned if fees are enabled
  "fee_payor": "SHOPP1" //only returned if fees are enabled 
}
```

<br />

#### Successful Payment (over payment)

Once a successful payment is received where the Shopper sent **too much**, we'll send a **webhook** to you that looks like this:

```json
{
  "participant_code": "SHOPP1",
  "fund_asset": "USDC.BASE",
  "rate": "1",
  "quoted_currency": "USD",
  "source_address": "external",
  "deposit_address": "0xb07C48f0BF25A97034c818Dc643A98e42703D20c",
  "quantity": "100",
  "notional": "100",
  "fund_id": "6767a149-4771-4166-ba07-a2542e361318",
  "fund_timestamp": 1756376889792000000,
  "deposit_timestamp": 1756376889499000000,
  "transaction_id": "d1d731ed-952c-410e-b62b-eb00e3d096fc",
  "account_label": "general",
  "success": true,
  "status_reason_code": "DEPOSIT_PROCESSED",
  "status_reason": "over payment",
  "reference_id": "04918aef-41d1-4dfb-82b8-2fdc232a8d88"
}
```

### Payment Unsuccessful

| Failure scenario       | Expected remediation steps                                                                                                                                                                                                        |
| :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Under payment          | Shopper to contact Platform → Platform to facilitate a withdraw via `POST /payments` to Shopper's wallet                                                                                                                          |
| Depeg                  | Shopper to contact Platform → Platform to contact zerohash via Slack or Email to facilitate withdrawals back to the Shopper manually                                                                                              |
| Above max threshold    | Shopper to contact Platform → Platform to contact zerohash via Slack or Email to facilitate withdrawals back to the Shopper manually                                                                                              |
| Quarantine             | Shopper to contact Platform → Platform to contact zerohash via Slack or Email. Note: zerohash will likely `disable` this Shopper, as this scenario is typically triggered due receiving a deposit from a high-risk source address |
| Late payment           | Shopper to contact Platform → Platform to facilitate a withdraw via `POST /payments` to Shopper's wallet                                                                                                                          |
| Wrong asset or network | Shopper to contact Platform → Platform to facilitate a withdraw via `POST /payments` to Shopper's wallet                                                                                                                          |

#### Payment Unsuccessful (under payment)

Upon a payment for an **insufficient amount**, a webhook notification will be triggered as follows

```json
{
  "participant_code": "SHOPP1",
  "fund_asset": "USDC.BASE",
  "rate": "1",
  "quoted_currency": "USD",
  "source_address": "external",
  "deposit_address": "0xb07C48f0BF25A97034c818Dc643A98e42703D20c",
  "quantity": "90",
  "notional": "",
  "fund_id": "6767a149-4771-4166-ba07-a2542e361318",
  "fund_timestamp": 1756376889792000000,
  "deposit_timestamp": 1756376889499000000,
  "transaction_id": "d1d731ed-952c-410e-b62b-eb00e3d096fc",
  "account_label": "general",
  "success": false,
  "status_reason_code": "PROCESSING_FAILED",
  "status_reason": "under payment",
  "reference_id": "04918aef-41d1-4dfb-82b8-2fdc232a8d88"
}
```

#### Successful Payment (depeg)

If a stablecoin becomes depegged, to mitigate zerohash's risk, we will manually mark the asset as depegged on our side. This will block all “sell” transactions converting that stablecoin to USD. Should we receive a payment deposit during this period, we will not convert the deposit to fiat. Instead, the funds will be moved to a dedicated depeg account, and a webhook notification will be triggered as follows:

```json
{
  "participant_code": "SHOPP1",
  "fund_asset": "USDC.BASE",
  "rate": "1",
  "quoted_currency": "USD",
  "source_address": "external",
  "deposit_address": "0xb07C48f0BF25A97034c818Dc643A98e42703D20c",
  "quantity": "100",
  "notional": "",
  "fund_id": "6767a149-4771-4166-ba07-a2542e361318",
  "fund_timestamp": 1756376889792000000,
  "deposit_timestamp": 1756376889499000000,
  "transaction_id": "d1d731ed-952c-410e-b62b-eb00e3d096fc",
  "account_label": "general",
  "success": false,
  "status_reason_code": "PROCESSING_FAILED",
  "status_reason": "depeg",
  "reference_id": "04918aef-41d1-4dfb-82b8-2fdc232a8d88"
}
```

#### Above max threshold

zerohash has certain liquidation maximums on our end. If a large deposit is received above this threshold, a webhook notification will be triggered as follows:

```json
{
  "participant_code": "SHOPP1",
  "fund_asset": "USDC.BASE",
  "rate": "1",
  "quoted_currency": "USD",
  "source_address": "external",
  "deposit_address": "0xb07C48f0BF25A97034c818Dc643A98e42703D20c",
  "quantity": "10000000",
  "notional": "",
  "fund_id": "6767a149-4771-4166-ba07-a2542e361318",
  "fund_timestamp": 1756376889792000000,
  "deposit_timestamp": 1756376889499000000,
  "transaction_id": "d1d731ed-952c-410e-b62b-eb00e3d096fc",
  "account_label": "general",
  "success": false,
  "status_reason_code": "PROCESSING_FAILED",
  "status_reason": "above max threshold",
  "reference_id": "04918aef-41d1-4dfb-82b8-2fdc232a8d88"
}
```

#### Quarantine

If zerohash detects that the source address of the payment deposit is high-risk, a webhook notification will be triggered as follows:

```json
{
  "participant_code": "SHOPP1",
  "fund_asset": "USDC.BASE",
  "rate": "1",
  "quoted_currency": "USD",
  "source_address": "external",
  "deposit_address": "0xb07C48f0BF25A97034c818Dc643A98e42703D20c",
  "quantity": "10000000",
  "notional": "",
  "fund_id": "6767a149-4771-4166-ba07-a2542e361318",
  "fund_timestamp": 1756376889792000000,
  "deposit_timestamp": 1756376889499000000,
  "transaction_id": "d1d731ed-952c-410e-b62b-eb00e3d096fc",
  "account_label": "general",
  "success": false,
  "status_reason_code": "PROCESSING_FAILED",
  "status_reason": "For Zero Hash Compliance reasons, the deposit has not been converted to fiat and the crypto has been credited to a Zero Hash holding account",
  "reference_id": "04918aef-41d1-4dfb-82b8-2fdc232a8d88"
}
```

#### Late payment

If zerohash receives a payment deposit past the Payment Window, a webhook notification will be triggered as follows:

```json
{
  "participant_code": "SHOPP1",
  "fund_asset": "USDC.BASE",
  "rate": "1",
  "quoted_currency": "USD",
  "source_address": "external",
  "deposit_address": "0xb07C48f0BF25A97034c818Dc643A98e42703D20c",
  "quantity": "10000000",
  "notional": "",
  "fund_id": "6767a149-4771-4166-ba07-a2542e361318",
  "fund_timestamp": 1756376889792000000,
  "deposit_timestamp": 1756376889499000000,
  "transaction_id": "d1d731ed-952c-410e-b62b-eb00e3d096fc",
  "account_label": "general",
  "success": false,
  "status_reason_code": "DEPOSIT_WINDOW_EXPIRED",
  "status_reason": "payment session has expired",
  "reference_id": "04918aef-41d1-4dfb-82b8-2fdc232a8d88"
}
```

#### Wrong asset or network

If zerohash receives a payment deposit for an asset that was not selected by the Shopper on the Select Asset page, a webhook notification will be triggered as follows:

```json
{
  "participant_code": "SHOPP1",
  "fund_asset": "ETH",
  "rate": "1",
  "quoted_currency": "USD",
  "source_address": "external",
  "deposit_address": "0xb07C48f0BF25A97034c818Dc643A98e42703D20c",
  "quantity": ".15",
  "notional": "",
  "fund_id": "6767a149-4771-4166-ba07-a2542e361318",
  "fund_timestamp": 1756376889792000000,
  "deposit_timestamp": 1756376889499000000,
  "transaction_id": "d1d731ed-952c-410e-b62b-eb00e3d096fc",
  "account_label": "general",
  "success": false,
  "status_reason_code": "PROCESSING_FAILED",
  "status_reason": "deposit currency does not match the expected currency",
  "reference_id": "04918aef-41d1-4dfb-82b8-2fdc232a8d88"
}
```

<br />

## 9. Query payments

You can query our REST endpoint [GET /pay/transactions](https://docs.zerohash.com/reference/get_pay-transactions-1) to retroactively view payment details.

### Query parameters

All filters combine with `AND`. The response shape matches the [List payin transactions](https://docs.zerohash.com/reference/get_pay-transactions-1) reference page.

| Query param             | Type                  | Notes                                                                              |
| :---------------------- | :-------------------- | :--------------------------------------------------------------------------------- |
| `participant_code`      | string                | Required for default listing.                                                      |
| `page`                  | integer               | Default `1`.                                                                       |
| `page_size`             | integer               | Default `50`, capped at `50`. Passing `100` is silently clamped.                   |
| `transaction_id`        | string                | Exact match on the settled transaction ID.                                         |
| `pay_asset`             | string                | Asset filter, such as `USDC.SOL`. Response rows return this value as `fund_asset`. |
| `success`               | boolean               | `true` returns only settled-with-success transactions.                             |
| `client_reference_id`   | string                | Exact match on the value you sent in the RFQ.                                      |
| `deposit_timestamp_gte` | integer, Unix seconds | Lower-bound inclusive.                                                             |
| `deposit_timestamp_gt`  | integer, Unix seconds | Lower-bound exclusive.                                                             |
| `deposit_timestamp_lte` | integer, Unix seconds | Upper-bound inclusive.                                                             |
| `deposit_timestamp_lt`  | integer, Unix seconds | Upper-bound exclusive.                                                             |

**Sample Response:**

```json
    {
      "participant_code": "SHOPP1",
      "fund_asset": "USDC",
      "quoted_currency": "USD",
      "deposit_address": "0xabc123usdcwalletaddress",
      "rate": "1.00",
      "quantity": "100.00",
      "notional": "100.00",
      "fund_timestamp": 1712756400,
      "transaction_id": "111e8400-e29b-41d4-a716-446655440000",
      "account_label": "pay",
      "fund_id": "fund-usdc-1001",
      "success": true,
      "status_reason": "",
      "status_reason_code": "",
      "is_first_deposit": true,
      "fee_payor": "MERCH01",
      "deposit_fee_bps": "25",
      "deposit_fee_notional": "0.25",
      "deposit_timestamp": 1712756700,
      "source_address": "0xsenderwallet123",
      "deposited_asset": "USDC",
      "client_reference_id": "order-1001",
      "source": {
        "source_type": "on_chain",
        "integration": "ethereum"
      },
      "deposit_fee_type": "flat"

    }
```

### Fee fields

When fees are enabled, each transaction includes the following fields. The same fields are included in webhook payloads.

| Field                  | Type           | Notes                                                                                                                                                                                             |
| ---------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `deposit_fee_type`     | string         | `flat` or `tiered`                                                                                                                                                                                |
| `deposit_fee_bps`      | integer        | Effective fee rate charged                                                                                                                                                                        |
| `deposit_fee_notional` | decimal string | Fee amount charged                                                                                                                                                                                |
| `fee_payor`            | string         | Participant code of the Shopper or Merchant that paid the fee                                                                                                                                     |
| `fee_tier_breakdown`   | array          | Tiered fees only. Each object contains `tier` (integer), `amount_in_tier` (USD amount falling in that tier), `fee_bps` (rate applied), and `fee_amount` (fee for that tier). Empty for flat fees. |

**How to read the amounts**

* `quantity` / `notional` always reflect what the Shopper actually sent (gross). When the Shopper is the Fee Payor, these match the fee-inclusive `underlying_quantity` / `quoted_total` from the RFQ.
* Fee fields always report the fee on its own.
* The net amount settled to the Merchant or Platform is always `notional` − `deposit_fee_notional`.

**Example&#x20;**`fee_tier_breakdown`**&#x20;for a $1,500 payment:**

```json
"fee_tier_breakdown": [
  { "tier": 1, "amount_in_tier": 1000, "fee_bps": 40, "fee_amount": 4.00 },
  { "tier": 2, "amount_in_tier": 500, "fee_bps": 20, "fee_amount": 1.00 }
]
```

## 10. Settlement

Withdrawals from Merchant or Platform participant accounts to external bank accounts can be initiated through [POST /withdrawals/requests.](https://docs.zerohash.com/reference/post_withdrawals-requests)

<br />

## 11. Refund a Payment

In order to initiate a refund, you should use the following endpoints:

* [POST /payments/external\_accounts](https://docs.zerohash.com/reference/post_payments-external-accounts) - links a crypto account where the Shopper will receive their refund
* [POST /payments](https://docs.zerohash.com/reference/post_payments) - initiates a conversion from USD (using Refund account) to the crypto asset. This API call will also automatically and immediately send the funds on-chain.

<Callout icon="🚧" theme="warn">
  ### IMPORTANT: You **cannot** rely on the deposit’s source address as the refund destination. Blockchain transactions are not inherently bidirectional, and returning funds to the sender address may result in loss of funds or failed deliveries.

  Some Platforms may choose to pair their zerohash integration with their own transaction monitoring tools. In situations where zerohash accepts a deposit, but the Platform’s monitoring logic flags and rejects it, the Platform may opt to return the deposit by using the POST /convert\_withdraw/rfq and POST /convert\_withdraw/execute endpoint.

  The required flow is to always request and confirm a return address directly from the Shopper before initiating the return.

  Please speak to a zerohash solutions engineer for guidance if interested in this flow.
</Callout>