CIB/Edahabiya Payment
Accept CIB/Edahabiya Payments
Create a secure payment transaction using the CIB/Edahabiya payment gateway with support for encrypted signatures and security validation.
API Endpoint
GET
https://sofizpay.com/make-cib-transaction/URL Generator
When keep_return_url = False, you will receive a signed callback to verify the validity of the transaction.
Generated URL:
http
https://sofizpay.com/make-cib-transaction/?account=GDNS27ISCGOIJFXC6CM4O5SVHVJPSWR42QEBWUFF24N5VVHGW73ZSJNQ&amount=150.75&full_name=Ahmed+Ben+Ali&phone=%2B213555123456&email=ahmed.benali%40example.com&return_url=https%3A%2F%2Fmystore.com%2Fpayment-callback&webhook_url=https%3A%2F%2Fmystore.com%2Fapi%2Fcib-webhook&invoice_id=INV-2026-001&language=en&memo=Order+%2312345&redirect=yes&keep_return_url=TrueRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
account | string | Required | Your Sofizpay account to receive payments |
amount | number | Required | Payment amount in Algerian Dinar |
full_name | string | Required | Customer’s full name |
phone | string | Required | Customer’s phone number (preferably in international format) |
email | string | Required | Customer’s email address |
return_url | string (URL) | Optional | The URL to redirect to after payment |
webhook_url | string (URL) | Optional | Optional URL (HTTP/HTTPS) to receive asynchronous payment status webhooks |
invoice_id | string | Optional | Optional invoice ID to link the payment to an existing invoice |
language | string | Optional | Language for the CIB gateway ('ar' by default) |
memo | string | Optional | Optional note for the transaction (truncated to 28 bytes) |
redirect | 'yes' | 'no' | Required | Whether automatic redirection should occur or not |
keep_return_url | 'True' | 'False' | Optional | If True, the callback will be signed and redirection includes the encrypted signature |
Success Response (200)
When the transaction is created successfully
json
{
"success": true,
"transaction_id": "600aed3b-8dd2-490c-8e45-9b81267b1f2b",
"cib_transaction_id": "2517039448",
"payment_url": "https://cib.satim.dz/payment/merchants/SATIM/payment_ar.html?mdOrder=HNsBw1u4An3Q44BCJ7LI",
"amount": "150.75",
"status": "pending_user_transfer_start",
"more_info_url": "https://sofizpay.com/sep24/transaction/more_info?id=600aed3b-8dd2-490c-8e45-9b81267b1f2b",
"webhook_url": "https://mystore.com/api/cib-webhook",
"cib_response": {
"errorCode": "0",
"orderId": "isezBL9uLxWRBIBE56T7",
"formUrl": "https://cib.satim.dz/payment/merchants/SATIM/payment_ar.html?mdOrder=HNsBw1u4An3Q44BCJ7LI"
}
}Error Response (400)
When invalid or missing parameters are provided
json
{
"status": "error",
"message": "Invalid or missing parameters."
}Webhook Notifications & Events
Provide a webhook_url parameter when initiating a transaction to receive real-time, server-to-server HTTP POST notifications whenever the transaction status changes.
The webhook URL must use the HTTP or HTTPS scheme and contain a valid domain host.
When a payment is approved or declined on the CIB/Edahabiya gateway, SofizPay sends an HTTP POST notification to your webhook URL with the following JSON payload:
cib.payment.updated (payment_status: "success")
json
1{
2 "event": "cib.payment.updated",
3 "payment_status": "success",
4 "transaction_id": "bb979126-4e55-49dd-8ecc-a1d59867d2b0",
5 "cib_transaction_id": "5965287001",
6 "order_id": "satim_order_a1b2c3d4",
7 "order_number": 5965287001,
8 "order_status": 2,
9 "amount": 150000,
10 "currency": "012",
11 "error_code": null,
12 "error_message": null,
13 "action_code": null,
14 "action_code_description": null,
15 "resp_code": "00",
16 "resp_code_desc": "Approved",
17 "message": "https://your-domain.com/api/webhook/success1500005965287001",
18 "signature": "MEQCIFz8v982hfkjdsf983274hfkjsdf...=="
19}Webhook Payload Fields
| Parameter | Type | Description |
|---|---|---|
event | string | Event type identifier, always 'cib.payment.updated' |
payment_status | 'success' | 'failed' | Payment status: 'success' or 'failed' |
transaction_id | string (UUID) | Unique transaction ID generated by SofizPay (UUID) |
cib_transaction_id | string | Bank / SATIM CIB transaction order ID |
order_id | string | SATIM order identifier |
order_number | number | Numeric order number from SATIM |
order_status | number | SATIM status code (e.g. 2 for approved/deposited, 6 for declined) |
amount | number | Amount in cents/centimes (e.g. 150000 = 1500.00 DZD) |
currency | string | ISO 4217 numeric currency code (012 for DZD) |
error_code | number | null | Bank error code on failure (or null on success) |
error_message | string | null | Bank descriptive error message (or null on success) |
action_code | number | null | Bank action code (e.g. 116 for Insufficient funds) |
action_code_description | string | null | Explanation for the bank action code |
resp_code | string | Bank response code ('00' for Approved, '05' for Declined) |
resp_code_desc | string | Response code description ('Approved' or 'Declined') |
message | string (URL/text) | Concatenated verification string used to verify signature |
signature | string (Base64) | Base64 encoded cryptographic signature for authenticating the payload |
CIB/Edahabiya Sandbox - Testing Environment Documentation
The CIB/Edahabiya Sandbox is a testing environment that mocks the SATIM CIB/Edahabiya payment gateway. It allows frontend developers to test the full CIB/Edahabiya deposit transaction flow without connecting to the real SATIM payment system.
To view Sandbox transactions in the SofizPay app, you must first enable 'Testing Mode' from the app settings.
CIB/Edahabiya Sandbox - Testing Environment Documentation - 1. Create a CIB/Edahabiya Transaction
GET
GET sofizpay.com/sandbox/make-cib-transaction/Creates a mock CIB/Edahabiya deposit transaction and returns a payment URL.
Test Cards
| Card Number | Expiry | CVV | Result |
|---|---|---|---|
6280581001234567 | 12/28 | 123 | Approved |
6280581009876543 | 12/29 | 456 | Approved |
Using any OTP other than 123456 will result in "Invalid OTP code" error regardless of the card used.
Security Best Practices
Use HTTPS for return URLs
Include an internal order_id parameter in your return URL (e.g. ?order_id=12345) for easier tracking and reconciliation
When you receive the callback, save the cib_transaction_id alongside your internal order_id in your database
After saving, retrieve the cib_transaction_id using your internal order_id, then verify the transaction status by calling the CIB/Edahabiya Transaction Check endpoint with that cib_transaction_id