Update Payment by Order ID

<Note title="Note"> The Readme API Simulator includes form elements for both required and optional Body Params. If not populated with values, Readme will send empty strings to the Clearpay Online API. Any optional parameter that is validated against a Model will need to have all of its required sub-params populated with non-empty values. Therefore, to avoid receiving unexpected "400" responses from Clearpay, please fill out all fields of the simulation form with valid values. This is particularly important for the amount and currency sub-params of the amount, taxAmount and shippingAmount params. </Note> ## Success Response (201) Returns object containing the following attributes. | Parameter | Type | Description | | :-- | :-- | :-- | | id | string | The unique Clearpay (merchant payment) payment Id | | token | string | Checkout token to be used to complete consumer checkout and payment. | | status | string | "APPROVED" (update is only valid for successful orders) | | created | string (ISO-8601) | The payment creation time (ISO 8601 UTC/Zulu time). | | originalAmount | [Money object](/money-object) | Total amount for the order. | | openToCaptureAmount | [Money object](/money-object) | Total amount that can be captured for order. | | paymentState | string | Available states: <br />"AUTH_APPROVED", <br />"CAPTURED", <br />"VOIDED", <br />"EXPIRED", <br />"AUTH_DECLINED", <br />"PARTIALLY_CAPTURED", <br />"CAPTURE_DECLINED"; | | merchantReference | string | The merchant’s order id/reference that this payment corresponds to. | | refunds | [Refund object](/refund-object) | The refund details for merchant's order | | orderDetails | [Order Details object](/order-details-object) | The order bound to the payment. | | events | [Payment Event object](/payment-event-object) | Event list for for merchant's order. | Note This end point is for merchants that create a merchant side order id following the Clearpay order id creation. The merchant should call this immediately after the Clearpay order is created in order to properly update it with their order id so that it can be tracked. ## Errors In addition to the [PUT/POST Errors](/put-post-errors) applicable to all PUT endpoints, the following errors are specific to Update Payment By PaymentId: | HTTP Status Code | errorCode | Description | | :-- | :-- | :-- | | **404** <br />Not Found | `not_found` | The Clearpay payment Id to update was not found. |

Authentication

AuthorizationBasic

Basic authentication of the form Basic <username:password>.

Path parameters

orderIdstringRequired
The Order ID to update

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

This endpoint expects an object.
merchantReferencestringRequiredDefaults to new_merchant_order_id_1234

The merchant’s new order id to replace with

Response

200

Errors