Adjust Order Expiration Time
Overview
This interface allows you to adjust the expiration time for existing orders. The new expiration time must be within 15 days from the time of the API call.
API URL
- Testing URL:
https://uat.test2pay.com/sgs/api/acquire2/updateExpiredTime
- Production URL:
https://api.payby.com/sgs/api/acquire2/updateExpiredTime
Request
HTTP Headers
Attributes
Content-Language String
- Language in which the response message will be used.
- Currently, only English is supported.
- Example value:
en
- Maximum length:
10
Content-Type String Required
- Media type of the request body.
- Required for operations with a request body.
- Format:
application/<format>
(e.g.,application/json
) - Example value:
application/json
sign String Required
- Request signature using private-key cryptography.
- Ensures the payment gateway can verify the request origin.
Partner-Id String Required
- Merchant ID of your account.
- Example value:
200001200101
- Maximum length:
12
HTTP Body
requestTime Timestamp(3) Required
- Timestamp of the request in milliseconds.
- Example value:
1581493898000
bizContent UpdateExpiredTimeRequest Required
Contains the business-specific request data.
merchantOrderNo String(64)
- Merchant's reference number of the request.
- Either
merchantOrderNo
ororderNo
must be provided, but not both. - Example value:
M965739182419
orderNo String(32)
- PayBy's unique identification number of the order.
- Example value:
131404956265007836
expiredTime Timestamp(3) Required
- New expiration time in milliseconds.
- Must be within 15 days.
- Example value:
1581412155966
Request Sample
HTTP Headers
{
"Content-Language": "en",
"Content-Type": "application/json",
"sign": "Tu3fopHy1opsWVTAk12FSr8KsGMcFTQB0dOH4fPGrG8iKvhcGCsmCr4kOy3CBmv7zXpBNfMxoRW33YPz0Zm6503CDnqxlOZGaOCFSmwnsE01vDzZL489wPj5HEKJ7kk70/muDMiUwJubZoXVtmOGhpvvczJDYIhP/5kpwSkucdkjZwrlp7IGqoFHrgKgZXXieOsUlGJHb9xg+HchtCqCYaOvX+gIK/o88SdgogvGm8NW/N4dzBhnfbwPcC7ue3MO8mwCDkJ/5KavK8TEotSeTvFEyhAvzrd41ccg47SWXZ4UnhvwT06iIYZ67G4Xg24Bc97cQe1XFM9CPd+/8w7uDA==",
"Partner-Id": "200000000888"
}
HTTP Body
{
"requestTime": 1581405884647,
"bizContent": {
"merchantOrderNo": "M965739182419",
"expiredTime": 1581412155966
}
}
Response
HTTP Headers
- sign String Required
- Response signature for verification.
Note: The body field in the HTTP response is only returned when
applyStatus
isSUCCESS
andcode
is0
.
HTTP Body
head ResponseHeader Required
- Contains response status information.
body GetOrderResponse
Contains order details when the request is successful.
acquireOrder AcquireOrder Required
- Complete order details including updated expiration time.
Response Sample
HTTP Headers
{
"sign": "nDdClX1tAyV3qcX/Epay6AXFNRGSsWd8ysWO9SgwPrNTetSePLA9C39mGp6qRbjJeqXLEnYLwSkBu5eKdtyVX3tflGLiV2kvRjVfYpTCjXdVL2Pcnv2w+ghjHe2jL988iklk7q5AjAgdtXNphpHcTes9pk6W3bVCbvijH6at0fExUtZ91L1LrnPGELT1IJm/lFW3w4KLh0Gxs7FzDPI9RDfUemObNlRzV8kCtkWahwPgs/hBnS69GyYDKN7ihQX2UiLuP239wl6IA+VG/ZZKHPhLs8bbuOS+LKWORIp6jRt+JsAx7c/Ot1RNyOnHKxPRKJ8bVTohEp39yUz/HwG8oA=="
}
HTTP Body
{
"head": {
"applyStatus": "SUCCESS",
"code": "0",
"msg": "SUCCESS"
},
"body": {
"acquireOrder": {
"merchantOrderNo": "M965739182419",
"orderNo": "131404956265007836",
"status": "SETTLED",
"reserved": "order desc",
"paymentInfo": {
"paidAmount": {
"currency": "AED",
"amount": 1.01
},
"paidTime": 1581405372000,
"payerMid": "100000001104",
"payeeFeeAmount": {
"currency": "AED",
"amount": 0.5
},
"payerFeeAmount": {
"currency": "AED",
"amount": 0
},
"payChannel": "BALANCE"
},
"product": "Basic Payment Gateway",
"totalAmount": {
"currency": "AED",
"amount": 1.01
},
"payeeMid": "200000000888",
"expiredTime": 1581412155966,
"notifyUrl": "http://www.yoursite.com",
"subject": "Your subjet",
"requestTime": 1581404955966,
"accessoryContent": {
"amountDetail": {},
"goodsDetail": {},
"terminalDetail": {}
},
"paySceneCode": "JSAPI",
"revoked": "false"
}
}
}
Response Codes
Code | Message | Cause | Workaround |
---|---|---|---|
0 | SUCCESS | Request completed successfully | - |
400 | INVALID_PARAMETER | Invalid request parameters | Verify and correct request parameters |
400 | REQUESTTIME_TOO_EARLY | Request time is too early compared to current time | Adjust request time |
400 | REQUESTTIME_TOO_LATER | Request time is too late compared to current time | Adjust request time |
402 | RATE_LIMIT_REJECT | Request frequency is too high | Reduce request frequency |
403 | UNAUTHORIZED | API is not authorized | Contact PayBy for authorization |
404 | SERVICE_NOT_AVAILABLE | API service is unavailable | Contact PayBy support |
500 | SYSTEM_ERROR | System error occurred | Contact PayBy support and retry later |
504 | SERVICE_TIMEOUT | Service timeout | Retry the request |
601 | RISK_FAIL | Risk control validation failed | Review and adjust business parameters |
62089 | INVALID_EXPIRED_TIME | Invalid expiration time provided | Ensure expiration time is within 15 days from current time |