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-request-id-123Request
{
"payment_type": "dynamic-qr",
"details": {
"amount": 50000,
"currency": "TZS",
"redirect_url": "https://yoursite.com/payment/success",
"cancel_url": "https://yoursite.com/payment/cancel"
},
"phone_number": "+255712345678",
"customer": {
"firstname": "John",
"lastname": "Doe",
"email": "john@example.com"
},
"webhook_url": "https://yoursite.com/webhooks/snippe",
"metadata": {
"order_id": "ORD-12345",
"product": "Premium Plan"
}
}Response
{
"status": 201,
"data": {
"object": "payment",
"api_version": "2026-01-25",
"reference": "pi_a1b2c3d4e5f6",
"status": "pending",
"amount": {
"value": 50000,
"currency": "TZS"
},
"settlement": {
"gross": { "value": 50000, "currency": "TZS" },
"fees": { "value": 1000, "currency": "TZS" },
"net": { "value": 49000, "currency": "TZS" }
},
"channel": {
"type": "dynamic-qr",
"provider": null
},
"customer": {
"phone": "+255712345678",
"name": "John Doe",
"email": "john@example.com"
},
"urls": {
"qr_code": "https://api.snippe.sh/qr/pi_a1b2c3d4e5f6.png"
},
"metadata": {
"order_id": "ORD-12345",
"product": "Premium Plan"
},
"expires_at": "2026-01-24T11:00:00Z",
"created_at": "2026-01-24T10:00:00Z"
}
}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 | object | Customer information |
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 (max 50 keys) |
How It Works
- You create a payment intent
- Display the QR code from
urls.qr_codeto the customer - Customer scans the QR code with their mobile money app
- Customer confirms payment in their app
- Snippe sends a webhook notification with the result