Capture
Info
This api is used to allow an approved transaction to proceed forwards to settlement. It is only necessary to capture a transaction if merchant specified capture:'N'
in the original purchase request
Endpoint
https://api.grubpay.io/v4/capture
Method:
POST
Header
Content-Type: application/json;charset=UTF-8
Request
Name | Required | Type | Sample | Description |
---|---|---|---|---|
mchId | y | String | 10000701 | assigned by GrubPay |
mchOrderNo | y* | String | 1234567890abc | |
payOrderId | y* | String | PC1982739182398 | |
amount | y | Int | 1500 | must > 0; cannot exceed original transaction amount |
loginName | y | String(12) | jack123 | merchant's login name |
sign | y | String(32) | C380BEC2BFD727A4B6845133519F3AD6 | Sign algorithm |
*use either payOrderId
or mchOrderNo
, use one of them
Response
name | Required | type | sample | description |
---|---|---|---|---|
retCode | y | String | SUCCESS or FAIL | |
retMsg | y | String | ||
retData | y | JSON | if retCode=SUCCESS, order detailed info returned |
retData contains order information:
name | required | type | sample | description |
---|---|---|---|---|
payOrderId | y | String | SUCCESS or FAIL | |
mchId | y | String | ||
mchOrderNo | n | String | ||
originalOrderId | n | String | original pay order id for refund | |
amount | y | Int | 100 | in cents |
currency | y | String | CAD | |
payType | y | String | pay or refund | |
refundable | y | Int | 100 | in cents |
status | y | Int | 0,1,2,9 | 0 = pending order, 1 = unknown, 2 = success, 9 = fail |
recurringId | y | Int | recurring payment id this transaction belongs to ( 0 if non-recurring) | |
paySuccTime | y | String | 2021-04-07 19:44:51 | |
cardNum | y | String | 432567******2266 | |
cardType | y | String | ||
expiryDate | y | String | ||
authNum | y | String | ||
transNum | y | String | ||
channel | y | String | CC_CARD | fixed value:CC_CARD |