Pay in - API mode
Description
In some cases, The merchant might want to render the checkout page with customized requirements, such as adding the merchant's logo or changing style.
Request URL
Http method
- POST
- Content-Type: application/x-www-form-urlencoded
Http request
Element | Data Type | Required | Signed | AES encryption | URL encode | Remarks |
|---|---|---|---|---|---|---|
merchantNo | string | R | Y | merchant unique ID, once a merchant has been on-boarded with Alchemy Pay, the merchant will be provided with the credentials | ||
timeStamp | string | R | Y | GMT time with 13 digit to represent time in milliseconds | ||
language | string | O | N | en | ||
sign | string | R | N | signature with RsaUtil.sign method | ||
merchantOrderNo | string | R | Y | merchant defined transaction ID, must be unique for each request. | ||
payType | string | R | Y | INTERNATIONAL_CARD_PAY | ||
payModel | string | R | Y | either CREDIT_CARD or DEBIT_CARD | ||
currency | string | R | Y | USD, EUR, GBP, JPY | ||
orderAmount | string | R | Y | transaction amount, | ||
productDetail | string | R | Y | Y | goods name, can't contain special characters | |
cardNo | string | R | Y | Y | bank Card No. | |
cardType | string | R | Y | VISA, MASTERCARD, UPI, JCB | ||
cardCcv | string | R | Y | Y | cvv | |
cardExpMonth | string | R | Y | format: mm | ||
cardExpYear | string | R | Y | format: yyyy | ||
firstName | string | R | Y | Y | card holder's first name | |
lastName | string | R | Y | Y | card holder's last name | |
phone | string | C | Y | |||
address | string | C | Y | |||
city | string | C | Y | Y | ||
state | string | C | N | for USA and Canada, it is ISO 3166-1 alpha-2, for others countries please use full name, in case there is no state in your country, please use city name instead. | ||
country | string | C | Y | country code with two letters defined in ISO 3166-1 | ||
string | R | Y | ||||
postcode | string | C | N | |||
userIp | string | R | N | user's IP | ||
userAgent | string | O | N | userAgent of explorer: Mozilla/5.0 Macintosh, Intel Mac OS X | ||
callbackUrl | string | R | Y | webhook URL | ||
noticeUrl | string | O | N | redirect URL in case 3DS verification is triggered and payment succeed. for example: https://www.alchemypay.org | ||
customParam | string | O | N | customized data with maximum 500 characters after redirect to noticeUrl, for example: https://www.alchemypay.org?customParam={customParam} | ||
expandField | string | O | N | NULL | ||
version | string | O | N | NULL | ||
validPeriod | string | O | N | NULL | ||
merType | string | C | N | either 0 or 1, default value is 0. |
Http response
Element | Data Type | Signed | Remarks |
|---|---|---|---|
merchantNo | string | Y | merchant unique ID, once a merchant has been on-boarded with Alchemy Pay, the merchant will be provided with the credentials |
merchantOrderNo | string | Y | merchant defined transaction ID, must be unique for each request |
orderNo | string | Y | Alchemy Pay defined transaction ID |
currency | string | Y | USD, EUR, GBP, JPY |
orderAmount | long | Y | transaction amount, |
orderFee | long | Y | transaction fee, unit in cents (i.e. 100 = $1) |
payModel | string | Y | either CREDIT_CARD or DEBIT_CARD |
orderStatus | string | Y | transaction status, please refer to error code |
webUrl | string | Y | redirect URL |
page | string | N | NULL |
orderTime | long | N | timestamp |
finishTime | long | N | 0 |
remark | string | N | error description from payment gateway |
sign | string | Y | signature with RsaUtil.sign method |
Request sample
{
"lastName": "Kn**t",
"cardExpMonth": "02",
"cardCcv": "/K9Gj00mc/cY9h9sejgvPg==",
"productDetail": "purchaseProduct",
"cardType": "MASTERCARD",
"sign": "DzBoYc2tGHPBCQR1/zSjE3z+s1kFNos8kGj/C5R4h9pd7eW4/YfWKSaKX1Kz9Csd78NMzqTtPzUpT7EIE83qpD0itrZsMvuefAECew9F7Q+4N3rj4NypdtZcviGGfHnrnzkxBSn6a9ShdoJA13VYL6yHKMlLDxK18lqocXcvHTg=",
"payModel": "CREDIT_CARD",
"language": "zh",
"merchantOrderNo": "PAY202207272790784161",
"cardNo": "XaOPEITl9+f4Vss6u1QPTK+6ks6BMCIdRAacA1iBD/Q=",
"customParam": "1001799476114063361",
"timeStamp": 1658889214901,
"cardExpYear": "2028",
"firstName": "Eva",
"orderAmount": "10000",
"payType": "INTERNATIONAL_CARD_PAY",
"userIp": "120.246.11.66",
"currency": "USD",
"callbackUrl": "https://apiuat.alchemypay.org/pay/callback/yyh",
"noticeUrl": "https://rampuat.alchemypay.org/paymentResult",
"merType": "1",
"email": "li***[email protected]",
"merchantNo": "AC202237083"
}Response sample
{
"meta":{
"success":true,
"code":"0000",
"message":"Request Success"
},
"data":{
"merchantNo":"AC202237083",
"merchantOrderNo":"PAY202207272790784161",
"orderNo":"R08OC0220727012238117504288178",
"currency":"USD",
"orderAmount":12100,
"orderFee":221,
"payModel":"CREDIT_CARD",
"orderStatus":"WAIT3D",
"webUrl":"https://api-gw.sparkpsp.com/v1/Company3dRequest?order_no=R08CH02207270122381906777110710144&type=PL&return_url=https://payment.alchemytech.cc/nh-gateway/toPageResult/R08CH022072701223819067771107¬ify_url=https://payment.alchemytech.cc/nh-gateway/spark/callBack",
"page":null,
"orderTime":1658827358118,
"finishTime":0,
"sign":"RssFfOMWFTX1+CH0sDhhjFhdafTPtAK+/NtdKo9M4oE/eazrSb3rWcXBeEI/J7cSk6COc80/yrbKs7zWt4UAFeYc+4/D05VBEGdEqjPdzF0KUTvm6i339zwroopNdMpWwGLia0wnBjzCXnSVspd+yLNVy8P6dV+X3a65HSzkqs2GNiLp2InRJcSbQXn201bJ9RehO21HscrLBgMO+qPr6n8b9rpt5LPJVrcQZbcuiiaV/23Cg64Zy9WBgF5i3sxG8HPw1PvOYjhBVgblli3etaJt3V7bag1kNIzPaH6PmJwTA5UlZpz2OyyabYOY9BbIjUvRdmSwI+LX8QFUodG10C9FQB/KavFRcY1MiYlSjq1/21/JniX9y54c+GGgw9EirdO4Hv2K+XI66JAOUa7t3enUqO9zWB3fKqr0IcFQiwX8yiyc+oJyNbXx26UIJ+kEK3qVMMMHtnTyZewq5NXQiO+SKGFL2OKfRu0xaP2gh48011GOrRc6Jgy8qGtkmBizS2CdZjEdIBcxtwwAmi8aoDz2AGM2bLw27IN5T5TPH/mbZzs5jnbF5t/qFxDn6p8vW6Yofn6wvEAP+fMrl978DN2N5zlqfYzMN0SyJjQArj/Ygva+IIXsOExPMIRhj2sjJpfZuMg2zX6S7ooc4UuO214L/4lVnSe7jfyEZuCIf5I=",
"remark":""
}
}Updated about 1 month ago