Test and launch
Going live
Business verification, live keys and the checklist to run before the first real payment.
Going live is a change of key, not of code: the same API, the same URLs and the same objects. Before that, your business has to be verified, and a few settings have to be real.
1. Verify your business
Live payments need a verified business. The sandbox stays available while you do it. In the dashboard, open Verification; it takes you through five steps and you can save and come back later:
- Business details.
- Legal documents. Your commercial register, NIF and NIS numbers, each with its document (type each number as it is written on the document), and the agreement (agrément) if your activity needs one.
- Owners. The legal representative and every other owner of 25% or more, each with an identity document.
- Merchant agreement. Read the Raïs merchant agreement, then sign it, drawn or typed, as an owner or administrator of the business. The signed copy stays available as a PDF, and the text can be read without signing in.
- Review and submit.
Files can be PDF, JPEG, PNG or WEBP, up to 10 MB each. The Raïs team reviews the application and tells you the outcome; if something is missing, the review message says what to change and you can resubmit.
Until your business is approved:
GET /accountshowslive_enabled: false.- The dashboard creates no live key and no live webhook endpoint. A live key can only exist for an approved store, and it stops working the moment the store is no longer approved: the API then answers
401 invalid_api_key, like for any key it refuses. - Everything in the sandbox keeps working.
2. Create a live key
When the business is approved, open Developers, then API keys, press Create key and choose Live in the dialog: the key starts with rais_sk_live_. Store it in your production secret manager, next to nothing else. Keep the sandbox key for staging.
curl https://api.rais.app/v1/account \
-H "Authorization: Bearer rais_sk_test_..."With the live key, livemode is true and live_enabled is true. See Authentication.
3. Register a live webhook endpoint
Sandbox endpoints do not receive live events. In Developers, then Webhooks, add an endpoint, choose Live in the dialog, give it an https:// address, and keep its own signing secret. Check that your server:
- verifies the signature on the raw body, and rejects old timestamps;
- answers
2xxwithin 10 seconds, and does slow work afterwards; - processes each event once, using its
id.
See Webhooks.
4. Use https everywhere
- Webhook endpoints. A live endpoint must use
https://. - Return URLs.
success_urlandcancel_urlof a live payment must usehttps://, or your own app scheme.http://is accepted in the sandbox only. Store defaults follow the same rule. - Your own pages. The pages the payer returns to should be https too.
5. Checklist
6. Take a first real payment
Create a payment for the smallest amount, 50.00 DA, with a real card. Check that the payment is paid, that your webhook arrived and was processed once, and that the receipt opens. Then refund it, and check the refund.succeeded event. A live refund comes out of your store's balance together with its fee (10.00 DA), so the balance must cover both: a store that has just received one payment can refund at most its balance minus 10.00 DA.
Test and live compared
| Sandbox | Live | |
|---|---|---|
| Key | rais_sk_test_... | rais_sk_live_... |
| Base URL | Same | Same |
| Availability | Always | After business verification |
| Cards | SATIM test cards | Real CIB and Edahabia cards |
| Money and balances | Nothing moves | Credited and debited |
| Fees | Shown, simulated: nothing is charged | Charged on each paid payment and each refund |
| Return URLs | https://, http:// or your app scheme | https:// or your app scheme |
| Webhook endpoints | https:// or http:// | https:// only |
| Receipts | Marked as a test | Official |
| Test wording on the checkout | "Test mode" banner | Never shown |
Rate limits
Each key may send 60 requests a second, in bursts of up to 120. See Rate limits.