API Integration
Introduction
- API mode support redirect user to the checkout page and skip other process.This api returns a checkout url and user can make a payment directly.
- Order will be timeout in 15 minutes.
API Description
Request Method: POST
Test Request Path: https://api-nft-sbx.alchemytech.cc/nft/openapi/trade/order
Production Request Path: https://openapi-nft.alchemypay.org/nft/openapi/trade/order
Request Parameters
Header Parameters:
Element | Mandatory | Data Type | Remarks |
---|---|---|---|
access-token | Y | string | accessToken from Fetch Token API |
appId | Y | string | Partner unique ID, once a merchant has been on-boarded with Alchemy Pay, the merchant will be provided with the credentials with appId and appSecret |
timestamp | Y | string | UTC time with 13 digit to represent time in milliseconds, expiration period is 5 minutes. |
sign | Y | string | SHA1(appId + appSecret + timestamp), please refer to Sign demo for Initiate API |
Body Parameters:
Element | Mandatory | Data Type | Remark |
---|---|---|---|
fiat | Y | string | Fiat type, char code with ISO4217 encoding currency unit, USD/EUR/JPY/GBP, etc. Required parameter for fiat-based🔺 |
amount | Y | string | Total NFT order fiat amount. The payment channel fee that the user needs to pay will be deducted from the amount. Required parameter for fiat-based🔺 |
crypto | N | string | BTC/ETH.etc ETH default. Required parameter for crypto-based🔺 |
cryptoAmount | N | string | Total NFT oder crypto amount,Required parameter for crypto-based🔺 |
type | Y | string | NFT type: MARKET/MINT |
uniqueId | N | string | NFT Unique Identity, Required for NFT type MARKET 🔺 |
quantity | N | string | NFT quantity, Required for NFT type MINT 🔺 |
payWayCode | Y | string | Payment method code, acquired from the fiat query API |
redirectUrl | Y | string | Redirect URL after buying NFT succeed |
callbackUrl | Y | string | Webhook URL to get the notify message from Alchemy Pay |
merchantOrderNo | Y | string | Merchant defined order ID |
appId | Y | string | Partner unique ID, once a merchant has been on-boarded with Alchemy Pay, the merchant will be provided with the credentials with appId and appSecret |
name | Y | string | NFT name |
picture | N | string | NFT pic rendering URL, 220px * 220 px |
Request Parameter Example:
//fiat-based
{
"fiat": "EUR",
"merchantOrderNo": "175566148100098544",
"amount": "6",
"type": "MARKET",
"uniqueId": "123",
"quantity": "1",
"payWayCode": "10009",
"appId": "t2D***",
"name": "test",
"callbackUrl": "https://google.com/product/webhooktest.php",
"redirectUrl": "https://www.google.com",
"picture": "https://static.alchemypay.org/alchemypay/crypto-images/NFT.png"
}
Response Parameter Example:
{
"success": true,
"returnCode": "0000",
"returnMsg": "SUCCESS",
"extend": "",
"data": {
"orderNo": "1407570063455215616",
"payUrl": "https://nft-sbx.alchemytech.cc/#/paymentMethod?***"
},
"traceId": "68a543c6c27b2b0bee9b35135f4b916a"
}
Updated 2 days ago