Skip to main content
Skip to Content
Cresora Commerce
Testing & Sandbox

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
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"}'
⚠Warning

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.

⚠Warning

This applies to the card rail only. On the ACH rail the cents select nothing — see ACH returns.

Card rail — selected triggers

AmountVendor scenarioKind
$10.00approved—
$0.01refer to issuerCALL
$0.05pick up cardhard
$0.07lost cardfraud, hard
$0.20do not honordecline

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.

NetworkPANCVV
Visa4012000098765439999
MasterCard5146315000000055998
Discover6011000993026909996
Amex3714496353923769997
ℹNote

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:

ValueUse
130000006, 140000009, 150000002, 160000005, 170000008, 180000001 or 190000004Routing number: any one of the seven
5551234567Account 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.

ℹNote

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