Set Payment Method
Introduction
This API don't required verified merchant signature.
API Description
Request Method: POST
Request Path: /api/v3/purchase/checkouts/:checkoutId/payment-method
Request Parameter
Parameter | Mandatory | Description |
---|---|---|
paymentMethod | Y | Call this api when payment method isTRANSFER_CRYPTO |
paymentOption | Y | PaymentMethod payment setting |
└─network | Y | Payment token chain |
└─tokenName | Y | Payment token |
Example
{
"paymentMethod": "TRANSFER_CRYPTO", // payment method
"paymentOption": { //paymentMethod payment setting
"network": "ETH", // payment token chain
"tokenName": "ETH", // payment token
}
}
Response
Example
{
"data": {
"address": "0xC7f69643d99baED063e6BD853026d0330fAe2645", //transfer to this address
"walletType": "EVM", // wallet type EVM/SOL/TON
"network": "ETH", // payment token chain
"networkName": "Ethereum",
"networkIcon": "https://static.alchemypay.org/alchemypay/crypto-images/ETH.png",
"chainId":1,
"rpcURL":"https://etherscan.io",
"scanURL":"https://etherscan.io",
"tokenName": "ETH",
"tokenIcon": "https://static.alchemypay.org/alchemypay/crypto-images/ETH.png",
"tokenAddress":"",
"tokenDecimals":1,
"orderPaymentAmount": "0.1867306632371854", // order payment amount
"buyGasPaymentAmount": "0.009336533161859269", // gas fee
"paymentAmount": "0.1960671963990447", // total payment amount
"orderBreakdown": {
"tokenExchange": {
"amount": "969710248.240711882", // purchase amount (etc: 10,000,000 PEPE)
"payAmount": "1.05", // payment amount (etc: 0.105 ETH)
"tokenName": "PEPE", // purchase token (etc: PEPE)
"payToken": "ETH" // payment token (etc: ETH)
},
"exchangeRates": [
{
"fromAmount": "0.1848818447892925",
"fromToken": "ETH",
"toAmount": "0.99009900990099007",
"toToken": "BNB"
},
{
"fromAmount": "0.99009900990099007",
"fromToken": "BNB",
"toAmount": "969710248.240711882",
"toToken": "PEPE"
}
],
"chainGas": {
"fromAmount": "0.0099009900990099",
"fromToken": "BNB",
"toAmount": "0.001848818447892925",
"toToken": "ETH"
},
"topUpGas": {
"fromAmount": "0.05",
"fromToken": "BNB",
"toAmount": "0.009336533161859269",
"toToken": "ETH"
},
"total": "0.1960671963990447",
"processingTime": 3600
}
}
}
Updated 6 days ago