Initialize Merchant Payment
Generate a payment link for your customers. This endpoint allows merchants to create unique payment links for their products or services.Endpoint
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer YOUR_API_KEY |
| Content-Type | string | Yes | application/json |
Request Body
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| externalTransactionId | string | Yes | Your unique transaction identifier |
| ItemName | string | Yes | Product or service name |
| ItemPrice | number | Yes | Price in FCFA (minimum: 100) |
| customData | string | No | Additional data in JSON format |
| callBackURL | string | Yes | URL for webhook notifications |
| successUrl | string | Yes | Redirect URL after successful payment |
| failureUrl | string | Yes | Redirect URL after failure |
| ClientName | string | No | Customer name |
| ClientPhone | string | No | Customer phone number |
| string | No | Customer email address |
Response
Successful Response (201)
Error Response (400)
Error Codes
| HTTP Code | Description |
|---|---|
| 400 | Invalid parameters or minimum amount not met |
| 401 | Invalid API key |
| 403 | API under maintenance |
| 409 | External transaction ID already used |
Validations
-
Minimum Amount
-
Unique Transaction ID
Request Example
Webhook Notification
When the transaction status changes, a webhook is sent to the URL specified incallBackURL:
Notes
-
Link Generation
- Payment link is generated automatically
- Format:
https://pay.dexchange.sn/process/{transactionId} - Valid until payment or expiration
-
Transaction Statuses
PENDING- Awaiting paymentSUCCESS- Payment successfulFAILED- Payment failedEXPIRED- Link expired
-
Security
- API key verification
- External ID uniqueness validation
- Merchant status verification
-
Notifications
- Webhook for status updates
- Merchant confirmation email
- Real-time updates via WebSocket