# Select a network or provider 

**POST**`https://pay.example.com/pay/switch-network`

[Request example ↓](https://epusdt.com/api/endpoints/switch-network#request-example)

Send the parent `trade_id`, `token` and `network` in the JSON body. The parent must be pending (status 1 or 4). Read the returned address or hosted payment URL.

## JSON body 

| Required field | Type   | Example                 |
| -------------- | ------ | ----------------------- |
| trade\_id      | string | 20260523171652123456001 |
| token          | string | USDT                    |
| network        | string | tron                    |

## Related resources 

* [Read checkout configuration](https://epusdt.com/api/endpoints/config)
* [Merchant callbacks](https://epusdt.com/api/payment#callbacks)

## Responses

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` object  
Response payload; null on error.

  * `trade_id` string
  * `amount` number
  * `actual_amount` number
  * `token` string
  * `currency` string
  * `network` string
  * `status` integer
  * `expiration_time` integer
  * `is_selected` boolean
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

application/jsonResponse fields
* `status_code` integer  
Application result code.
* `message` string  
Human-readable result.
* `data` null  
Response payload; null on error.
* `request_id` string  
Request identifier for tracing.

[error-codes.json ↓](https://epusdt.com/agent-setup/error-codes.json)

**Request example**

Gateway URL 

```
curl -i -X POST \
  'https://pay.example.com/pay/switch-network' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "trade_id": "20260523171652123456001",
  "token": "USDT",
  "network": "tron"
}'
```

**Example response**200 · Success400 · 10009 · Invalid parameters400 · 10008 · Order not found400 · 10011 · Child order limit reached400 · 10012 · Cannot switch networks on a child order400 · 10013 · Order is not pending400 · 10016 · Asset not found400 · 10017 · Payment provider disabled400 · 10018 · Payment provider configuration incomplete400 · 10019 · Unsupported provider token or network400 · 10042 · Provider order creation failed

application/json · Selected response fields

```
{
  "status_code": 200,
  "message": "success",
  "data": {
    "trade_id": "20260523171652123456001",
    "amount": 100,
    "actual_amount": 14.29,
    "token": "USDT",
    "currency": "CNY",
    "network": "tron",
    "status": 1,
    "expiration_time": 1779530812000,
    "is_selected": false
  },
  "request_id": "b1344d70-ff19-4543-b601-37abfb3b3686"
}
```
