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
billingInformation{ email, country, ... }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
nullor empty-string values to clear existing information; omit fields that do not need to change.
merchantNoMerchant number assigned by Onerway. See Setup for how to obtain it.
Example:
replace_with_merchant_nomerchantTxnIdCondition: Provide
Merchant transaction identifier of the order to update. It must match the merchantTxnId or transactionId; at least one is required.merchantTxnId submitted in the original transaction creation request.Example:
example_sdk_txn_001Constraints
- Consistency
- When both
merchantTxnIdandtransactionIdare submitted, they must identify the same original transaction.
newMerchantTxnIdNew 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.orderAmountCurrent order amount in the original transaction currency, formatted as a decimal string. Format rules follow currency and amount validation.
Example:
99.99Constraints
- Rule
- Always required. Even when only billing or shipping information is updated, resubmit the current order amount.
shippingInformation{ email, country, ... }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
nullor empty-string values to clear existing information; omit fields that do not need to change.
signRequest signature string. See Request signing for how to generate it.
transactionIdCondition: Provide
Onerway transaction identifier of the order to update. It must match the transactionId or merchantTxnId; at least one is required.transactionId returned by the original transaction creation response.Example:
example_transaction_id_updateConstraints
- Consistency
- When both
transactionIdandmerchantTxnIdare submitted, they must identify the same original transaction.
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
respCodeResponse code;
20000 means the request was processed successfully, other values are error codes. See Response codes.respMsgHuman-readable message for the response code.
data{ transactionId, responseTime, ... }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.
{
"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.