Skip to main content

Overview

The payment flow is simple:
  1. Customer creates order → Save as PENDING
  2. Create payment link → Get paymentRef
  3. Save paymentRef with order (important!)
  4. Redirect customer to payment page
  5. Customer pays and returns
  6. Check payment status and update order

Complete Implementation

Step 1: Order Creation

When a customer places an order, save it with a PENDING status:
Critical: Every order must have a unique ID and must start with status PENDING

Frontend: Order Status Page

Simple HTML page with manual check button:

Database Schema

Simple schema for orders:

Key Points

Important: - Always save paymentRef with your order - Check payment status when customer returns - Only fulfill orders with status CONFIRMED - Payment links expire after 20 minutes

Next Steps

Continue to Status Polling

Learn how to automate status checking with cron jobs