Download OpenAPI specification:Download
The API used for online payment by Spiral Checkout
The API call for transaction operation, includes Sale, SaleSession, Auth, AuthSession, Capture and Refund
| clientId required | string Example: merchantOne The ID of the account assigned by Spiral |
| merchantRef required | string Example: 1627965086558-1 The reference created by merchants on this order, must be unique. |
| Spiral-Request-Datetime | string Example: 2021-08-03T04:31:26.558Z The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| Spiral-Client-Signature | string Example: KsUJDwropdIGZ/G6vVEXG4FiEOw/+u6dzeuYaFCxnulnJp9vrhyxP0wj0HxzXx/EQyOD6qq5VJFlFvw0Cez1/qnwpoQPHONOE0aQLcxFcEa7TpIU33Ihy3z0lMSRq5xVreuYSawRQi1kVOpVPtLPPBRbk/hYc1NqzQ/gVnwTgHOkP8Cuk4G2e1mV0sq7GISNcvilvOWGoD6DT0Qpln1Tz76ttEn+9dzAzq8G0dLAI2Xp7fJhKGjQNR+aaWibqq8x+FJFafZpFpMP835QUsZmcC740oV/nL2O0LpDpCrTGd5VjIBQa7hJ3q0m4MtEqiWKfTdQ1gZM6FJ+eFzS72qEOw== Signature of the client |
| clientId required | string The ID of the account assigned by Spiral |
| merchantRef required | string The reference created by merchants on this order, must be unique. |
| cmd required | string indication of the operation SALE / AUTH / SALESESSION / AUTHSESSION |
| type required | string transaction type, details refer to the Support Types page. |
| amt required | number transaction amount |
| goodsName required | string Goods title |
| goodsDesc | string Description of Goods |
| channel | string To indicate the channel of the payment, should be APP or WEB in requst |
| cardToken | string Only be submitted for direct payment as a substitution of the card numbers. Need to provide the cardTokenSrc at the same time. |
| cardTokenSrc | string The source of the card tokens, must be used with cardToken. Can be SPIRAL, APPLE_PAY, GOOGLE_PAY |
| successUrl | string <uri> The page to be redirect on the browser when payment completed successfully |
| failureUrl required | string <uri> The page to be redirect on the browser when payment did not complete successfully |
| webhookUrl required | string <uri> The endpoint of the payment result notification |
| metadata | string A json object that contains the user defined data. The data will not be used for the authorization or any other operation of the payment. It will be stored in the database and be further used for reporting or query. |
| duration | number number of days the qrCode will be valid (should be only used by the FPS bill payment sending via mail) |
| currency | string Currency code, default value is HKD |
{- "clientId": "merchantOne",
- "merchantRef": "Order-1001",
- "cmd": "SALE",
- "type": "VM",
- "amt": 100.5,
- "goodsName": "Sunmi T2 Lite",
- "goodsDesc": "Electronic product",
- "channel": "WEB",
- "cardToken": "ABCDEF1234567890",
- "cardTokenSrc": "SPIRAL",
- "metadata": {
- "orderId": "162836528",
- "activityDateTime": "2021-08-03T04:31:26",
- "customerId": "David"
}, - "duration": 30,
- "currency": "HKD"
}{- "dateTime": "string",
- "clientId": "testAccount",
- "merchantRef": "Order-1001",
- "cmd": "SALE",
- "orderId": "0c170aa0-7c5a-4b32-9529-102aaa454f51",
- "type": "VM",
- "txnId": "5fe3368b-453a-4cc1-81f1-4c2054cb4ca4",
- "txnType": "SALE",
- "merchantId": "H345678H3620000",
- "hostId": "1",
- "card": "VISA",
- "status": "Approved",
- "amt": 100.5,
- "resp": "APPROVED",
- "hostTime": "2021-02-03T17:29:09+08:00",
- "appCode": "123456",
- "pan": "444000xxxxxx0010",
- "expDate": "1027",
- "respMsg": "ok",
- "goodsName": "Sunmi T2 Lite",
- "goodsDesc": "Electronic product",
- "cardToken": 4444555566667777,
- "cardTokenSrc": "SPIRAL",
- "metadata": {
- "orderId": "162836528",
- "activityDateTime": "2021-08-03T04:31:26",
- "customerId": "David"
}, - "paidAmt": 100.5,
- "orderAmt": 100.5,
- "currency": "HKD"
}The API call for query transaction status
| clientId required | string Example: merchantOne The ID of the account assigned by Spiral |
| merchantRef required | string Example: 1627965086558-1 The reference created by merchants on this order, must be unique. |
| Spiral-Request-Datetime | string Example: 2021-08-03T04:31:26.558Z The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| Spiral-Client-Signature | string Example: KsUJDwropdIGZ/G6vVEXG4FiEOw/+u6dzeuYaFCxnulnJp9vrhyxP0wj0HxzXx/EQyOD6qq5VJFlFvw0Cez1/qnwpoQPHONOE0aQLcxFcEa7TpIU33Ihy3z0lMSRq5xVreuYSawRQi1kVOpVPtLPPBRbk/hYc1NqzQ/gVnwTgHOkP8Cuk4G2e1mV0sq7GISNcvilvOWGoD6DT0Qpln1Tz76ttEn+9dzAzq8G0dLAI2Xp7fJhKGjQNR+aaWibqq8x+FJFafZpFpMP835QUsZmcC740oV/nL2O0LpDpCrTGd5VjIBQa7hJ3q0m4MtEqiWKfTdQ1gZM6FJ+eFzS72qEOw== Signature of the client |
{- "dateTime": "string",
- "clientId": "testAccount",
- "merchantRef": "Order-1001",
- "cmd": "SALE",
- "orderId": "0c170aa0-7c5a-4b32-9529-102aaa454f51",
- "type": "VM",
- "txnId": "5fe3368b-453a-4cc1-81f1-4c2054cb4ca4",
- "txnType": "SALE",
- "merchantId": "H345678H3620000",
- "hostId": "1",
- "card": "VISA",
- "status": "Approved",
- "amt": 100.5,
- "resp": "APPROVED",
- "hostTime": "2021-02-03T17:29:09+08:00",
- "appCode": "123456",
- "pan": "444000xxxxxx0010",
- "expDate": "1027",
- "respMsg": "ok",
- "goodsName": "Sunmi T2 Lite",
- "goodsDesc": "Electronic product",
- "cardToken": 4444555566667777,
- "cardTokenSrc": "SPIRAL",
- "metadata": {
- "orderId": "162836528",
- "activityDateTime": "2021-08-03T04:31:26",
- "customerId": "David"
}, - "paidAmt": 100.5,
- "orderAmt": 100.5,
- "currency": "HKD"
}The API call for softPos operation
Remark- softPos app should send reversal when API timeout or received status code 502/504
| clientId required | string Example: merchantOne The ID of the account assigned by Spiral |
| merchantRef required | string Example: 1627965086558-1 The reference created by merchants on this order, must be unique. |
| Spiral-Request-Datetime | string Example: 2021-08-03T04:31:26.558Z The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| Spiral-Client-Signature | string Example: KsUJDwropdIGZ/G6vVEXG4FiEOw/+u6dzeuYaFCxnulnJp9vrhyxP0wj0HxzXx/EQyOD6qq5VJFlFvw0Cez1/qnwpoQPHONOE0aQLcxFcEa7TpIU33Ihy3z0lMSRq5xVreuYSawRQi1kVOpVPtLPPBRbk/hYc1NqzQ/gVnwTgHOkP8Cuk4G2e1mV0sq7GISNcvilvOWGoD6DT0Qpln1Tz76ttEn+9dzAzq8G0dLAI2Xp7fJhKGjQNR+aaWibqq8x+FJFafZpFpMP835QUsZmcC740oV/nL2O0LpDpCrTGd5VjIBQa7hJ3q0m4MtEqiWKfTdQ1gZM6FJ+eFzS72qEOw== Signature of the client |
| clientId required | string The ID of the account assigned by Spiral |
| merchantRef required | string The reference created on this order, must be unique. |
| cmd required | string indication of the operation |
| type required | string transaction type, should be VM / UnionPay / AMEX / Diners |
| merchantId required | string Merchant ID of the payment acquirer |
| terminalId required | string indicator ID of the terminal |
| card | string card type |
| amt required | number transaction amount |
| pan required | string Truncated Card PAN |
| expDate required | string Expiry date |
| batchId required | string Batch ID of the terminal |
| entryMode required | string entry mode, T for tapping card |
| track2 | string track 2 data |
| traceNo required | string track number |
| emvTags | string an json array of the object emv tag id and emv tag values |
| pinBlock | string pin block data, format to be defined |
| metadata | string A json object that contains the user defined data. The data will not be used for the authorization or any other operation of the payment. It will be stored in the database and be further used for reporting or query. |
| currency required | string payment currency |
{- "clientId": "testAccount",
- "merchantRef": "TID+timestamp+random number",
- "cmd": "SALE",
- "type": "VM",
- "merchantId": "H345678H3620000",
- "terminalId": "1",
- "card": "VISA",
- "amt": 100.5,
- "pan": "444000******0010",
- "expDate": "1027",
- "batchId": "000001",
- "entryMode": "T",
- "track2": "54233900074112640=99 1233 000123410000",
- "traceNo": "000011",
- "emvTags": {
- "9F02": "31323334",
- "9F36": "39FF41EFCCAA"
}, - "pinBlock": "TBC",
- "metadata": {
- "orderId": "162836528",
- "activityDateTime": "2021-08-03T04:31:26",
- "customerId": "David"
}, - "currency": "HKD"
}{- "dateTime": "string",
- "clientId": "testAccount",
- "merchantRef": "TID+timestamp+random number",
- "cmd": "SALE",
- "orderId": "0c170aa0-7c5a-4b32-9529-102aaa454f51",
- "type": "VM",
- "txnId": "5fe3368b-453a-4cc1-81f1-4c2054cb4ca4",
- "txnType": "SALE",
- "merchantId": "H345678H3620000",
- "hostId": "1",
- "status": "Approved",
- "amt": 100.5,
- "resp": "00",
- "hostTime": "2021-02-03T17:29:09+08:00",
- "appCode": "123456",
- "hostTxnId": "123456789012 (RRN)",
- "terminalId": "1",
- "card": "VISA",
- "pan": "444000xxxxxx0010",
- "expDate": "1027",
- "batchId": "000001",
- "traceNo": "000011",
- "emvTags": {
- "9F02": "31323334",
- "9F36": "39FF41EFCCAA"
}, - "metadata": {
- "orderId": "162836528",
- "activityDateTime": "2021-08-03T04:31:26",
- "customerId": "David"
}, - "currency": "HKD"
}The API call for softPos operation
Call settlement for every schedule time, once per TID
| clientId required | string Example: merchantOne The ID of the account assigned by Spiral |
| merchantRef required | string Example: 1627965086558-1 The reference created by merchants on this order, must be unique. |
| Spiral-Request-Datetime | string Example: 2021-08-03T04:31:26.558Z The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| Spiral-Client-Signature | string Example: KsUJDwropdIGZ/G6vVEXG4FiEOw/+u6dzeuYaFCxnulnJp9vrhyxP0wj0HxzXx/EQyOD6qq5VJFlFvw0Cez1/qnwpoQPHONOE0aQLcxFcEa7TpIU33Ihy3z0lMSRq5xVreuYSawRQi1kVOpVPtLPPBRbk/hYc1NqzQ/gVnwTgHOkP8Cuk4G2e1mV0sq7GISNcvilvOWGoD6DT0Qpln1Tz76ttEn+9dzAzq8G0dLAI2Xp7fJhKGjQNR+aaWibqq8x+FJFafZpFpMP835QUsZmcC740oV/nL2O0LpDpCrTGd5VjIBQa7hJ3q0m4MtEqiWKfTdQ1gZM6FJ+eFzS72qEOw== Signature of the client |
| clientId required | string The ID of the account assigned by Spiral |
| merchantRef required | string The reference created on this order, must be unique. |
| cmd required | string SETTLEMENT or SETTLEAFTERUPLOAD |
| type required | string transaction type, should be VM / UnionPay / AMEX / Diners |
| merchantId required | string Merchant ID of the payment acquirer |
| terminalId required | string indicator ID of the terminal |
| batchId required | string Batch ID of the terminal |
| traceNo required | string track number |
| saleTotal required | number total sale amount |
| saleCount required | number the count of number of sale transactions |
| voidedTotal required | number total voided transaction amount |
| voidedCount required | number the count of number of voided transactions |
| refundTotal required | number total refund amount |
| refundCount required | number the count of number of refund transaction |
| voidedRefundTotal required | number total refund amount |
| voidedRefundCount required | number the count of number of refund transaction |
| metadata | string A json object that contains the user defined data. The data will not be used for the authorization or any other operation of the payment. It will be stored in the database and be further used for reporting or query. |
{- "clientId": "testAccount",
- "merchantRef": "TID+timestamp+random number",
- "cmd": "SETTLEMENT",
- "type": "VM",
- "merchantId": "H345678H3620000",
- "terminalId": "1",
- "batchId": "000001",
- "traceNo": "000011",
- "saleTotal": 1000,
- "saleCount": 10,
- "voidedTotal": 1000,
- "voidedCount": 10,
- "refundTotal": 1000,
- "refundCount": 10,
- "voidedRefundTotal": 1000,
- "voidedRefundCount": 10,
- "metadata": {
- "orderId": "162836528",
- "activityDateTime": "2021-08-03T04:31:26",
- "customerId": "David"
}
}{- "dateTime": "string",
- "clientId": "testAccount",
- "merchantRef": "TID+timestamp+random number",
- "cmd": "SETTLEMENT",
- "type": "VM",
- "merchantId": "H345678H3620000",
- "status": "Approved",
- "resp": "00",
- "hostTime": "2021-02-03T17:29:09+08:00",
- "terminalId": "1",
- "batchId": "000001",
- "traceNo": "000011",
- "metadata": {
- "orderId": "162836528",
- "activityDateTime": "2021-08-03T04:31:26",
- "customerId": "David"
}
}The API call for creating a payment link from gateway
| clientId required | string Example: merchantOne The ID of the account assigned by Spiral |
| merchantRef required | string Example: 1627965086558-1 The reference created by merchants on this order, must be unique. |
| Spiral-Request-Datetime | string Example: 2021-08-03T04:31:26.558Z The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| Spiral-Client-Signature | string Example: KsUJDwropdIGZ/G6vVEXG4FiEOw/+u6dzeuYaFCxnulnJp9vrhyxP0wj0HxzXx/EQyOD6qq5VJFlFvw0Cez1/qnwpoQPHONOE0aQLcxFcEa7TpIU33Ihy3z0lMSRq5xVreuYSawRQi1kVOpVPtLPPBRbk/hYc1NqzQ/gVnwTgHOkP8Cuk4G2e1mV0sq7GISNcvilvOWGoD6DT0Qpln1Tz76ttEn+9dzAzq8G0dLAI2Xp7fJhKGjQNR+aaWibqq8x+FJFafZpFpMP835QUsZmcC740oV/nL2O0LpDpCrTGd5VjIBQa7hJ3q0m4MtEqiWKfTdQ1gZM6FJ+eFzS72qEOw== Signature of the client |
| clientId required | string The ID of the account assigned by Spiral |
| merchantRef required | string The reference created by merchants on this order, must be unique. |
| amt required | number transaction amount |
| goodsName required | string Goods title |
| goodsDesc | string Description of Goods |
| webhookUrl required | string <uri> The endpoint of the payment result notification |
| durationHr required | number number of hours the payment link will be valid |
{- "clientId": "merchantOne",
- "merchantRef": "Order-1001",
- "amt": 100.5,
- "goodsName": "Sunmi T2 Lite",
- "goodsDesc": "Electronic product",
- "durationHr": 24
}{- "clientId": "testAccount",
- "merchantRef": "Order-1001",
- "approvedTxnId": "5fe3368b-453a-4cc1-81f1-4c2054cb4ca4",
- "status": "Unconfirmed",
- "amt": 100.5,
}The API call for query payment link status
| clientId required | string Example: merchantOne The ID of the account assigned by Spiral |
| merchantRef required | string Example: 1627965086558-1 The reference created by merchants on this order, must be unique. |
| Spiral-Request-Datetime | string Example: 2021-08-03T04:31:26.558Z The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| Spiral-Client-Signature | string Example: KsUJDwropdIGZ/G6vVEXG4FiEOw/+u6dzeuYaFCxnulnJp9vrhyxP0wj0HxzXx/EQyOD6qq5VJFlFvw0Cez1/qnwpoQPHONOE0aQLcxFcEa7TpIU33Ihy3z0lMSRq5xVreuYSawRQi1kVOpVPtLPPBRbk/hYc1NqzQ/gVnwTgHOkP8Cuk4G2e1mV0sq7GISNcvilvOWGoD6DT0Qpln1Tz76ttEn+9dzAzq8G0dLAI2Xp7fJhKGjQNR+aaWibqq8x+FJFafZpFpMP835QUsZmcC740oV/nL2O0LpDpCrTGd5VjIBQa7hJ3q0m4MtEqiWKfTdQ1gZM6FJ+eFzS72qEOw== Signature of the client |
{- "clientId": "testAccount",
- "merchantRef": "Order-1001",
- "approvedTxnId": "5fe3368b-453a-4cc1-81f1-4c2054cb4ca4",
- "status": "Unconfirmed",
- "amt": 100.5,
}The API call for querying a list of the transactions within the time range for reconciliations purpose. Only processed transactions will be returned.
| clientId required | string The ID of the account assigned by Spiral |
| Spiral-Request-Datetime | string Example: 2021-08-03T04:31:26.558Z The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| Spiral-Client-Signature | string Example: KsUJDwropdIGZ/G6vVEXG4FiEOw/+u6dzeuYaFCxnulnJp9vrhyxP0wj0HxzXx/EQyOD6qq5VJFlFvw0Cez1/qnwpoQPHONOE0aQLcxFcEa7TpIU33Ihy3z0lMSRq5xVreuYSawRQi1kVOpVPtLPPBRbk/hYc1NqzQ/gVnwTgHOkP8Cuk4G2e1mV0sq7GISNcvilvOWGoD6DT0Qpln1Tz76ttEn+9dzAzq8G0dLAI2Xp7fJhKGjQNR+aaWibqq8x+FJFafZpFpMP835QUsZmcC740oV/nL2O0LpDpCrTGd5VjIBQa7hJ3q0m4MtEqiWKfTdQ1gZM6FJ+eFzS72qEOw== Signature of the client (no merchantRef such payload is constructed from clientId & time) |
| dateTimeStart required | string The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| dateTimeEnd required | string The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| limit | integer The maximum number of transactions return in a single message, default value is 50 and the maximum limit is 100 |
| nextToken | string The value is returned in previous query and used for pagination. Do not include this field in the first query. |
{- "dateTimeStart": "2022-03-02T08:00:00Z",
- "dateTimeEnd": "2021-03-03T08:00:00Z",
- "limit": 100,
- "nextToken": "{\"merchantRef\": \"1676337454148\", \"clientId\": \"hebbe\", \"dateTime\": \"2021-08-03T09:17:44Z\"}"
}{- "clientId": "testAccount",
- "nextToken": "{\"merchantRef\": \"1676337454100\", \"clientId\": \"hebbe\", \"dateTime\": \"2021-08-00T08:17:44Z\"}",
- "dateTime": "2023-03-03 11:34:06+0800",
- "txns": [
- {
- "dateTime": "2023-03-03 11:33:10+0800",
- "clientId": "eftit",
- "cmd": "SALESESSION",
- "txnType": "SALE",
- "type": "PAYME",
- "orderId": "beac7f26-5b09-45b2-938a-84465c9225fa",
- "txnId": "d76d57f0-43bc-4165-a3c7-5dec8a2f7b28",
- "merchantId": "cbfb84ac-127e-4ec2-af79-5532eab2f5b0",
- "merchantRef": "1677811441941",
- "gatewayRef": "1677811441941",
- "card": "PAYME",
- "status": "Approved",
- "resp": "001",
- "pan": "ff00000000000000000001",
- "currency": "HKD",
- "amt": 0.81,
- "paidAmt": 0.81,
- "goodsName": "Test Product",
- "hostId": "16",
- "hostTime": "2023-03-03T03:33:12Z",
- "sessionId": "PMDd76d57f0eftit+1677811441941"
}, - {
- "dateTime": "2023-03-03 11:33:14+0800",
- "clientId": "eftit",
- "cmd": "SALESESSION",
- "txnType": "SALE",
- "type": "PAYME",
- "orderId": "166856a2-7a66-4c46-9e6e-aa5e00e78fcf",
- "txnId": "7d4cd34e-5ac6-42fe-980e-7c0f23273b4a",
- "merchantId": "cbfb84ac-127e-4ec2-af79-5532eab2f5b0",
- "merchantRef": "1677814392912",
- "gatewayRef": "1677814392912",
- "card": "PAYME",
- "status": "Approved",
- "resp": "001",
- "pan": "ff00000000000000000003",
- "currency": "HKD",
- "amt": 0.81,
- "paidAmt": 0.81,
- "goodsName": "Test Product",
- "hostId": "16",
- "hostTime": "2023-03-03T03:33:15Z",
- "sessionId": "PMD7d4cd34eeftit+1677814392912"
}
]
}The webhook to notify merchant on the transaction result
| transactionWebhookURL required | string The URL specified in the sale request |
| Spiral-Request-Datetime | string Example: 2021-08-03T04:31:26.558Z The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| Spiral-Server-Signature | string Example: KsUJDwropdIGZ/G6vVEXG4FiEOw/+u6dzeuYaFCxnulnJp9vrhyxP0wj0HxzXx/EQyOD6qq5VJFlFvw0Cez1/qnwpoQPHONOE0aQLcxFcEa7TpIU33Ihy3z0lMSRq5xVreuYSawRQi1kVOpVPtLPPBRbk/hYc1NqzQ/gVnwTgHOkP8Cuk4G2e1mV0sq7GISNcvilvOWGoD6DT0Qpln1Tz76ttEn+9dzAzq8G0dLAI2Xp7fJhKGjQNR+aaWibqq8x+FJFafZpFpMP835QUsZmcC740oV/nL2O0LpDpCrTGd5VjIBQa7hJ3q0m4MtEqiWKfTdQ1gZM6FJ+eFzS72qEOw== Signature of the Server |
| dateTime | string transaction date time in YY-MM-DD hh:mm:ss+0800 format |
| clientId required | string The ID of the account assigned by Spiral |
| merchantRef required | string The reference created by merchants on this order, must be unique. |
| cmd required | string indication of the operation |
| orderId required | string <uuid> generated by Spiral, reference for an order |
| type required | string transaction type, details refer to the Support Types page. |
| txnId required | string <uuid> generated by Spiral, if a refund to made to a sale transaction, the OrderID will be the same with a new TxnID |
| txnType | string Transaction type, SALE/AUTH/CAPTURE/REFUND |
| merchantId required | string Merchant ID of the payment acquirer |
| hostId required | string indicator ID of the payment acquirer |
| card | string card type |
| status required | string Status of the transaction |
| amt required | number transaction amount |
| resp | string Response Code from the payment acquirer |
| hostTime required | string <date-time> The transaction time from the payment system |
| appCode | string Approval code |
| pan | string Card PAN in truncated format. |
| expDate | string Expiry date. Usually in truncated format. |
| respMsg | string Response Message (Text) from the payment system |
| goodsName | string Goods title for eComm |
| goodsDesc | string Description of Goods that will be an indication to payment or discount calculation or shown as info in eComm |
| cardToken | string Only be submitted for direct payment as a substitution of the card numbers. Need to provide the cardTokenSrc at the same time. |
| cardTokenSrc | string The source of the card tokens, can be SPIRAL, APPLE_PAY, GOOGLE_PAY |
| metadata | string A json object that contains the user defined data. The data will not be used for the authorization or any other operation of the payment. It will be stored in the database and be further used for reporting or query. |
| paidAmt required | number Amount paid (It should be identical to amt except FPS) |
| orderAmt | number Total amount paid for this order, only available for FPS |
| currency | string payment currency |
{- "dateTime": "string",
- "clientId": "testAccount",
- "merchantRef": "Order-1001",
- "cmd": "SALE",
- "orderId": "0c170aa0-7c5a-4b32-9529-102aaa454f51",
- "type": "VM",
- "txnId": "5fe3368b-453a-4cc1-81f1-4c2054cb4ca4",
- "txnType": "SALE",
- "merchantId": "H345678H3620000",
- "hostId": "1",
- "card": "VISA",
- "status": "Approved",
- "amt": 100.5,
- "resp": "APPROVED",
- "hostTime": "2021-02-03T17:29:09+08:00",
- "appCode": "123456",
- "pan": "444000xxxxxx0010",
- "expDate": "1027",
- "respMsg": "ok",
- "goodsName": "Sunmi T2 Lite",
- "goodsDesc": "Electronic product",
- "cardToken": 4444555566667777,
- "cardTokenSrc": "SPIRAL",
- "metadata": {
- "orderId": "162836528",
- "activityDateTime": "2021-08-03T04:31:26",
- "customerId": "David"
}, - "paidAmt": 100.5,
- "orderAmt": 100.5,
- "currency": "HKD"
}The webhook to notify merchant on the payment link result
| paymentLinkWebhookURL required | string The URL specified in the sale request |
| Spiral-Request-Datetime | string Example: 2021-08-03T04:31:26.558Z The UTC time in %Y-%m-%d'T'%H:%M:%S'Z' format when the request/response is composed |
| Spiral-Server-Signature | string Example: KsUJDwropdIGZ/G6vVEXG4FiEOw/+u6dzeuYaFCxnulnJp9vrhyxP0wj0HxzXx/EQyOD6qq5VJFlFvw0Cez1/qnwpoQPHONOE0aQLcxFcEa7TpIU33Ihy3z0lMSRq5xVreuYSawRQi1kVOpVPtLPPBRbk/hYc1NqzQ/gVnwTgHOkP8Cuk4G2e1mV0sq7GISNcvilvOWGoD6DT0Qpln1Tz76ttEn+9dzAzq8G0dLAI2Xp7fJhKGjQNR+aaWibqq8x+FJFafZpFpMP835QUsZmcC740oV/nL2O0LpDpCrTGd5VjIBQa7hJ3q0m4MtEqiWKfTdQ1gZM6FJ+eFzS72qEOw== Signature of the Server |
| clientId required | string The ID of the account assigned by Spiral |
| merchantRef required | string The reference created by merchants on this order, must be unique. |
| approvedTxnId required | string the txnId of the approved transaction of the payment link |
| status required | string Status of the transaction |
| amt required | number transaction amount |
| paymentLinkUrl required | string payment link URL |
{- "clientId": "testAccount",
- "merchantRef": "Order-1001",
- "approvedTxnId": "5fe3368b-453a-4cc1-81f1-4c2054cb4ca4",
- "status": "Unconfirmed",
- "amt": 100.5,
}