Withdrawal/Send to Recipient/PingPong Account
• POST /v3/b2b/order/payout
• Precautions: A payment order is created when you send funds to a beneficiary, recipient’s bank account or PingPong account.
You can create the payment order by using the “lock_rate_id” which was previously created by calling "Query Fee and Fx Rate for Payment" API.
Payment includes the following order types:
WITHDRAW: Submit a request to withdraw to the user’s bank account from an available balance of a PingPong Account.
RECIPIENT: Submit a request to initiate a payment to a bank account from an available balance of a PingPong Account. If the recipient does not have a PingPong Account, user can send a payment via bank transfer.
TRANSFER: Submit a request to initiate a payment to an existing PingPong Account from an available balance of a PingPong Account.
EXCHANGE: Submit a request to change one currency to another from an available balance of a PingPong Account.
Request Sample
curl --location --request POST 'https://test2-business-cgi.pingpongx.com/v3/b2b/order/payout' \
--header 'Authorization: Bearer a94890a8d16a4ba7b3ab64036d9624e189dd62e96aca480b91f824d0b5e0dcbe' \
--header 'Content-Type: application/json' \
--header 'timestamp: 1637564397860' \
--header 'sign: 4a70672b69b59d24d1ef05b716b1fc1d89e3e87e2b4921cb5847b6230e91c472' \
--header 'app_id: 80242303107221' \
--data-raw '{
"open_id":"MC27502480644374528",
"amount":5.1,
"origin_currency":"USD",
"target_currency":"THB",
"order_type":"WITHDRAW",
"rate_id":"123",
"partner_order_id":"123",
"reference":"this is a withdraw order",
"from_account_id":"ba011911200012205085",
"to_account_id":"ba011911200012205085",
"cal_rule":"TARGET2ORIGIN"
}'
Request Schema
| Parameter | Type | Requried | Description |
|---|---|---|---|
| open_id | String | M | User id in PingPong |
| amount | BigDecimal | M | Amount which to pay or get,It depend on the cal_rule |
| cal_rule | String | O | Support query rate and fee in two ways. ORIGIN2TARGET: the amount is origin currency amount; TARGET2ORIGIN or NULL, the amount is target currency amount.default is TARGET2ORIGIN |
| origin_currency | String | M | Origin currency |
| target_currency | String | M | Target currency |
| modify_player_name | Boolean | O | Use your verified name as payer name |
| order_type | String | M | Payment type: WITHDRAW,RECIPIENT,TRANSFER,EXCHANGE,REFUND FEE |
| rate_id | String | M | Rate id from a previously created lockfx rate |
| partner_order_id | String | O | Partner order id,using in repeat order verification |
| partner_transactions | List | O | Partner order id,using in repeat order verification |
| partner_user_id | String | O | Partner user id |
| reference | String | O | Remark info |
| from_account_id | String | O | If you want to pay from your local Bank Account,its required(bizId of "Create new Beneficiary Account" API) <br/> only using inRECIPIENT` |
| to_account_id | String | O | Recipient account bizId when order_type is EXCHANGE or to_account_detail is not empty is optional |
partner_transactions
| Parameter | Type | Requried | Description |
|---|---|---|---|
| order_id | String | M | Partner order id,using in repeat order verification |
| order_time | String | M | Partner order id,using in repeat order verification |
| amount | String | M | Partner order id,using in repeat order verification |
| currency | String | M | Partner order id,using in repeat order verification |
| description | String | M | Partner order id,using in repeat order verification |
| shipping_tracking_number | String | M | Partner order id,using in repeat order verification |
Response Sample
{
"code":0,
"message":"OK",
"data":{
"order_id":"W02202101061300335539414",
"partner_order_id":"443",
"description":"Withdraw-Account1-100USD",
"reference":"this is reference",
"order_type":"WITHDRAW",
"from_account_id":"ba011911200012205085",
"to_account_id":"ba011911200012205085",
"created":1619681452644,
"finished":1619681452644,
"fee":{
"amount":1,
"currency":"USD"
},
"fx":{
"rate_id":"43",
"rate":6.5,
"origin_currency":"USD",
"target_currency":"THB"
},
"order_amount":{
"amount":20.22,
"currency":"USD"
},
"detail":{
"target_amount":5.1,
"target_currency":"THB"
}
}
}
Response Schema
| Parameter | Type | Description |
|---|---|---|
| order_id | String | Order Id |
| partner_order_id | String | Partner Order Id |
| order_type | String | Payment Type: WITHDRAW,RECIPIENT,TRANSFER,EXCHANGE,REFUND FEE |
| description | String | Description |
| reference | String | Reference |
| from_account_id | String | Recipient account bizId If you want to pay from your local Bank Account,it`s required |
| to_account_id | String | Recipient account bizId when order_type is EXCHANGE is optional |
| created | Long | Order created time |
| finished | Long | Order finish time |
| fee | ||
| fee.amount | String | Fee Amount |
| fee.currency | String | Fee currency,same with origin currency |
| fx | ||
| fx.rate_id | String | Rate Id |
| fx.rate | BigDecimal | Exchange Rate |
| fx.origin_currency | String | Origin Currency |
| fx.target_currency | String | Target Currency |
| order_amount | Object | |
| order_amount.amount | BigDecimal | PingPong Account deduction amount |
| order_amount.currency | String | Order Currency |
| detail | Object | |
| detail.target_amount | BigDecimal | Amount Received |
| detail.target_currency | String | Currency of Receipt |