API Reference
WadieaPay API
Accept BaridiMob payments programmatically. Verify transactions in real-time and create payment links for your customers.
Quick Start
- 1
Get your API key
Create an account and get your API key from the Dashboard
- 2
Connect your BaridiMob account
Link your BaridiMob account to receive payments
- 3
Start accepting payments
Use the API to verify payments or create payment links
Available Features
Authentication
Authenticate requests by including your API key in the Authorization header.
Authorization: Bearer sk_live_your_api_keyGet your API key from the Dashboard.
Base URL
All API requests should be made to this base URL using HTTPS.
https://api.wadieapay.comVerify Payment
/payments/verifyVerify if a payment was received by checking the transaction reference number.
Request Body
amountrequired | number | Payment amount in DZD |
refNumrequired | string | 12-digit BaridiMob reference number |
orderIdrequired | string | Your unique order identifier (max 100 chars) |
rip | string | Your BaridiMob RIP (optional filter) |
metadata | object | Custom data to attach to the claim |
Response
status | string | SUCCESS, DUPLICATE, ALREADY_CLAIMED, or NOT_FOUND |
orderId | string | Your order identifier |
metadata | object | Custom data you attached |
amount | number | Transaction amount |
verifiedAt | string | When the claim was verified |
Request Body Example
{
"amount": 5000,
"refNum": "009235035898",
"orderId": "order_12345",
"rip": "00799999000300012345",
"metadata": {
"customer": "Ahmed",
"product": "Monthly subscription"
}
}cURL Example
curl -X POST https://api.wadieapay.com/payments/verify \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"refNum": "009235035898",
"orderId": "order_12345"
}'SUCCESS Response
First time claiming this transaction. This is billed to your subscription.
{
"status": "SUCCESS",
"orderId": "order_12345",
"metadata": {
"customer": "Ahmed",
"product": "Monthly subscription"
},
"amount": 5000,
"verifiedAt": "2024-01-15T14:30:00Z"
}DUPLICATE Response
Same orderId sent again (idempotent). Not billed.
{
"status": "DUPLICATE",
"orderId": "order_12345",
"metadata": { ... },
"amount": 5000,
"verifiedAt": "2024-01-15T14:30:00Z"
}ALREADY_CLAIMED Response
This transaction was already claimed before. Not billed.
{
"status": "ALREADY_CLAIMED",
"orderId": "order_12345",
"metadata": { ... },
"amount": 5000,
"verifiedAt": "2024-01-15T14:30:00Z"
}NOT_FOUND Response
No matching transaction found.
{
"status": "NOT_FOUND"
}Duplicate orderId Error (Different refNum)
If you try to use the same orderId with a different refNum or amount, the API returns an error.
{
"message": "Order ID \"order_12345\" has already been used with a different transaction",
"error": "Bad Request",
"statusCode": 400
}Create Payment Link
/payment-links/apiCreate a payment link that you can share with customers.
Request Body
amountrequired | number | Amount in DZD |
descriptionrequired | string | Payment description |
riprequired | string | Your BaridiMob RIP (20 digits) |
expiresIn | number | Expiry in seconds (default: 3600) |
successUrl | string | Redirect URL after successful payment |
cancelUrl | string | Redirect URL if payment is cancelled |
metadata | object | Custom data to attach to the payment |
Request Body Example
{
"amount": 2500,
"description": "Premium Subscription",
"rip": "00799999000300012345",
"expiresIn": 3600,
"successUrl": "https://mysite.com/success",
"cancelUrl": "https://mysite.com/cancel",
"metadata": {
"orderId": "ORD-12345",
"customerEmail": "[email protected]"
}
}cURL Example
curl -X POST https://api.wadieapay.com/payment-links/api \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 2500,
"description": "Premium Subscription",
"rip": "00799999000300012345",
"successUrl": "https://mysite.com/success"
}'Response
{
"id": "pl_abc123",
"url": "https://pay.wadieapay.com/pl_abc123",
"amount": 2500,
"description": "Premium Subscription",
"status": "ACTIVE",
"expiresAt": "2024-01-15T15:30:00Z",
"createdAt": "2024-01-15T14:30:00Z"
}List Payment Links
/payment-links/apiList all your payment links with pagination.
Query Parameters
page | number | Page number (default: 1) |
limit | number | Items per page (max: 100) |
Example
curl "https://api.wadieapay.com/payment-links/api?page=1&limit=20" \
-H "Authorization: Bearer sk_live_..."Get Payment Link
/payment-links/api/:idRetrieve details of a specific payment link.
Path Parameters
idrequired | string | Payment link ID |
Example
curl "https://api.wadieapay.com/payment-links/api/pl_abc123" \
-H "Authorization: Bearer sk_live_..."Cancel Payment Link
/payment-links/api/:id/cancelCancel an active payment link. Completed links cannot be cancelled.
Path Parameters
idrequired | string | Payment link ID |
Example
curl -X PATCH "https://api.wadieapay.com/payment-links/api/pl_abc123/cancel" \
-H "Authorization: Bearer sk_live_..."Error Codes
The API uses standard HTTP status codes to indicate success or failure.
| Code | Description |
|---|---|
200 | Success |
401 | Invalid API key |
403 | Subscription inactive |
404 | Resource not found |
429 | Rate limit exceeded |
500 | Internal server error |
Error Response Format
{
"error": "Invalid API key",
"code": 401
}Rate Limits
API requests are rate limited to ensure fair usage and stability.
| Limit | Value |
|---|---|
| Requests per minute | 120 |
| Failed verification penalty | Temporary block |
Rate Limit Headers
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 119
X-RateLimit-Reset: 1704067200