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

FieldTypeDescription
payment_typestringMust be card
details.amountintegerAmount in smallest currency unit
details.currencystringCurrency code (TZS)
details.redirect_urlstringURL to redirect after successful payment
details.cancel_urlstringURL to redirect on cancel/failure
customer.firstnamestringCustomer first name
customer.lastnamestringCustomer last name
customer.emailstringCustomer email
customer.addressstringBilling address
customer.citystringBilling city
customer.statestringBilling state/region
customer.postcodestringBilling postal code
customer.countrystringCountry code (ISO 3166-1 alpha-2)

Optional Fields

FieldTypeDescription
phone_numberstringCustomer phone number
webhook_urlstringURL for webhook notifications
metadataobjectCustom key-value data

Response Fields

FieldDescription
payment_urlURL to redirect customer for card entry
payment_tokenPayment token for reference
payment_qr_codeQR code data (can also be used for QR payment)
referenceUnique payment reference
expires_atPayment expiration time

How It Works

  1. Create a payment intent with customer billing details
  2. Redirect customer to the payment_url
  3. Customer enters card details on secure checkout page
  4. Customer is redirected to your redirect_url or cancel_url
  5. Snippe sends a webhook notification with the result

On this page