Use Case:

The user enters the amount on the checkout page OR the amount changes on the checkout page and the merchant doesnt want to refresh the Copy and Pay widget. 

Is it possible for the merchant to change the amount without generating a new checkoutID?


It is possible to implement this it requires the merchant to trigger a server-to-server call prior to submitting the widget.

Once the widget is loaded, and the user clicks submit (at which point we assume the final amount is known) an event can be triggered before the form is actually submitted.

The events triggered for different payment methods are listed here:

API reference:

Events of relevance: onBeforeSubmitCard, onBeforeSubmitDirectDebit, onBeforeSubmitOnlineTransfer, onBeforeSubmitVirtualAccount


As these events are triggered the merchant must execute the following steps:

The merchant should already have the checkoutId for the current request (similar to E366DFBC17F56D051F1F4A9A6B1FBD06.sbg-vm-tx02)

In the steps below replace {id} with your checkoutID i.e. in our example this would be E366DFBC17F56D051F1F4A9A6B1FBD06.sbg-vm-tx02

The URLs listed below are relative and depending on the test or live system would be added to the following hosts:


  1. Post the new amount to /checkouts/{id},

  2. Receive a successful response from Peach Payments server

  3. Continue with submitting to /checkouts/{id}/payment

If the response in step 2 is not successful then you must abort the payment process on your end.