Payout

When performing a payout, the customer initiates a payout and then just waits for the funds to be credited to their account. The customer themself doesn't participate in the payout processing procedure.

Countries and regions China
Payment currencies CNY
Payment amount limits Contact your key account manager at Flashpay for details. Also you can check the payment amount limits in your project by using Dashboard.
Payment processing time Contact your key account manager at Flashpay for details.
Currency conversion On the Flashpay side
Refund
Onboarding and access fee Contact your key account manager at Flashpay for details.

Operations support

Interfaces
Payment Page Gate Dashboard
Payout

You can check the payment amount limits in your project by using Dashboard. To check your payment amount limits, go to Dashboard, select the Projects section, and then click the Payment methods tab.

The following sections provide more information about the payment processing flow and the analysis of completed payments.

Payout by using Gate

General information

To perform a payout by using Gate with the UnionPay payment method:

  1. Send a request with all the required parameters and signature to the Flashpay URL.
  2. Accept the callback with the payout result from the payment platform.

The following picture provides the details of the payout processing flow in the UnionPay payment method.



Figure 1. Payout processing flow when performing a payout by using Gate
  1. The customer initiates a payout in your system.
  2. Your system sends the payout request to the Flashpay payment platform.
  3. The payment platform sends you a response in which it acknowledges your request and provides the request validation result. (For more information about the response format, see Response format.)
  4. The payment platform processes the request and forwards it to the provider service.
  5. The provider service informs the payment platform about the payout result.
  6. The payment platform sends a callback with the payout result to your system.
  7. Your system sends the payout result to the customer.

Request

This section provides the instructions on how to build the request for payout with the UnionPay payment method.

HTTP request method POST
Request body format JSON
API endpoint /v2/payment/unionpay/payout
Table 1. Basic parameters of a payout request

strictly required—the parameter must be in the initial request.

optional—the parameter is optional but adding it to the request either makes the payment process more customer-friendly or helps to increase the percentage of successful payments.

ObjectObject/Parameter Description

general
object
strictly required

project_id
integer
strictly required

Project ID you obtained from Flashpay when integrating.

Example: 1234

payment_id
string
strictly required

Payment ID unique within your project.

Example: payment_47

signature
string
strictly required

Signature created after you've specified all the request parameters. For more information about signature generation, see Signature generation and verification.

customer
object
strictly required

id
string
strictly required

Unique ID of the customer within your project.

Example: customer_123

ip_address
string
strictly required

IP address of the customer's device.

Example: 198.51.100.47

first_name
string
strictly required

Customer's first name in Chinese.

Example:

last_name
string
strictly required

Customer's last name in Chinese.

Example:

email
string
strictly required

Customer's email.

Example: loveli@example.com

phone
string
strictly required

Customer's phone number (up to 13 digits).

Example: 12345678901

identify
object
strictly required

doc_number
string
strictly required

Number of the customer's Resident Identity Card of the People's Republic of China. Consists of 18 digits or 17 digits and the letter X.

Example: 123456789123456789

sender
object
strictly required

first_name
string
strictly required

Sender's first name.

Example: Mark

last_name
string
strictly required

Sender's last name.

Example: Cooper

day_of_birth
string
strictly required

Sender's date of birth in the DD-MM-YYYY format.

Example: 10-10-1990

gender
string
strictly required

Sender's gender.

Possible values:

  • female—for women
  • male—for men

Example: female

phone
string
strictly required

Sender's phone number.

Example: 12345678901

citizenship
string
strictly required

Sender's citizenship in the ISO 3166-1 alpha-2 format.

Example: US

country
string
strictly required

Sender's country in the ISO 3166-1 alpha-2 format.

Example: US

address
string
strictly required

Sender's address (street, building number, apartment number, etc.).

Example: 20 Main St

source_of_income
string
optional

Sender's source of income. If not passed in the request, the Salary value is used by default.

Possible values:

  • Salary—for the sender's salary
  • Savings—for the sender's savings
  • Insurance Premiums—for insurance premiums
  • Investment Returns—for investment returns
  • Sale of Property—for the proceeds from the sale of property
  • Business Proceeds—for business proceeds

Example: Salary

payment_purpose
string
optional

Purpose of the payment. If not passed in the request, the Family Maintenance value is used by default.

Possible values:

  • Family Maintenance—when sending funds to support a family
  • Repatriation of Salary—when sending salary to the sender's another account. This value must be submitted together with the Self value in the beneficiary_relationship parameter
  • Purchase of Goods/Services—when purchasing goods/services
  • Purchase of Property—when purchasing property
  • Savings—for savings
  • Medical Bills—when paying medical bills
  • Tuition Bills—when paying for tuition
  • Rental Bills—when paying rental bills
  • Other Bills—when paying other bills
  • Tax Payment—when paying taxes
  • Insurance Payment—when paying for insurance
  • Loan Payment—when repaying a loan

Example: Family Maintenance

beneficiary_relationship
string
optional

Relationship between the sender and the payment recipient. If not passed in the request, the Family value is used by default.

Possible values:

  • Family—for the family
  • Friends—for friends
  • Self—for transferring funds to the sender's another account. This value must be submitted together with the Repatriation of Salary value in the payment_purpose parameter
  • Employee—for an employee
  • Merchant—for a merchant
  • Others—for other types of relationships

Example: Family

identify
object
strictly required

doc_number
string
strictly required

Number of the document proving the sender's identity.

Example: 1234567

doc_type
string
strictly required

Type of the document proving the sender's identity.

Possible values:

  • Passport—when submitting the sender's passport number
  • Identification Card—when submitting the number of the Resident Identity Card of the People's Republic of China
  • Work Permit—when submitting the sender's work permit number
  • Others—when submitting the number of another document

Example: Passport

doc_issue_by
string
strictly required

Country that issued the document proving the sender's identity (in the ISO 3166-1 alpha-2 format).

Example: US

payment
object
strictly required

currency
string
strictly required

Code of the payment currency in the ISO-4217 alpha-3 format.

Example: CNY

amount
integer
strictly required

Payment amount in minor currency units without any decimal point or comma except for the cases when the currency doesn't have any minor currency units.

If the currency doesn't have any minor units (i.e. the number of digits for minor currency units is zero), set this parameter to the amount in the major currency units. To check whether the currency has any minor units, see Currency units and Currency codes.

Example: 100.00 CNY must be sent as 10000

card
object
strictly required

pan
string
strictly required

Customer's card number.

Example: 4242424242424242

You can also add any other optional parameters to the payout request, if necessary. For the list of all the parameters available in Gate, see API Reference.

Here is an example of the data from a request to initiate a payout with the UnionPay payment method:

Figure 2. Example of the payout request body
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO/RLUkDJrOcZzUCwX6R/ekpZhkIQg=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "first_name": "爱",
        "last_name": "李",
        "email": "loveli@example.com",
        "phone": "12345678901",
        "identify": {
            "doc_number": "123456789123456789"
        }
    },
    "sender": {
        "first_name": "Mark",
        "last_name": "Cooper",
        "day_of_birth": "10-10-1990",
        "gender": "female",
        "phone": "12345678901",
        "citizenship": "US",
        "country": "US",
        "address": "20 Main St",
        "source_of_income": "Salary",
        "payment_purpose": "Family Maintenance",
        "beneficiary_relationship": "Family",
        "identify": {
            "doc_number": "1234567",
            "doc_type": "Passport",
            "doc_issue_by": "US"
        }
    },
    "payment": {
        "currency": "CNY",
        "amount": 10000
    },
    "card": {
        "pan": "4242424242424242"
    }
}

Callback

In the UnionPay payment method, the payment platform returns the payout result in a callback. For the information about the callback structure, see Callbacks.

The following is an example of a callback body with the information about a successfully completed payout.

Figure 3. Example of the data from a successful payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "payout",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "method": "unionpay",
        "sum": {
            "amount": 10000,
            "currency": "CNY"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123",
        "phone": "12345678901"
    },
    "operation": {
        "id": 47,
        "type": "payout",
        "status": "success",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "CNY"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "CNY"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is an example of a callback for a declined payout.

Figure 4. Example of the data from a declined payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "payout",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "method": "unionpay",
        "sum": {
            "amount": 10000,
            "currency": "CNY"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123",
        "phone": "12345678901"
    },
    "operation": {
        "id": 47,
        "type": "payout",
        "status": "decline",
        "date": "2024-12-07T19:08:45+0000",
        "created_date": "2024-12-07T19:08:05+0000",
        "request_id": "1a23456bc7890de",
        "sum_initial": {
            "amount": 10000,
            "currency": "CNY"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "CNY"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4XrUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

Payouts by using Dashboard

When working with Dashboard, you can process single and mass payouts by using the UnionPay method.

  • To process a single payout, open the payout form, specify all required parameters (including the payment method), send a request and verify that the payout has been processed.
  • To process a mass payout, prepare and upload a file with information about all target payouts, send a batch request, and verify that the payouts have been processed.

    Use a CSV file structured according to the requirements presented in the Mass payments data section. The payout parameters must comply with the requirements (you do not have to generate a signature because it is specified by Dashboard).

More information about processing payouts by using Dashboard is presented in a separate section.