Skip to main content
A sandbox workspace runs on a test processor: no money moves, and what it approves or refuses is that processor’s choice, not Payra’s. The sets below are for Payra’s default card and bank processor, which is what a new sandbox workspace gets; if yours was set up on another one, ask Payra for its set.

Cards

The expiration date and the security code are part of the test card: another date or another code is refused as card_declined. The name on the card picks the refusal. Keep the approved card above and change the name; it must still be two words, since a one-word name is refused before the charge (see below). A refusal reads exactly like a real one: POST /payments answers 402 card_declined with the decline_code, the decline_reason when there is one, and the failed payment, which reads back with the same values under failure (see Declines). A one-time payment method is spent by the attempt, so collect the card again with a new session before retrying.

Cardholder name

The card needs a first and a last name. A single word is refused before anything is sent: Payra Elements answers validation_error cardholder_name_incomplete on billingDetails.name, and POST /payment-method-sessions/{id}/confirm answers 400 parameter_invalid on cardholder_name. The session stays open either way, so the customer can fix the name and submit again.

3-D Secure

With 3-D Secure turned on for your workspace, card 4917 6100 0000 0000, expiration 03/30, security code 737 brings up a challenge after POST /payments with a return_url: the password password passes it and the payment turns succeeded; any other value refuses it and the payment turns failed with failure.code: "authentication_failed". A challenge left unfinished fails the same way after 15 minutes.

US bank accounts (ACH)

A sandbox debit never fails at submission with these values. To try the return path (payment.returned), ask Payra: the sandbox processor returns only on accounts set up for it.

Canadian bank accounts (EFT)

Other transit numbers are refused by the sandbox processor.

What a sandbox cannot show you

  • Live refusals in other words. A live card can be refused for reasons the sandbox never produces (a bank’s fraud rule, a restricted card). They all arrive in the same fixed vocabulary, so branch on decline_code / failure.code and show your own sentence, never on the message text.
  • Settlement timing. Live bank debits settle on the processor’s batch schedule, and a return or a chargeback can arrive days after succeeded, as payment.returned.
  • Processor setup. A currency or method your sandbox accepted may answer 400 payment_provider_not_configured on live until Payra enables it on your live workspace. See Environments.