Skip to main content

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 or orderNo 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 is SUCCESS and code is 0.

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

CodeMessageCauseWorkaround
0SUCCESSRequest completed successfully-
400INVALID_PARAMETERInvalid request parametersVerify and correct request parameters
400REQUESTTIME_TOO_EARLYRequest time is too early compared to current timeAdjust request time
400REQUESTTIME_TOO_LATERRequest time is too late compared to current timeAdjust request time
402RATE_LIMIT_REJECTRequest frequency is too highReduce request frequency
403UNAUTHORIZEDAPI is not authorizedContact PayBy for authorization
404SERVICE_NOT_AVAILABLEAPI service is unavailableContact PayBy support
500SYSTEM_ERRORSystem error occurredContact PayBy support and retry later
504SERVICE_TIMEOUTService timeoutRetry the request
601RISK_FAILRisk control validation failedReview and adjust business parameters
62089INVALID_EXPIRED_TIMEInvalid expiration time providedEnsure expiration time is within 15 days from current time