This section describes the Dzwallet payment gateway API.
The Dzwallet API is simple to integrate into your company's software. Our API takes cURL requests, has well-formatted URLs, and produces JSON responses.
The API can be used in test mode without affecting your real data. The request is authenticated using the API key, which also establishes whether the payment is legitimate or not. For test mode just use the sandbox URL and In case of live mode use the live URL from section Initiate Payment.
The supported currencies by Dzwallet are given below.
| Currency | Currency Symbol |
|---|---|
| DZD | DZD |
How to obtain the api key is explained in this part.
To access your Dzwallet merchant account, please log in. In case you don't have an account, you can click here.
Now go to the Account > Settings > API Key from the merchant panel.
The api keys can be found there which is Public key and Secret key. Use these keys to initiate the API request. Every time you can generate new API key by clicking Generate Api Key button. Remember do not share these keys with anyone.
In this section, the procedure for initiating the payment is explained.
To begin the payment process, use the sample code provided, and pay close attention to the parameters. The API endpoints mentioned below will need to be used to make the request.
Live End Point: https://dzwallet.app/payment/initiate
Test End Point: https://dzwallet.app/test/payment/initiate
Request to the end point with the following parameters below.
| Parameter | Type | Is Required | Description |
|---|---|---|---|
| public_key | string (50) | required | Your Public API key |
| identifier | string (20) | required | Identifier is basically for identify payment at your end |
| currency | string (4) | required | Currency Code, Must be in Upper Case. e.g. DZD |
| amount | decimal | required | Payment amount |
| details | string (100) | required | Details of your payment or transaction |
| ipn_url | string | required | The url of instant payment notification |
| success_url | string | required | Payment success redirect url |
| cancel_url | string | required | Payment cancel redirect url |
| site_name | string | required | Your business site name |
| site_logo | string/url | required | Your business site logo |
| checkout_theme | string | required | Checkout form theme dark/light. Default theme is light |
| Customer | |||
| customer[] | array | required | customer must be an array |
| customer.first_name | string | required | Customer's first name |
| customer.last_name | string | required | Customer's last name |
| customer.email | string | required | Customer's valid email |
| customer.mobile | string | required | Customer's valid mobile |
| Shipping info | |||
| shipping_info[] | array | optional | shipping_info must be an array |
| shipping_info.address_one | string | optional | Customer's address one |
| shipping_info.address_two | string | optional | Customer's address two |
| shipping_info.area | string | optional | Shipping area of customer |
| shipping_info.city | string | optional | Shipping city of customer |
| shipping_info.state | string | optional | Shipping state |
| shipping_info.postcode | string | optional | Shipping postcode |
| shipping_info.country | string | optional | Shipping country |
| Billing info | |||
| billing_info[] | array | optional | billing_info must be an array |
| billing_info.address_one | string | optional | Customer's address one |
| billing_info.address_two | string | optional | Customer's address two |
| billing_info.area | string | optional | Billing area of customer |
| billing_info.city | string | optional | Billing city of customer |
| billing_info.state | string | optional | Billing state |
| billing_info.postcode | string | optional | Billing postcode |
| billing_info.country | string | optional | Billing country |
This section describes the process to get your instant payment notification.
To initiate the payment follow the example code and be careful with the parameters. You will need to make request with these following API end points.
End Point: Your business application ipn url.
Request Method: POST
You will get following parameters below.
| Parameter | Description |
|---|---|
| status | Payment success status. |
| identifier | Identifier is basically for identify payment at your end. |
| signature | A hash signature to verify your payment at your end. |
| data | Data contains some basic information with charges, amount, currency, payment transaction id etc. |