> ## Documentation Index
> Fetch the complete documentation index at: https://docs-api.dexchange.sn/llms.txt
> Use this file to discover all available pages before exploring further.

# Usage in Transactions

> How to use a sub-merchant in a transaction

# Usage in Transactions

Add the `sub_merchant_id` field in your transaction requests to display your sub-merchant's name to the payer.

## Example

```json theme={null}
{
  "externalTransactionId": "ext-123",
  "serviceCode": "WAVE_SN_CASHOUT",
  "amount": 1000,
  "number": "771234567",
  "callBackURL": "https://example.com/callback",
  "successUrl": "https://example.com/success",
  "failureUrl": "https://example.com/failure",
  "sub_merchant_id": "sm-7f4a9940c621"
}
```

## Default Sub-Merchant

You can set a default sub-merchant from your dashboard. If `sub_merchant_id` is not passed in the transaction, the default sub-merchant will be used automatically.

## Transaction Data

When a sub-merchant is used, the following fields are added to the transaction and included in the webhook callback:

```json theme={null}
{
  "subMerchantId": "sm-7f4a9940c621",
  "subMerchantName": "My Store SN"
}
```

<Info>
  The `sub_merchant_id` field is entirely **optional**. Transactions without a sub-merchant continue to work as before.
</Info>
