Overview
Payment links provide a hosted payment page that accepts:- Mobile money payments
- Bank transfers
- Card payments
- Crypto payments
- Single link, multiple payment methods
- Flexible pricing (fixed, variable, packages)
- Customer info collection
- Branded payment pages
- Usage limits and expiration
- Automatic wallet routing
- Webhook notifications
Payment Link Creation Flow
Create and configure a payment link with pricing, payment methods, and branding.Flow Diagram
Details
Pricing Types:- FIXED: Set amount (e.g., $10.00)
- VARIABLE: Min/max range (e.g., 100)
- CUSTOMER_CHOICE: Customer enters any amount within limits
- PACKAGE: Predefined packages (e.g., Basic 25, Enterprise $100)
MOBILE_MONEY: Mobile money paymentsBANK: Bank transfersCARD: Card paymentsCRYPTO: Cryptocurrency payments
- SINGLE_USE: Link expires after one successful payment
- MULTIPLE_USE: Can be used up to
maxUsestimes - UNLIMITED: No usage limit
REQUIRED: Must be providedOPTIONAL: Can be skippedHIDDEN: Not collected
- Short code generated automatically (e.g.,
abc123) - Link URL:
https://pay.kotanipay.com/l/{shortCode} - Wallets assigned based on enabled payment methods
- Multi-currency support per payment method
- Branding customization (logo, colors)
- Optional expiration date
- Callback URL for webhooks
Mobile Money Payment Flow
Customer pays via mobile money through a payment link.Flow Diagram
Details
Supported Networks: M-PESA, Airtel Money, MTN Mobile Money, Tigo Pesa, Vodafone Customer Flow:- Customer visits payment link
- Selects mobile money payment method
- Enters phone number
- Enters amount (if variable pricing)
- Provides required customer info
- Submits payment
- Receives STK push on phone
- Enters PIN to authorize
- Receives confirmation on payment page
- Real-time validation of phone numbers
- Currency auto-detected from phone number
- Automatic network detection (M-PESA, MTN, etc.)
- Payment typically completes in seconds
- Digital receipt displayed after payment
- Webhook sent to integrator callback URL
- Usage count incremented on success
Card Payment Flow
Customer pays via debit/credit card through a payment link.Flow Diagram
Details
Supported Cards: Visa, Mastercard, American Express Card Processing:- Secure 3DS authentication
- PCI-DSS compliant
- Card details never stored by Kotani Pay
- Automatic currency conversion if needed
- Enters card details on secure page
- Redirected to card provider
- Completes 3DS authentication (SMS OTP, biometric, etc.)
- Payment processed
- Redirected back to payment page
- Receives confirmation
- 3DS2 authentication for enhanced security
- Support for international cards
- Real-time payment validation
- Automatic retries on network issues
- Detailed failure reasons provided
Crypto Payment Flow
Customer pays via cryptocurrency through a payment link.Flow Diagram
Details
Supported Networks:- Ethereum, Polygon, Arbitrum, Base, Optimism (EVM chains)
- TRON
- Stellar
- Lightning Network
- Selects crypto payment
- Chooses network and token
- Sees deposit address and QR code
- Sends crypto from their wallet
- Waits for confirmations (real-time updates)
- Receives confirmation
- EVM chains: 3 blocks
- TRON: Instant (TronGrid verification)
- Stellar: 1-2 seconds
- Lightning: Instant
- QR code for easy mobile wallet scanning
- Real-time confirmation tracking
- Block explorer links provided
- Automatic refund for incorrect amounts
- Gas fees handled by customer
- No KYC required for small amounts
Bank Transfer Payment Flow
Customer pays via bank transfer through a payment link.Flow Diagram
Details
Supported Countries: Kenya, South Africa, Nigeria Processing Time: Instant to 24 hours depending on bank Customer Experience:- Selects bank payment
- Redirected to bank provider
- Selects their bank
- Logs in to online banking
- Authorizes payment
- Redirected back to payment page
- Receives confirmation
- Secure OAuth-based bank authentication
- No card details required
- Lower fees than card payments
- May require bank account verification
- Processing time varies by bank
Transaction Statuses
| Status | Description |
|---|---|
PENDING | Transaction created, awaiting payment |
INITIATED | Payment initiated with provider |
PROCESSING | Payment being processed |
COMPLETED | Payment successful, funds received |
FAILED | Payment failed |
TIMEOUT | Payment not completed within time limit |
CANCELLED | Customer cancelled payment |
REFUNDED | Payment refunded to customer |
Webhook Notifications
Webhooks are sent for all transaction status changes. Webhook Payload:payment_link.transaction.initiatedpayment_link.transaction.processingpayment_link.transaction.completedpayment_link.transaction.failed
- HMAC signature verification required
- Retry mechanism (3x with exponential backoff)
- Webhook logs available in dashboard
Best Practices
Link Configuration
- Use descriptive names for internal tracking
- Set appropriate usage limits
- Add expiration dates for time-sensitive payments
- Configure only needed payment methods
- Collect minimal customer info required
Pricing Strategy
- Use FIXED pricing for products/services
- Use VARIABLE for donations/tips
- Use PACKAGE for tiered offerings
- Set reasonable min/max amounts
- Consider payment method fees in pricing
Security
- Verify webhook signatures
- Don’t expose sensitive data in metadata
- Use HTTPS for callback URLs
- Implement idempotency in webhook handlers
- Store transaction IDs for reconciliation
Customer Experience
- Add clear description to payment link
- Use branding to build trust
- Provide multiple payment methods
- Set appropriate “after payment” actions
- Test all payment flows before launch
Monitoring
- Monitor callback delivery success
- Track payment method usage
- Analyze failure patterns
- Set up alerts for high failure rates
- Reconcile transactions regularly
Error Handling
Link Expired
Usage Limit Reached
Invalid Amount
Payment Method Not Enabled
Testing
Sandbox mode test data: Test Short Codes: Create test links in sandbox mode Test Payments:- Mobile Money: Use test phone
+254700000000 - Card: Use test card
4242 4242 4242 4242 - Bank: Select “Test Bank” in checkout
- Crypto: Use testnet addresses
- Amounts ending in
00trigger success - Amounts ending in
99trigger failure - Amounts ending in
50trigger timeout