API Reference
Guest purchase
Start guest checkout (without account) and create payment transaction.
POST /api/payments/guest-buy-planAccess : Public (API anti-abuse checks apply)
Operator use case
“Instant Payment” button: walk-in customer pays quickly without account creation.
Parameters
- key (query, optional depending on configuration)
Request body
{
"planId": "e6fd2c2b-1234-4a7e-8a6a-12ab34cd56ef",
"paymentPhone": "+237690201423",
"notificationContact": "client@example.com",
"username": "AA:BB:CC:DD:EE:FF",
"password": "Strong@Pass123",
"promoCode": "READY10"
}| Attribute | Type | Required | Description |
|---|---|---|---|
planId | string (UUID) | Yes | Plan to purchase. |
paymentPhone | string | Yes | Mobile Money number used for payment. |
notificationContact | string | No | Notification email or phone. The payment phone may be used when absent. |
username | string | No | Requested Wi-Fi username. Generated when absent. |
password | string | No | Requested password, minimum 6 characters. Generated when absent. |
promoCode | string | No | Promotional code to apply. |
Response body
{
"message": "Achat invité initié avec succès",
"purchaseId": "purchase_uuid",
"merchandTransactionId": "GR-TX-XXXXXXXXXX",
"notchTransactionId": "np_xxxxx",
"notchMessage": "Confirm the payment on your phone",
"paymentUrl": "https://...",
"isGuestPurchase": true
}| Attribute | Type | Description |
|---|---|---|
message | string | Initialization result message. |
purchaseId | string (UUID) | Local purchase identifier. |
merchandTransactionId | string or null | Merchant reference used for tracking. |
notchTransactionId | string or null | Payment provider reference. |
notchMessage | string or null | Instruction returned by the provider. |
paymentUrl | string or null | Payment link when supported by the method. |
isGuestPurchase | boolean | Whether the purchase was made without an account. |
For a business failure, the response may contain status: "failed" and an error message instead of a usable transaction.
Status codes
- 201 Created
- 400 Bad Request (invalid data)
- 404 Not Found (plan not found)
- 422 Unprocessable Entity (invalid or unprocessable payment data)
- 429 Too Many Requests (anti-abuse limit)