Skip to main content

Before you start

1

Get your base URL

Given at onboarding. It is written {BASE_URL} throughout these docs. Every path starts with /api/v1.
2

Create an API key

In your merchant dashboard. Use pk_test_… for test and pk_live_… for live. A new key must be approved first.
3

Configure your webhook

Set a webhook URL and copy the signing secret in the dashboard API settings. The signing secret is not your API key.

1. Register a payment

amount is in centimes. To charge 1,500 DA send 150000; for 1,499.50 DA send 149950.

2. Store the id and redirect the payer

The response contains the payment id and the checkoutUrl:
Store the id, you need it for every later call. The checkoutUrl is shown only once: redirect the payer straight away.

3. The payer pays

On our hosted page the payer enters their card details, then the OTP sent by SMS from their bank. In test mode, use the test cards and OTP codes.

4. Receive the webhook

When the payment reaches a status you must act on, we POST to your webhook URL. Verify the signature and process the event once, using deliveryId.

5. Fulfil the order

Ship the order only when payment.status is success. You can double-check with Get a payment.
When the payer comes back to your successUrl or failureUrl, we append reference=<your reference> and keep your own query parameters. Do not treat the redirect as proof of payment: rely on the webhook or GET /payments/{id}.