Payments

Mobile Money

Collect payments via mobile money networks

Collect payments from customers using mobile money. The customer receives a USSD push notification to authorize the payment.

Supported Networks

NetworkCountry
Airtel MoneyTZ
M-PesaTZ
Mixx by YasTZ
HalotelTZ

Create Payment

POST /v1/payments
Authorization: Bearer <api_key>
Content-Type: application/json
Idempotency-Key: <unique_key>

Request

{
  "payment_type": "mobile",
  "details": {
    "amount": 500,
    "currency": "TZS"
  },
  "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-25T05:04:54.063993853Z",
    "object": "payment",
    "payment_type": "mobile",
    "reference": "9015c155-9e29-4e8e-8fe6-d5d81553c8e6",
    "status": "pending"
  }
}

Request Parameters

Required Fields

FieldTypeDescription
payment_typestringMust be mobile
details.amountintegerAmount in smallest currency unit
details.currencystringCurrency code (TZS)
phone_numberstringCustomer phone number (255XXXXXXXXX)
customer.firstnamestringCustomer first name
customer.lastnamestringCustomer last name
customer.emailstringCustomer email

Optional Fields

FieldTypeDescription
webhook_urlstringURL for webhook notifications
metadataobjectCustom key-value data

How It Works

  1. Create a payment intent with the customer's phone number
  2. Customer receives a USSD push on their phone
  3. Customer enters their PIN to authorize
  4. Snippe sends a webhook notification with the result
  5. Payment expires after 4 hours if not completed

Error Responses

Validation Error (400)

{
  "status": "error",
  "code": 400,
  "error_code": "validation_error",
  "message": "amount is required"
}

Unauthorized (401)

{
  "status": "error",
  "code": 401,
  "error_code": "unauthorized",
  "message": "invalid or missing API key"
}

On this page