Query Fee and Fx Rate for Payment

• POST /v3/b2b/order/fx

Precautions: This API gives the ability for users to get quote and fee to actually converting from one currency to another. Usually fee is related to origin currency, target currency and order type. Before make a payment,you should get quote and calculate the service fee first.

withdrawal send to recipient transfer to PingPong Account

Request Sample

curl --location --request POST 'https://test2-business-cgi.pingpongx.com/v3/b2b/order/fx' \
--header 'Authorization: Bearer a94890a8d16a4ba7b3ab64036d9624e189dd62e96aca480b91f824d0b5e0dcbe' \
--header 'Content-Type: application/json' \
--header 'timestamp: 1637564397860' \
--header 'sign: 4a70672b69b59d24d1ef05b716b1fc1d89e3e87e2b4921cb5847b6230e91c472' \
--header 'app_id: 80242303107221' \
--data-raw '{
      "open_id":"MC27502480644374528",
      "origin_currency":"USD",
      "target_currency":"THB",
      "order_type":"WITHDRAW",
      "amount":134,
      "cal_rule":"TARGET2ORIGIN"
      "to_account_id":"ba011911200012205085"
}'

Request Schema

Parameter Type Requried Description
open_id String M User ID in PingPong
origin_currency String M Origin Currency
target_currency String M Target Currency
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
order_type String M WITHDRAW,RECIPIENT,TRANSFER,EXCHANGE
from_account_id String O Recipient Account BizId
If you want to pay from your local Bank Account,it`s required
to_account_id String M Recipient Account BizId
when order_type is EXCHANGE is optional

Response Sample

{
  "code": 0,
  "success": true,
  "message": "OK",
  "data": {
    "fx": {
      "rate": 0.817461,
      "origin_currency": "USD",
      "target_currency": "EUR",
      "rate_id": "1399652192068775937",
      "expire_time": 1622538171082
    },
    "fee": {
      "currency": "USD",
      "amount": 0.00
    },
    "detail": {
      "target_amount": 133.00,
      "target_currency": "EUR"
    },
    "lock_rate_id": "f7ed11d619204d919ebb4b9a2d3de493",
    "order_type": "RECIPIENT",
    "order_amount": {
      "currency": "USD",
      "amount": 162.70
    }
  }
}

Response Schema

Parameter Type Description
fx
fx.origin_currency String Origin Currency
fx.target_currency String Target Currency
fx.rate BigDecimal Exchange Rate
fx.rate_id String Rate Id
fx.expire_time Long Rate expire_time,default is 60s
order_type String Order of Type WITHDRAW,RECIPIENT,TRANSFER,EXCHANGE
lock_rate_id String ID of locked exchange rate
fee
fee.amount String Fee Amount
fee.currency String Fee currency,same with origin 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
Copyright © pingpongx.com 2021 all right reserved,powered by Gitbooklast modified: 2021-11-23 10:08:57

results matching ""

    No results matching ""