Payments
Card Payments
Collect payments via credit and debit cards
Collect payments from customers using credit and debit cards. Customer is redirected to a secure checkout page to complete payment.
Supported Cards
- Visa
- Mastercard
- Local debit cards
Create Payment
POST /v1/payments
Authorization: Bearer <api_key>
Content-Type: application/json
Idempotency-Key: <unique_key>Request
{
"payment_type": "card",
"details": {
"amount": 1000,
"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",
"address": "Customer Address",
"city": "Customer City",
"state": "DSM",
"postcode": "14101",
"country": "TZ"
},
"webhook_url": "https://yoursite.com/webhooks/snippe",
"metadata": {
"order_id": "ORD-12345"
}
}Response
{
"status": "success",
"code": 201,
"data": {
"amount": {
"currency": "TZS",
"value": 1000
},
"api_version": "2026-01-25",
"expires_at": "2026-01-25T01:32:10.476693917Z",
"object": "payment",
"payment_qr_code": "000201010212041552545429990002026390014tz.go.bot.tips...",
"payment_token": "63891931",
"payment_type": "card",
"payment_url": "https://tz.selcom.online/paymentgw/checkout/...",
"reference": "2e0bcc5f-92ca-44f9-8c1b-4d2966d9921f",
"status": "pending"
}
}Request Parameters
Required Fields
| Field | Type | Description |
|---|---|---|
payment_type | string | Must be card |
details.amount | integer | Amount in smallest currency unit |
details.currency | string | Currency code (TZS) |
details.redirect_url | string | URL to redirect after successful payment |
details.cancel_url | string | URL to redirect on cancel/failure |
customer.firstname | string | Customer first name |
customer.lastname | string | Customer last name |
customer.email | string | Customer email |
customer.address | string | Billing address |
customer.city | string | Billing city |
customer.state | string | Billing state/region |
customer.postcode | string | Billing postal code |
customer.country | string | Country code (ISO 3166-1 alpha-2) |
Optional Fields
| Field | Type | Description |
|---|---|---|
phone_number | string | Customer phone number |
webhook_url | string | URL for webhook notifications |
metadata | object | Custom key-value data |
Response Fields
| Field | Description |
|---|---|
payment_url | URL to redirect customer for card entry |
payment_token | Payment token for reference |
payment_qr_code | QR code data (can also be used for QR payment) |
reference | Unique payment reference |
expires_at | Payment expiration time |
How It Works
- Create a payment intent with customer billing details
- Redirect customer to the
payment_url - Customer enters card details on secure checkout page
- Customer is redirected to your
redirect_urlorcancel_url - Snippe sends a webhook notification with the result