User Closes the Modal
When a customer closes the payment modal without completing, the SDK throws aCubePayClosedError. This is not a failure — it means the user chose to cancel.
Always check for
CubePayClosedError before treating a thrown error as a failure. This is the most common “error” you will encounter.Client-Side Errors
Server-Side Errors
Session Creation Errors
Handling Server Errors
Webhook Error Handling
Design your webhook handler to be idempotent and always return200: