On This Page
Handle Responses
When
Unified Checkout
automatically processes a payment with
autoProcessing
is set to true
or you have set
autoProcessing
to false
and are using
checkout.Complete()
, you must handle both successful responses
and various errors. After the payment is complete, the
completeResponse
field object contains information about the
transaction outcome.When a payment is processed successfully, you must parse the response to confirm the
payment status, update their order records, and trigger any post-payment workflows.
Post-payment workflows include sending confirmation emails or updating inventory. See
JavaScript Example: Processing a Payment.
Your error handling should account for specific cases such as
COMPLETE_TRANSACTION_CANCELED
which is returned when the user
cancels the transaction.For PPRO-enabled online bank transfers, only cancellation errors are returned. For
information about possible errors that can occur when calling the complete API see
UnifiedCheckoutError in Handle Errors.