Skip to main content

Create payment order

POST 

/payment/createPaymentOrder

The merchant initiates a payment order and receives a link to the payment page. After the user jumps and pays, the system will send a payment result notification to the callback address provided by the merchant.

info
  1. Payment page access rules

    The interface returns field paymentUrl as the payment page path, which needs to be concatenated with the Pay Protocol official domain to access:

    • Production environment: https://payment.payprotocol.network + paymentUrl
    • Sandbox environment: https://payment-sandbox.payprotocol.network + paymentUrl

    Note: Do not use the returned paymentUrl directly, you must concatenate the official domain to avoid misuse or security risks.

  2. Payment script payment amount confirmation range

    If the payment amount exceeds the following range, users need to submit the transfer transaction hash for manual confirmation; It can also be processed through Order Repair Tool by modifying the order amount.

    • Maximum payment amount: The payment amount cannot exceed 1.2 times the order amount (i.e., at most 20% overpayment).
    • Minimum payment amount: The payment amount cannot be less than half of the order amount (i.e., at least 50% payment).

Request

Body

    chainId int32required

    Chain ID

    This is the platform internal ID, not the chain ID on the chain or from the wallet, can be obtained from Get Chain List interface

    description stringrequired

    Order description

    outTradeNo stringrequired

    Merchant order number

    isLegalTender integerrequired

    Possible values: [0, 1]

    Whether the quoted currency is a fiat currency

    • 0 - No
    • 1 - Yes
    quoteCurrencySymbol stringrequired

    Quoted currency symbol, must be in uppercase letters

    Note: When the quoted currency is a fiat currency, this field is the international standard fiat currency symbol, such as USD, CNY, otherwise it is a digital currency symbol, such as USDT, TRX, ETH

    quoteAmount stringrequired

    Quoted amount

    Note: It is the actual amount, must be a positive number, can be a decimal.

    notifyUrl urirequired

    Merchant callback address

    Must be a publicly accessible HTTPS protocol address, otherwise the callback notification cannot be received

    redirectionUrl uri

    Redirect address after the user pays successfully

Responses

OK

Schema

    code int32required

    Status code

    msg stringrequired

    Status message on success or error message on failure

    description string

    Detailed description when error

    data

    object

    required

    outPaymentNo stringrequired

    Payment order number

    paymentUrl stringrequired

    Payment page link

    userWalletAddress stringrequired

    Sub-contract wallet address for receiving payments

    saltHash stringrequired

    Salt value hash used to verify the sub-contract address

Loading...