﻿# Initiate Payout

::: tip  
Disbursement Request API is required for outbound payments.

PayerMax supports payment methods in over `150` countries worldwide. Each payment method may require different fields. Before integrating, please refer to the [Payment Method List](https://docs.payermax.com/en/202606-version/disbursement/payment-methods.md) to confirm the payment method you are connecting to.
:::

## 1. Interaction Process

```mermaid
%%{init: {
  'theme': 'base',
  'themeVariables': {
    'primaryColor': '#e6f0ff',
    'primaryTextColor': '#333',
    'primaryBorderColor': '#5b9bd5',
    'lineColor': '#888',
    'actorMargin': 40,
    'noteBkgColor': '#0056b3',
    'noteTextColor': '#ffffff',
    'noteBorderColor': '#004a99'
  }
}}%%
sequenceDiagram
    participant MServer as Merchant Server
    participant PMServer as PayerMax Server

    %% Transaction Query Flow
    MServer->>PMServer: 1.1 Initiate single payout request
    PMServer-->>MServer: 1.2 Return acceptance result
    PMServer->>MServer: 1.3 Notify payout result
    MServer->>PMServer: 1.4 Return response
```

## 2. Order Request

::: warning  Note:
1. Requirements for payout elements (request parameters) vary across different regions and payment methods. 
For specific payout elements, please refer to: ["Payout Application Template and Filling Specifications"](https://docs.payermax.com/en/202606-version/appendix/disbursement/disbursement-application-template.md);
2. To construct detailed API parameters based on the payout elements, please refer to: [Apply for Payout API](https://docs.payermax.com/api.html?docName=New%20Version&docVer=v1.0&docLang=cn#/paths/aggregate-pay-api-gateway-paymentOrderPay/post).

:::

- Refer to the "Filling Specifications" table in the *Payout Application Template and Filling Specifications*. Parameters with a pink background are required to build the API interface.

- For example, according to the ["Disbursement Application Template and Filling Instructions"](https://docs.payermax.com/en/202606-version/appendix/disbursement/disbursement-application-template.md), the BANK_TRANSFER payment method for Brazil (BR) is a required field, and this field must be passed when making the API request.

![](https://img-cdn-sg.payermax.com/public/20260526-1398feea-aa41-43be-b90b-ec37b023f25a.png)

- You can also choose a payment method below to obtain the parameters you need to send:

*Data unavailable*

## 3. Order Response

### 3.1 Order Successful Response

When `code` = `APPLY_SUCCESS` and `msg` = `Success.` in the response, the request is successful, but it does not necessarily mean the transaction is successful. The transaction status must be determined by the `status` field in the `data` body. For more information, please refer to [Disbursement Request API](https://docs.payermax.com/api.html?docName=New%20Version&docVer=v1.0&docLang=en#/paths/aggregate-pay-api-gateway-paymentOrderPay/post).

### 3.2 Order Failure Response

#### 3.2.1 Server Request Limitation

When initiating a payment request, you may encounter the following error codes of the "**Server Request Limitation**" category:

| Category                  | Errorcode          | Error Message                                 | Remark                                                                                                      |
| ------------------------- | ------------------ | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|                           | REQ_TIME_OVER_TIME | requestTime effective in two minutes          | The request time deviates from the server by more than 2 minutes. Please check the "requestTime" and retry. |
| Server Request Limitation | ILLEGAL_IP_REQUEST | illegal ip request                            | The requesting IP needs to be added to the whitelist, please contact PayerMax.                              |
|                           | TOO_MANY_REQUEST   | Exceed request limitation, please retry later | The interface concurrent limit has been triggered. Please try again later.                                  |

#### 3.2.2 Merchant Configuration Verification

When initiating a payment request, you may encounter the following error codes of the "**Merchant Configuration Verification**" category:

| Category                            | Subcategory                              | Errorcode            | Error Message                                            | Remark                                                                                                           |
| ----------------------------------- | ---------------------------------------- | -------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|                                     | Signature/Key Configuration Verification | MERCHANT_APP_INVALID | Signature key is not configured.                         | The secret key is not configured. Please configure the key as soon as possible.                                  |
| Merchant Configuration Verification |                                          | SIGN_VERIFY_FAILED   | The signature verify failed.                             | Signature verification failed, please check the key/signature logic.                                             |
|                                     | Contract Availability Verification       | CONTRACT_INVALID     | Merchant has not signed the contract or payment methods. | The contract has not been signed or the payment method has not been activated. Please check the contract status. |
|                                     |                                          | MERCHANT_INVALID     | The merchant has been offline.                           | The merchant has been offline. If you have any questions, please contact PayerMax.                               |

#### 3.2.3 Order Information Receiving

When initiating a payment request, you may encounter the following error codes of the "**Order Information Receiving**" category:

| Category                    | Subcategory                    | Errorcode        | Error Message                                 | Remark                                                                                                                                                                                                                  |
| --------------------------- | ------------------------------ | ---------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                             |                                | PARAMS_INVALID   | The {field} is incorrect.                     | Please refer to the ["Disbursement Application Template and Filling Specifications"](https://docs.payermax.com/en/202606-version/appendix/disbursement/disbursement-application-template.md) to view the field rules. |
|                             | Request Parameter Verification | PARAMS_INVALID   | The {field} is incorrect，you should fill {?} | Please refer to the ["Disbursement Application Template and Filling Specifications"](https://docs.payermax.com/en/202606-version/appendix/disbursement/disbursement-application-template.md) to view the field rules. |
| Order Information Receiving |                                | ORDER_REPEAT     | The order number repeat.                      | The order number is repeated, please modify it and retry                                                                                                                                                                |
|                             |                                | UNSUPPORTED_BANK | Bank account invalid or bank not supported    | Unsupported bank or invalid account. Please check and try again.                                                                                                                                                        |
|                             | Other Exceptions               | SYSTEM_ERROR     | System is busy, Please try again later.       | System exception, please check the order status, if the order fails, please retry                                                                                                                                       |
