Payments
Dynamic QR
Collect payments via QR codes
Generate QR codes that customers scan with their mobile money app to complete payment.
Create Payment
POST /v1/payments
Authorization: Bearer <api_key>
Content-Type: application/json
Idempotency-Key: <unique_key>Request
{
"payment_type": "dynamic-qr",
"details": {
"amount": 500,
"currency": "TZS",
"redirect_url": "https://your_domain.com/payment_done",
"cancel_url": "https://your_domain.com/payment_failed"
},
"phone_number": "255781000000",
"customer": {
"firstname": "FirstName",
"lastname": "LastName",
"email": "customer@email.com"
},
"webhook_url": "https://yoursite.com/webhooks/snippe",
"metadata": {
"order_id": "ORD-12345"
}
}Response
{
"status": "success",
"code": 201,
"data": {
"amount": {
"currency": "TZS",
"value": 500
},
"api_version": "2026-01-25",
"expires_at": "2026-01-25T04:47:50.159178853Z",
"object": "payment",
"payment_qr_code": "000201010212041552545429990002026390014tz.go.bot.tips01050399802086389040052045999530383454035005802TZ5909NEUROTECH6003DSM610512345622401086389040003086389040081500012tz.co.selcom0130 https://selcom.link/addbbff1 630401F1",
"payment_token": "63890400",
"payment_type": "dynamic-qr",
"payment_url": "https://tz.selcom.online/paymentgw/checkout/...",
"reference": "6a490816-799b-4fc9-b9b6-2ec67c54e17e",
"status": "pending"
}
}Request Parameters
Required Fields
| Field | Type | Description |
|---|---|---|
payment_type | string | Must be dynamic-qr |
details.amount | integer | Amount in smallest currency unit |
details.currency | string | Currency code (TZS) |
Optional Fields
| Field | Type | Description |
|---|---|---|
phone_number | string | Customer phone number |
customer.firstname | string | Customer first name |
customer.lastname | string | Customer last name |
customer.email | string | Customer email |
details.redirect_url | string | URL to redirect after success |
details.cancel_url | string | URL to redirect on cancel |
webhook_url | string | URL for webhook notifications |
metadata | object | Custom key-value data |
Response Fields
| Field | Description |
|---|---|
payment_qr_code | QR code data string to display to customer |
payment_url | Hosted payment page URL (alternative to QR) |
payment_token | Payment token for reference |
reference | Unique payment reference |
expires_at | Payment expiration time (4 hours from creation) |
How It Works
- Create a payment intent
- Display the QR code from
payment_qr_codeto the customer (render as QR image) - Alternatively, redirect customer to
payment_url - Customer scans the QR code with their mobile money app
- Customer confirms payment in their app
- Snippe sends a webhook notification with the result