Testing#

Use a sk_test_ key against https://manage.test.casapay.com. Test-mode sessions never touch EveryPay and never move money.

The simulator#

Instead of a card form, a test-mode checkout shows a panel of outcome buttons. Pick one and the session behaves exactly as it would in production for that outcome - including the webhooks you receive.

Scenarios#

ScenarioResult
payment_successPayment settles. Invoice booked and paid, gateway.session.completed fires.
payment_failedGeneric failure. Session stays open, gateway.payment.failed fires.
payment_timeoutProvider timeout. Soft error, retryable.
payment_bank_declinedBank declined the payment. Soft error, retryable.
payment_insufficient_fundsNot enough funds. Soft error, retryable.
payment_customer_cancelledTenant cancelled at the bank. Soft error, retryable.
payment_3ds_failed3-D Secure challenge failed. Soft error, retryable.
verification_successIdentity verification passes; session advances to payment.
verification_failedVerification fails, gateway.verification.failed fires.

Soft errors keep the session alive

Every scenario except payment_success leaves the session usable so the tenant can retry on the same URL. This is the behaviour you should build against - a failed attempt is not a dead session.

What to test#

CaseWhy
Duplicate webhook for one paymentSuccess is reported twice - on the browser return and the S2S webhook. Your handler must be idempotent.
Tenant closes the tab after payingYour success_url never loads. Only the webhook tells you it succeeded.
Retry after a soft failureConfirms you are not prematurely marking the session dead.
Cancel an already-paid sessionMust return 400 CANCEL_FAILED.
Deposit choice both waystotal_amount differs between cash and guaranteed.

Going live#

  1. Swap the key for sk_live_ and the base URL for https://manage.casapay.com.
  2. Register a live webhook endpoint - test-mode endpoints do not receive live events.
  3. Verify signatures with the live endpoint secret.
  4. Confirm your payout bank account is configured, or collected funds cannot be disbursed.