SofizPay Logo

SofizPay

SofizPay Logo
SofizPay
Technical Documentation
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

GEThttps://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=True

Request Parameters

ParameterTypeRequiredDescription
accountstringRequiredYour Sofizpay account to receive payments
amountnumberRequiredPayment amount in Algerian Dinar
full_namestringRequiredCustomer’s full name
phonestringRequiredCustomer’s phone number (preferably in international format)
emailstringRequiredCustomer’s email address
return_urlstring (URL)OptionalThe URL to redirect to after payment
webhook_urlstring (URL)OptionalOptional URL (HTTP/HTTPS) to receive asynchronous payment status webhooks
invoice_idstringOptionalOptional invoice ID to link the payment to an existing invoice
languagestringOptionalLanguage for the CIB gateway ('ar' by default)
memostringOptionalOptional note for the transaction (truncated to 28 bytes)
redirect'yes' | 'no'RequiredWhether automatic redirection should occur or not
keep_return_url'True' | 'False'OptionalIf 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

ParameterTypeDescription
eventstringEvent type identifier, always 'cib.payment.updated'
payment_status'success' | 'failed'Payment status: 'success' or 'failed'
transaction_idstring (UUID)Unique transaction ID generated by SofizPay (UUID)
cib_transaction_idstringBank / SATIM CIB transaction order ID
order_idstringSATIM order identifier
order_numbernumberNumeric order number from SATIM
order_statusnumberSATIM status code (e.g. 2 for approved/deposited, 6 for declined)
amountnumberAmount in cents/centimes (e.g. 150000 = 1500.00 DZD)
currencystringISO 4217 numeric currency code (012 for DZD)
error_codenumber | nullBank error code on failure (or null on success)
error_messagestring | nullBank descriptive error message (or null on success)
action_codenumber | nullBank action code (e.g. 116 for Insufficient funds)
action_code_descriptionstring | nullExplanation for the bank action code
resp_codestringBank response code ('00' for Approved, '05' for Declined)
resp_code_descstringResponse code description ('Approved' or 'Declined')
messagestring (URL/text)Concatenated verification string used to verify signature
signaturestring (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

GETGET sofizpay.com/sandbox/make-cib-transaction/

Creates a mock CIB/Edahabiya deposit transaction and returns a payment URL.

Test Cards

Card NumberExpiryCVVResult
6280581001234567
12/28123Approved
6280581009876543
12/29456Approved
Card NumberExpiryCVVResult
6280581005555555
06/28999Declined by issuer
6280581004444444
09/28444Insufficient funds
6280581003333333
03/21333Expired card
6280581002222222
11/28222Transaction timeout
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