# Update SDK order

> Update the order amount, billing information, or shipping information of an SDK transaction before the customer confirms payment.

```yaml
openapi: 3.1.0
info:
  title: Update SDK order
  version: 1.0.0
  description: Update the order amount, billing information, or shipping
    information of an SDK transaction before the customer confirms payment.
paths:
  /v1/sdkTxn/updateOrder:
    post:
      summary: Update SDK order
      description: Update the order amount, billing information, or shipping
        information of an SDK transaction before the customer confirms payment.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                billingInformation:
                  type: string
                  description: 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.
                  contentMediaType: application/json
                  contentSchema:
                    type: object
                    properties:
                      firstName:
                        type: string
                        description: Customer first name.
                      lastName:
                        type: string
                        description: Customer last name.
                      jpFirstName:
                        type: string
                        description: Customer first name in Japanese Katakana. Required only for Japan
                          payment methods and Japan-issued cards.
                      jpLastName:
                        type: string
                        description: Customer last name in Japanese Katakana. Required only for Japan
                          payment methods and Japan-issued cards.
                      phone:
                        type: string
                        description: Customer phone number, local part only without country code. Pass
                          the country code separately in `phoneCountryCode`,
                          which combines with this field into the full number.
                          Onerway does not strictly validate the format.
                      phoneCountryCode:
                        type: string
                        description: Country dialing code of the customer phone number, digits only
                          without `+`; combines with `phone` to form the full
                          number.
                      email:
                        type: string
                        description: Customer email address, used for transaction confirmations and
                          dispute handling.
                      postalCode:
                        type: string
                        description: Postal or ZIP code. Commonly used by AVS checks.
                      address:
                        type: string
                        description: Full address in a single field. It can replace split street, house
                          number, and city fields for general address capture,
                          but should not be used as the only address input when
                          AVS is required.
                      country:
                        type: string
                        description: Country in [ISO 3166-1
                          alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
                          format.
                      province:
                        type: string
                        description: Province or state code in [ISO
                          3166-2](https://en.wikipedia.org/wiki/ISO_3166-2#Current_codes)
                          format.
                        x-onerway-required: conditional
                        x-onerway-condition:
                          - Required when `country` is `US` or `CA`.
                      city:
                        type: string
                        description: City name. Recommended when AVS or a complete billing address is
                          required to improve address completeness,
                          authorization rate, and risk checks. Actual validation
                          dimensions vary by issuer and region.
                      street:
                        type: string
                        description: Street name. When AVS is enabled, provide it separately with
                          `number`, `postalCode`, and `city` as billing-address
                          verification data instead of relying only on the full
                          `address` field.
                      number:
                        type: string
                        description: House or building number. When AVS is enabled, provide it
                          separately with `street`, `postalCode`, and `city` as
                          billing-address verification data.
                      identityNumber:
                        type: string
                        description: Government-issued identity identifier, usually required by selected
                          local payment methods. It may be a national ID number
                          or a personal tax number.
                      birthDate:
                        type: string
                        description: Birth date in `yyyy/MM/dd` format.
                    required:
                      - email
                      - country
                  x-onerway-constraints:
                    - kind: rule
                      text: Do not submit `null` or empty-string values to clear existing information;
                        omit fields that do not need to change.
                  x-onerway-format: json_string
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway. See
                    [Setup](/payments/get-started/setup#retrieve-your-credentials)
                    for how to obtain it.
                merchantTxnId:
                  type: string
                  description: Merchant transaction identifier of the order to update. It must
                    match the `merchantTxnId` submitted in the original
                    transaction creation request.
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - Provide `merchantTxnId` or `transactionId`; at least one
                      is required.
                  x-onerway-constraints:
                    - kind: consistency
                      text: When both `merchantTxnId` and `transactionId` are submitted, they must
                        identify the same original transaction.
                newMerchantTxnId:
                  type: string
                  description: 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:
                  type: string
                  description: Current order amount in the original transaction currency,
                    formatted as a decimal string. Format rules follow [currency
                    and amount
                    validation](/payments/get-started/currency-and-amount).
                  x-onerway-constraints:
                    - kind: rule
                      text: Always required. Even when only billing or shipping information is
                        updated, resubmit the current order amount.
                shippingInformation:
                  type: string
                  description: 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.
                  contentMediaType: application/json
                  contentSchema:
                    type: object
                    properties:
                      firstName:
                        type: string
                        description: Customer first name.
                      lastName:
                        type: string
                        description: Customer last name.
                      jpFirstName:
                        type: string
                        description: Customer first name in Japanese Katakana. Required only for Japan
                          payment methods and Japan-issued cards.
                      jpLastName:
                        type: string
                        description: Customer last name in Japanese Katakana. Required only for Japan
                          payment methods and Japan-issued cards.
                      phone:
                        type: string
                        description: Customer phone number, local part only without country code. Pass
                          the country code separately in `phoneCountryCode`,
                          which combines with this field into the full number.
                          Onerway does not strictly validate the format.
                      phoneCountryCode:
                        type: string
                        description: Country dialing code of the customer phone number, digits only
                          without `+`; combines with `phone` to form the full
                          number.
                      email:
                        type: string
                        description: Customer email address, used for transaction confirmations and
                          dispute handling.
                      postalCode:
                        type: string
                        description: Postal or ZIP code. Commonly used by AVS checks.
                      address:
                        type: string
                        description: Full address in a single field. It can replace split street, house
                          number, and city fields for general address capture,
                          but should not be used as the only address input when
                          AVS is required.
                      country:
                        type: string
                        description: Country in [ISO 3166-1
                          alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
                          format.
                      province:
                        type: string
                        description: Province or state code in [ISO
                          3166-2](https://en.wikipedia.org/wiki/ISO_3166-2#Current_codes)
                          format.
                        x-onerway-required: conditional
                        x-onerway-condition:
                          - Required when `country` is `US` or `CA`.
                      city:
                        type: string
                        description: City name. Recommended when AVS or a complete billing address is
                          required to improve address completeness,
                          authorization rate, and risk checks. Actual validation
                          dimensions vary by issuer and region.
                      street:
                        type: string
                        description: Street name. When AVS is enabled, provide it separately with
                          `number`, `postalCode`, and `city` as billing-address
                          verification data instead of relying only on the full
                          `address` field.
                      number:
                        type: string
                        description: House or building number. When AVS is enabled, provide it
                          separately with `street`, `postalCode`, and `city` as
                          billing-address verification data.
                      identityNumber:
                        type: string
                        description: Government-issued identity identifier, usually required by selected
                          local payment methods. It may be a national ID number
                          or a personal tax number.
                      birthDate:
                        type: string
                        description: Birth date in `yyyy/MM/dd` format.
                    required:
                      - email
                      - country
                  x-onerway-constraints:
                    - kind: rule
                      text: Do not submit `null` or empty-string values to clear existing information;
                        omit fields that do not need to change.
                  x-onerway-format: json_string
                sign:
                  type: string
                  description: Request signature string. See [Request
                    signing](/payments/get-started/request-signing) for how to
                    generate it.
                transactionId:
                  type: string
                  description: Onerway transaction identifier of the order to update. It must
                    match the `transactionId` returned by the original
                    transaction creation response.
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - Provide `transactionId` or `merchantTxnId`; at least one
                      is required.
                  x-onerway-constraints:
                    - kind: consistency
                      text: When both `transactionId` and `merchantTxnId` are submitted, they must
                        identify the same original transaction.
              required:
                - merchantNo
                - orderAmount
                - sign
            examples:
              update-order-amount:
                summary: Update the order amount
                value:
                  merchantNo: replace_with_merchant_no
                  orderAmount: "25.00"
                  sign: replace_with_calculated_signature
                  transactionId: example_transaction_id_update
              update-addresses:
                summary: Update billing and shipping information
                value:
                  billingInformation: '{"country":"US","email":"customer@example.com","province":"CA"}'
                  merchantNo: replace_with_merchant_no
                  merchantTxnId: example_sdk_txn_001
                  orderAmount: "1"
                  shippingInformation: '{"country":"US","email":"customer@example.com","province":"CA"}'
                  sign: replace_with_calculated_signature
              update-merchant-txn-id:
                summary: Replace the merchant transaction identifier
                value:
                  merchantNo: replace_with_merchant_no
                  merchantTxnId: example_sdk_txn_001
                  newMerchantTxnId: example_sdk_txn_001_v2
                  orderAmount: "1"
                  sign: replace_with_calculated_signature
      responses:
        "200":
          description: Order update accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Response code; `20000` means the request was processed
                      successfully, other values are error codes. See [Response
                      codes](/payments/api-reference/response-codes).
                  respMsg:
                    type: string
                    description: Human-readable message for the response code.
                  data:
                    type: object
                    properties:
                      transactionId:
                        type: string
                        description: Onerway transaction identifier of the updated order.
                      responseTime:
                        type:
                          - string
                          - "null"
                        description: API response time in `yyyy-MM-dd HH:mm:ss` format.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      txnTime:
                        type:
                          - string
                          - "null"
                        description: Transaction completion time in `yyyy-MM-dd HH:mm:ss` format.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response; payment has
                              not completed at this stage.
                            zh: 更新订单确认响应中返回 `null`；该阶段支付尚未完成。
                      txnTimeZone:
                        type:
                          - string
                          - "null"
                        description: Transaction time zone offset in `±HH:mm` format.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      orderAmount:
                        type:
                          - string
                          - "null"
                        description: Order amount in the transaction currency.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response; after a
                              success response, the amount submitted in the
                              update request is authoritative.
                            zh: 更新订单确认响应中返回 `null`；成功响应后以商户请求中的更新金额为准。
                      orderCurrency:
                        type:
                          - string
                          - "null"
                        description: Order currency, a three-letter [ISO
                          4217](https://en.wikipedia.org/wiki/ISO_4217) currency
                          code.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      txnAmount:
                        type:
                          - string
                          - "null"
                        description: Legacy settlement amount field; not populated by this endpoint.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      txnCurrency:
                        type:
                          - string
                          - "null"
                        description: Legacy settlement currency field; not populated by this endpoint.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      status:
                        type:
                          - string
                          - "null"
                        description: Transaction processing status.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response; the order
                              update itself does not change the transaction
                              processing status.
                            zh: 更新订单确认响应中返回 `null`；订单更新本身不改变交易处理状态。
                      redirectUrl:
                        type:
                          - string
                          - "null"
                        description: The current Web SDK initializes with `paymentId` and does not
                          consume this field.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      contractId:
                        type:
                          - string
                          - "null"
                        description: Subscription contract ID; not populated by this endpoint.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      tokenId:
                        type:
                          - string
                          - "null"
                        description: Payment token identifier; not populated by this endpoint.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      eci:
                        type:
                          - string
                          - "null"
                        description: Electronic Commerce Indicator (ECI); not populated by this
                          endpoint.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      periodValue:
                        type:
                          - string
                          - "null"
                        description: Number of installment periods; not populated by this endpoint.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      codeForm:
                        type:
                          - string
                          - "null"
                        description: Payment code information object; not populated by this endpoint.
                        contentMediaType: application/json
                        contentSchema:
                          type: object
                          properties:
                            {}
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                        x-onerway-format: json_string
                      presentContext:
                        type:
                          - string
                          - "null"
                        description: Additional context for rendering payment interface elements; not
                          populated by this endpoint.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      actionType:
                        type:
                          - string
                          - "null"
                        description: Next action type to execute; not populated by this endpoint.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      subscriptionManageUrl:
                        type:
                          - string
                          - "null"
                        description: Subscription management URL; not populated by this endpoint.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returned as `null` in the update order acknowledgement response.
                            zh: 更新订单确认响应中返回 `null`。
                      sign:
                        type: string
                        description: Response signature string; verifying the response signature is
                          currently not recommended for merchants.
                    description: 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.
              examples:
                update-accepted:
                  summary: Order update accepted
                  value:
                    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
```
