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

Certification Scenarios

The sandbox test scenarios for your integration.

Complete all required scenarios in the sandbox before you start the check run. Each scenario tests a critical part of your integration.

πŸ”’Required

All scenarios marked Required must be completed in the sandbox.

Card payment scenarios

Card capture happens through a hosted-page session (cards are never POSTed to the API β€” see HPP guide); follow-up operations are type values on POST /api/v1/transactions.

#ScenarioRequiredTest with
C-01Successful card payment (sale)βœ…HPP session with capture_mode: sale (default), completed on the hosted page
C-02Auth-only paymentβœ…HPP session with capture_mode: authorize β€” completion materialises an AUTHORIZED transaction
C-03Explicit capture of C-02βœ…POST /api/v1/transactions with type: CAPTURE + parent_transaction_id
C-04Cancel an authorizationβœ…type: AUTH_REVERSAL (or VOID) + parent_transaction_id
C-05Soft decline handlingβœ…Decline scenario driven by the amount's cents portion β€” see Testing
C-06Hard decline handlingβœ…Decline scenario driven by the amount's cents portion β€” see Testing
C-07Full refundβœ…type: REFUND (no amount) against a SETTLED parent
C-08Partial refundβœ…type: PARTIAL_REFUND with amount < original, against a SETTLED parent

Idempotency scenarios

#ScenarioRequired
I-01Idempotent retry β€” same result on replayEnforced by the API
I-02Idempotency conflict β€” different params, same keyEnforced by the API

Certification does not check these, but the API enforces them: every POST, PUT and PATCH write needs an Idempotency-Key, and one sent without it is rejected with 400 idempotency_key_required. For as long as Cresora keeps the key after a successful response (see Idempotency), a transaction write with the same key and body returns that response, and the same key with a different body is rejected with 422 idempotency_key_reused.

Webhook scenarios

#ScenarioRequired
W-01Receive and verify transaction.captured signatureβœ…
W-02Handle retry β€” return 200 on duplicate deliveryβœ…
W-03Reject stale delivery (timestamp > 5 min)βœ…

ACH scenarios (if using ACH)

#ScenarioRequired
A-01Successful ACH debitβœ…
A-02R01 return handlingβœ…
A-03R10 return handling β€” stop retryingβœ…

Error handling scenarios

#ScenarioRequired
E-01401 unauthorized β€” invalid keyEnforced by the API
E-02400 validation_error β€” malformed requestEnforced by the API
E-03Gateway decline β€” on a saved-card charge through the API, 200 with state: FAILED and a decline_code; on the hosted page, the session stays PENDING with last_attempt set and, apart from rare anomalies, a FAILED transaction is recordedβœ…

E-01 and E-02 are not certification checks: the API itself rejects an invalid key with 401 and a malformed request with 400.

β„ΉNote

E-03 is not an HTTP error. Both approved and declined outcomes return 200 β€” a decline is a normal business outcome, not a transport failure. On a saved-card charge through the API, discriminate on state and decline_code: your test should expect a 200 response whose state is FAILED. On the hosted page, a declined card attempt is, apart from rare anomalies, recorded as a FAILED transaction: expect a transaction.failed and the session to stay PENDING with last_attempt set.

How completion is verified

Certification is a check run, not an evidence upload: in the Partner Portal under Compliance β†’ Certification, start certification and run the checks. Automated checks verify your sandbox activity directly (they look for the activity listed in What certification covers, not for every scenario above). You submit the other checks, self-attestations included, in the portal, and Cresora reviews each one. You can re-run the checks as you fix gaps.

Keep your own record of each scenario (request, response, webhook received) β€” it is what lets you fix a failing check quickly β€” but there is no evidence-file upload.

See Certification overview β†’ for the full process.