Payment integration guides
16 step-by-step payment integration guides with working code: sandbox setup, credentials, authentication, initiating a payment, confirming it from webhooks or status checks, refunds, error handling, security and going live.
- Adyen Checkout: Sessions flow, Drop-in and HMAC webhooks — Accept payments with Adyen's sessions flow: create a session on your server, render Drop-in with Adyen Web, handle redirects, confirm the outcome from HMAC-verified AUTHORISATION webhooks and refund…
- Airtel Money Collections: USSD Push with the Airtel Africa Open API — Collect Airtel Money payments with a USSD PIN prompt: OAuth token, country base URLs, payment request, callback, status enquiry, refunds and message signing — with clear notes on what to verify in…
- Flutterwave Checkout (Standard): hosted payment page, webhooks, verify and refunds — Create a Flutterwave-hosted payment link from your server, verify webhooks (verif-hash on v3, HMAC-SHA256 flutterwave-signature on v4), confirm by transaction id and issue refunds.
- M-Pesa Daraja STK Push (Lipa na M-Pesa Online) — Accept M-Pesa payments in Kenya by sending a PIN prompt to the customer's phone: OAuth token, STK Push, callback handling, STK query, Transaction Status and reversals.
- MTN MoMo Collections: Request to Pay with the MoMo Open API — Collect MTN Mobile Money payments with the MoMo Open API: subscription key, sandbox API user and key, access token, requesttopay, status checks, callbacks and refunds.
- Mercado Pago Checkout Pro: preferences, back URLs and signed webhooks — Send buyers to Mercado Pago's hosted Checkout Pro using a payment preference, handle back_urls safely, validate x-signature webhooks, and confirm payments by fetching them from the Payments API…
- Mollie Payments API: hosted checkout, webhooks and refunds — Accept iDEAL, cards, Bancontact and other European methods with Mollie: create a payment, redirect to the hosted checkout, confirm it by re-fetching the payment when the webhook arrives, and issue…
- PayHero Kenya: M-Pesa STK Push via the PayHero API — Collect M-Pesa payments into your Till, Paybill or bank account through PayHero: Basic-auth API key, payment channel, STK Push request, callback handling and transaction status.
- PayPal Checkout with Orders v2, verified webhooks and refunds — Accept PayPal (and cards via PayPal) with the Orders v2 API: OAuth client-credentials tokens, create and capture orders server-side, render PayPal buttons, verify webhooks with…
- Paystack Checkout: initialize, Popup or redirect, webhook, verify, refund — Accept cards, bank transfer, USSD and mobile money with Paystack: initialize on the server, open Popup or redirect, verify signed webhooks, confirm with the verify API and issue refunds.
- Pesapal API 3.0: hosted checkout, IPN and transaction status — Accept cards and mobile money through Pesapal's hosted payment page: request a token, register an IPN URL, submit an order, verify every notification with GetTransactionStatus, and request refunds.
- Razorpay Orders API + Checkout with signature verification and webhooks — Accept payments in India with Razorpay: create an Order on your server (amount in paise), open Checkout on web or Flutter, verify the payment signature HMAC-SHA256(order_id|payment_id), confirm with…
- Square Web Payments SDK + Payments API — Take card payments with Square: tokenise the card in the browser with the Web Payments SDK, charge it from your server with the Payments API and an idempotency key, verify webhook signatures and…
- Stripe Billing subscriptions with Checkout and the customer portal — Sell recurring plans with Stripe: Products and Prices, a subscription-mode Checkout Session, the hosted customer portal, and webhook-driven provisioning on checkout.session.completed, invoice.paid…
- Stripe Checkout with verified webhooks, refunds and idempotency — Sell one-time products with a Stripe-hosted Checkout page: create Checkout Sessions on your server, fulfil orders from signature-verified webhooks (raw body + Stripe-Signature), check PaymentIntent…
- Xendit Invoices: hosted payment links with verified callbacks — Create a Xendit Invoice, send the buyer to its hosted invoice_url, verify the x-callback-token on the invoice callback, confirm the status with the API and fulfil once. Covers expiry, refunds and…