Migration Guide
Migrating to Cresora Commerce from another payment gateway.
This guide covers the key differences to account for when migrating from another payment processor to Cresora.
Key differences from common gateways
API key format
Cresora keys use the shape csk_{prefix}_{secret} (the prefix is a random identifier, not an environment marker). Update all references in your codebase; do a project-wide search for your old key format and replace every occurrence.
Separate sandbox and production hosts
Cresora has distinct hosts for each environment. Point your test traffic at api.sandbox.cresoracommerce.ai and your production traffic at api.cresoracommerce.ai, using the credentials issued for each. See Environment Model →.
Idempotency keys
If your previous gateway didn't require idempotency keys, add them now. Every write to POST /api/v1/transactions — sales, refunds, captures — requires a unique Idempotency-Key header, in sandbox as in production.
Amount format
Cresora amounts on the write surface are decimal strings — "100.00" for $100.00, never integer cents. If your previous gateway used minor units (10000 for $100.00), update your amount math; a non-conforming amount is rejected with 400. Note the one asymmetry: transaction list responses report amount in integer minor units. See Amounts & Currency →.
Webhook signature
Cresora uses HMAC-SHA256 signed with your endpoint's signing secret. Remove your old gateway's webhook verification and implement the Cresora version. See Signature verification →.
Migration checklist
- Update API keys throughout codebase
- Update API base URL to your environment's host (
api.sandbox.cresoracommerce.aiorapi.cresoracommerce.ai) - Add
Idempotency-Keyto allPOSTrequests - Update amount handling to decimal strings on writes (list responses report integer cents)
- Update webhook signature verification
- Re-register webhook endpoints in the Partner Portal
- Update error code handling to Cresora error codes
- Re-run certification scenarios in the sandbox
- Update test card numbers to Cresora test PANs
Cresora test PANs
Replace your old gateway's test cards with Cresora's. The PAN selects the network; the amount's cents select the outcome — there are no per-outcome PANs, and other gateways' test cards will not behave as documented here:
| Network | PAN | CVV |
|---|---|---|
| Visa | 4012000098765439 | 999 |
| MasterCard | 5146315000000055 | 998 |
| Discover | 6011000993026909 | 996 |
| Amex | 371449635392376 | 9997 |
All expire 12/28; an amount ending .00 approves. See
Testing & Sandbox → for the amount triggers.
Support during migration
For migration support, contact Cresora developer support via the Support page → or open a ticket in the Partner Portal. Include your previous gateway name and we'll provide a tailored migration guide.