Testing
Sandbox testing on Cresora — hosted-page card entry and amount-cents triggers.
Everything in this section follows from two rules. Learn them once and the individual pages become lookup tables.
Rule 1 — card data is entered on the hosted page
Cards never travel to the Cresora API. There is no card object on any
request body, and a raw PAN sent to the API is rejected with 400. A
sandbox card test always has three steps: create a Hosted Payment Page
session, open the hpp_url it returns, then type the test values into
that page.
curl -X POST https://api.sandbox.cresoracommerce.ai/api/v1/hpp/sessions \
-H "Authorization: Bearer $CRESORA_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"merchant_id": "<uuid>", "amount": "10.00", "currency": "USD"}'Idempotency-Key is required on session creation. Reusing a key
replays the first response instead of creating a second session.
Rule 2 — the cents portion of the amount selects the outcome
The PAN selects the network. The amount selects the outcome.
An amount ending in .00 — for example 10.00 — approves; other cents
values map to specific failures.
This applies to the card rail only. On the ACH rail the cents select nothing — see ACH returns.
Card rail — selected triggers
| Amount | Vendor scenario | Kind |
|---|---|---|
$10.00 | approved | — |
$0.01 | refer to issuer | CALL |
$0.05 | pick up card | hard |
$0.07 | lost card | fraud, hard |
$0.20 | do not honor | decline |
These are the canonical certification rows. The full amount-to-outcome sheet is vendor-owned and larger than this table.
ACH rail — no cents triggers
The amount's cents do not select an ACH return code. See ACH returns.
Canonical test cards
One card per network. All expire 12/28. Pair each PAN with the CVV on
its own row — see AVS and CVV for why.
| Network | PAN | CVV |
|---|---|---|
| Visa | 4012000098765439 | 999 |
| MasterCard | 5146315000000055 | 998 |
| Discover | 6011000993026909 | 996 |
| Amex | 371449635392376 | 9997 |
Test PANs from other providers do not work here. 4242… is a Stripe
value and this sandbox does not recognise it.
Canonical test bank account
A first-time payer saves the bank account on the hosted payment page, so these are the values to type there. The sandbox's ACH processor accepts only seven routing numbers:
| Value | Use |
|---|---|
130000006, 140000009, 150000002, 160000005, 170000008, 180000001 or 190000004 | Routing number: any one of the seven |
5551234567 | Account number |
The gateway supplied the seven routing numbers. 5551234567 is the account
number Cresora's own tests use; the gateway has not confirmed it as an
approved test value.
A real bank's routing number does not work as a payer's test account, even
a valid one: the sandbox's ACH processor refuses 021000021, for example.
How outcomes surface
A decline is a business outcome, not a transport error, so never
discriminate on the HTTP status. On the hosted page, an approved card sale
completes the session and its transaction reads CAPTURED; an approved ACH
debit's transaction reads SUBMITTED. A declined
card attempt is, apart from rare anomalies, recorded as a FAILED transaction and emits
transaction.failed: the session stays PENDING, and its
last_attempt.reason classifies the failure, for example declined.
An hpp_session.attempt_failed webhook fires too.
On a saved-card charge through the API, the transaction reads FAILED
with a decline_code.
Pages in this section
- Test cards — the four PANs, end to end.
- ACH returns — how returns arrive, asynchronously.
- AVS and CVV — address and security-code results.
- Certification scenarios — required.
- 3DS simulation — current status.