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-request-id-123Request
{
"payment_type": "card",
"details": {
"amount": 150000,
"currency": "TZS",
"redirect_url": "https://yoursite.com/payment/success",
"cancel_url": "https://yoursite.com/payment/cancel"
},
"customer": {
"firstname": "John",
"lastname": "Doe",
"email": "john@example.com",
"address": "123 Main Street",
"city": "Dar es Salaam",
"state": "Dar es Salaam",
"postcode": "12345",
"country": "TZ"
},
"webhook_url": "https://yoursite.com/webhooks/snippe",
"metadata": {
"order_id": "ORD-12345"
}
}Response
{
"status": 201,
"data": {
"object": "payment",
"api_version": "2026-01-25",
"reference": "pi_a1b2c3d4e5f6",
"status": "pending",
"amount": {
"value": 150000,
"currency": "TZS"
},
"settlement": {
"gross": { "value": 150000, "currency": "TZS" },
"fees": { "value": 4500, "currency": "TZS" },
"net": { "value": 145500, "currency": "TZS" }
},
"channel": {
"type": "card",
"provider": null
},
"customer": {
"name": "John Doe",
"email": "john@example.com"
},
"urls": {
"payment": "https://checkout.snippe.sh/pay/pi_a1b2c3d4e5f6",
"redirect": "https://yoursite.com/payment/success",
"cancel": "https://yoursite.com/payment/cancel"
},
"metadata": {
"order_id": "ORD-12345"
},
"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 card |
details.amount | integer | Amount in smallest currency unit |
details.currency | string | Currency code (TZS) |
Customer Object (Required for Card)
| Field | Type | Description |
|---|---|---|
firstname | string | Customer first name |
lastname | string | Customer last name |
email | string | Customer email |
address | string | Billing address |
city | string | Billing city |
state | string | Billing state/region |
postcode | string | Postal code |
country | string | Country code (ISO 3166-1 alpha-2) |
How It Works
- You create a payment intent with customer billing details
- Redirect customer to the
urls.paymentURL - Customer enters card details on secure checkout page
- Customer is redirected to your
redirect_urlorcancel_url - Snippe sends a webhook notification with the result