Onerway
POST

Update SDK order

Use this endpoint to update the order amount, billing information, or shipping information of an SDK transaction before the customer confirms payment.

Request

Updated transaction billing information, including the customer billing address and contact details. Submit it only when the billing information needs to change; submitted fields overwrite the corresponding values of the original transaction, and the object's nested required fields and conditions still apply.
Constraints
Rule
Do not submit null or empty-string values to clear existing information; omit fields that do not need to change.
merchantNo
Merchant number assigned by Onerway. See Setup for how to obtain it.
Example:
merchantTxnId
Condition: Provide merchantTxnId or transactionId; at least one is required.
Merchant transaction identifier of the order to update. It must match the merchantTxnId submitted in the original transaction creation request.
Example:
Constraints
Consistency
When both merchantTxnId and transactionId are submitted, they must identify the same original transaction.
newMerchantTxnId
New merchant transaction identifier that replaces the merchantTxnId of the original order. Omit this field when the merchant transaction identifier does not change; after a successful update, use the new identifier in subsequent requests.
orderAmount
Current order amount in the original transaction currency, formatted as a decimal string. Format rules follow currency and amount validation.
Example:
Constraints
Rule
Always required. Even when only billing or shipping information is updated, resubmit the current order amount.
Updated transaction shipping information, including the customer delivery address and contact details. Submit it only when the shipping information needs to change; submitted fields overwrite the corresponding values of the original transaction, and the object's nested required fields and conditions still apply.
Constraints
Rule
Do not submit null or empty-string values to clear existing information; omit fields that do not need to change.
sign
Request signature string. See Request signing for how to generate it.
transactionId
Condition: Provide transactionId or merchantTxnId; at least one is required.
Onerway transaction identifier of the order to update. It must match the transactionId returned by the original transaction creation response.
Example:
Constraints
Consistency
When both transactionId and merchantTxnId are submitted, they must identify the same original transaction.

Request example

curl -X POST 'https://sandbox-acq.onerway.com/v1/sdkTxn/updateOrder' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "merchantNo": "replace_with_merchant_no",
  "orderAmount": "25.00",
  "sign": "replace_with_calculated_signature",
  "transactionId": "example_transaction_id_update"
}'

Response

respCode
Response code; 20000 means the request was processed successfully, other values are error codes. See Response codes.
respMsg
Human-readable message for the response code.
Business data object of the update order acknowledgement. A successful response only confirms that the order update was accepted; it is not a payment result. Determine the final payment status through the server-side payment webhook or a transaction query.

Response example

{
  "respCode": "20000",
  "respMsg": "Success",
  "data": {
    "transactionId": "example_transaction_id_update",
    "responseTime": null,
    "txnTime": null,
    "txnTimeZone": null,
    "orderAmount": null,
    "orderCurrency": null,
    "txnAmount": null,
    "txnCurrency": null,
    "status": null,
    "redirectUrl": null,
    "contractId": null,
    "tokenId": null,
    "eci": null,
    "periodValue": null,
    "codeForm": null,
    "presentContext": null,
    "actionType": null,
    "subscriptionManageUrl": null,
    "sign": "replace_with_response_signature"
  }
}
No error responses are documented for this endpoint.