BonusPay Documents
English
English
  • Welcome
  • Get Started
  • Basic Fee Structure
  • API Rules
  • Creating an RSA Key
  • Products
  • Crypto TOPUP
    • Parameters
    • getAddress
    • queryCustomerDepositOrderPage
    • getCustomerDepositOrder
    • Notification (Callback)
  • Order Payment by API
    • Parameters
    • Place Order
    • Cancel Order
    • Accept Order
    • Get Order
    • Get PaymentEventList
    • Refund
    • Get Refund Order
    • Notification (Callback)
  • Order Payment by Checkout
    • Parameters
    • Place Order
    • Cancel Order
    • Accept Order
    • Get Order
    • Get PaymentEventList
    • Refund
    • Get Refund Order
    • Notification (Callback)
  • Withdraw
    • Parameters
    • Place Order
    • Get Order
    • Get Networks
    • Notification (Callback)
  • Transfer
    • Parameters
    • Place Order
    • Get Order
    • Get Networks
    • Notification (Callback)
  • Fx Rate
    • Parameters
    • getFxrate
  • Get Account Balance
    • Parameters
    • getAccountList
  • No Code Production
  • Fiat Settlement
    • Parameters
    • Place Order
    • Get Order
    • Notification (Callback)
  • Plug-and-Play
    • WooCommerce
Powered by GitBook
On this page
  • The API endpoint for this interface contains two URLs:
  • Request Parameters
  • Request Example
  • Response Parameters
  1. Fiat Settlement

Place Order

The API endpoint for this interface contains two URLs:

For testing purposes, the URL is: http://api.testbonuspay.network/sgs/api/otcfundout/placeOrder

For production purposes, the URL is: https://api.bonuspay.network/sgs/api/otcfundout/placeOrder

Request Parameters

Submit OTC Payout Request. This is an idempotent API. When the same request is submitted multiple times, the current order status will be returned. The idempotent request does not validate the request timestamp; if multiple requests are made, the timestamp from the first request will be used.

Http Header

Field Name
Variable Name
Required
Type
Example
Description

Language

Content-Language

Optional

String(10)

en

en-English (default)

Signature

sign

Required

String

Partner ID

Partner-Id

Required

String(12)

Http Body

Field Name
Variable Name
Required
Type
Example
Description

Request Time

requestTime

Required

Timestamp(3)

1581493898000

Business Content

bizContent

Required

PlaceAcquireOrderRequest

-

Business Content

OtcFundoutRequest

Field Name
Variable Name
Required
Type
Example
Description

Merchant Order Numbe

merchantOrderNo

Required

String(64)

-

Backend Notification URL

notifyUrl

Optional

String(200)

-

The URL to which the notification of the order status will be sent

Fiat Currency Code

fiatCurrency

Required

String(32)

USD

Crypto Currency Code and Amount

cryptoAmount

Required

Money

-

Amount of crypto to fiat settlement

Request Example

Http Header
{
    "Content-Language": "en",
    "Content-Type": "application/json",
    "sign": "IXJI/QicPQotIsIDBcSGIg6jtJUXs1rTuifQFZUNd3KDTl25GKmpYO7OrkaKkTV0shDRitLmkxJCe3Z60zHE2ZSeVczrhwrnmuMG+bX9N22Hw821H6MydsXetYHRnyf5dPbgpmVja582w49grA6jRlVFAVMYdxKJDPSCb2X/IpltvyrLQ1Wt+lqr+fnpYXvyON6/PIZIQIknC8BVddVahxJnaC6HEagvJf6gskz22/DFfPHT1mlMA9pg8qrbh4O7DYZahf8TB3nIzAPc/FHOUZkYYTT2c8m4eLL8740nJVK7D3IOSqSnBAU/iJ2omjPPFvRCCSqzz17pkGsT7AW91w==",
    "Partner-Id": "200000000888"
}

Http Body
{
    "bizContent": {
        "cryptoAmount": {
            "amount": 5,
            "currency": "USDT"
        },
        "fiatCurrency": "USD",
        "merchantOrderNo": "90fc4671-8174-4f6c-b745-74617d629aca",
        "notifyUrl": "http://yoursite.com/api/notification"
    },
    "requestTime": 1742178523021
}

Response Parameters

If the order status is CREATED, different interActionParams will be returned based on different paySceneCode.

Http Header

Field Name
Variable Name
Required
Type
Example
Description

Signature

sign

Required

String

-

The body field in Http Body is returned only when applyStatus is SUCCESS and code is 0.

Http Body

Field Name
Variable Name
Required
Type
Example
Description

Response Header

head

Required

ResponseHeader

-

Response Body

body

Optional

PlaceOrderResponse

-

响应样例

Http Header
{
  "sign": "JzWjVQ245trg3p0CyuwUUHN+Ck40q/HDaMvhqueHDP8YHqC/Uw3c9VWCw4gKsNbk+CRShjT+bvKkck8Fc3aAiRK8wIVQz6eu95sPkJgZp5A0P+tfMH/44F+3CrejtbEIkrHdSwhy98Tv9TYs9QFe7Yni/vEJ8P4OU6FZJOi8LGOMF6Nc8+S5qftc7qLA17cNJ7NJYC+EW8suGe/NmGA9c5NMK5BwHTHzXYOjXwXLx8mw4M3hiirl0wtVym3hrOmbkujYZCH56h8uOVF0FbHGu5uoq61NuniJitLLs9qyiEprQzUe8oWsJnHKXeGAgEr//fLXIXgYsRYb7AWoJzs6Eg=="
}

Http Body
{
    "body": {
        "cryptoAmount": {
            "currency": "USDT",
            "amount": 0.11
        },
        "merchantOrderNo": "8784b0b4-6c9f-4c26-8858-47a9b5037d74",
        "notifyUrl": "http://yoursite.com/api/notification",
        "createdTime": 1709109026970,
        "orderNo": "20240228000000453",
        "status": "COMPLETED",
        "fundoutDetail": {
            "fromAddress": "TT3afBRdUjLKjYYAAXPoetLTG6Xcqw9ZHb",
            "toAddress": "TJ18DxzR8T89UjgJUKkhR3xUoW2i69b4Ku",
            "txHash": "a91b85d1c8ad53a4afe348c156637efdfb04956211fbf03b953de25a4d5d8531",
            "receivingAmount": {
                "currency": "USD",
                "amount": 100
            },
            "receivingFee": {
                "currency": "USD",
                "amount": 0.1
            }
        },
        "settlementAmount": {
            "currency": "USD",
            "amount": 0.1
        }
    },
    "head": {
        "applyStatus": "SUCCESS",
        "code": "0",
        "msg": "SUCCESS",
        "traceCode": "000000"
    }
}

Response Code

code
msg
原因
解决方案

80002

CURRENCY_CODE_NOT_SUPPORTED

crypto currency unsupported

change to another crypto currency

80003

INVALID_CURRENCY_PRECISION

Incorrect currency precision

Adjusting the currency’s decimal precision

80004

CRYPTO_AMOUNT_TOO_LOW

The amount of crypto currency is too small

Adjusting the amount of crypto currency

80005

INSUFFICIENT_FUNDS

Insufficient merchant balance

Adjusting the amount

80008

CHANNEL_ROUTE_NOT_EXIST

Channel routing does not exist

Contact Bonuspay or agent

PreviousParametersNextGet Order

Last updated 2 months ago