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_key>

Request

{
  "payment_type": "dynamic-qr",
  "details": {
    "amount": 500,
    "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"
  },
  "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-25T04:47:50.159178853Z",
    "object": "payment",
    "payment_qr_code": "000201010212041552545429990002026390014tz.go.bot.tips01050399802086389040052045999530383454035005802TZ5909NEUROTECH6003DSM610512345622401086389040003086389040081500012tz.co.selcom0130 https://selcom.link/addbbff1 630401F1",
    "payment_token": "63890400",
    "payment_type": "dynamic-qr",
    "payment_url": "https://tz.selcom.online/paymentgw/checkout/...",
    "reference": "6a490816-799b-4fc9-b9b6-2ec67c54e17e",
    "status": "pending"
  }
}

Request Parameters

Required Fields

FieldTypeDescription
payment_typestringMust be dynamic-qr
details.amountintegerAmount in smallest currency unit
details.currencystringCurrency code (TZS)

Optional Fields

FieldTypeDescription
phone_numberstringCustomer phone number
customer.firstnamestringCustomer first name
customer.lastnamestringCustomer last name
customer.emailstringCustomer email
details.redirect_urlstringURL to redirect after success
details.cancel_urlstringURL to redirect on cancel
webhook_urlstringURL for webhook notifications
metadataobjectCustom key-value data

Response Fields

FieldDescription
payment_qr_codeQR code data string to display to customer
payment_urlHosted payment page URL (alternative to QR)
payment_tokenPayment token for reference
referenceUnique payment reference
expires_atPayment expiration time (4 hours from creation)

How It Works

  1. Create a payment intent
  2. Display the QR code from payment_qr_code to the customer (render as QR image)
  3. Alternatively, redirect customer to payment_url
  4. Customer scans the QR code with their mobile money app
  5. Customer confirms payment in their app
  6. Snippe sends a webhook notification with the result

On this page