Pine LabsDOCS

Payment Lifecycle

Understand the complete payment lifecycle — from customer creation and order management to payment processing, refunds, settlements, and transaction enquiry.

The Pine Labs Online Payment Gateway provides a complete set of APIs to help you securely accept, process, manage, and reconcile online payments. From creating an order to receiving settlements, every stage of the payment journey is supported through a unified set of APIs and developer tools.

This section explains the complete payment lifecycle and the APIs required at each stage to build a reliable online payment experience.


Payment Overview

A typical payment lifecycle consists of the following stages:

  1. Geberate Token – Generate a Token using client_id and client_secret.
  2. Create an Order – Generate an order before initiating a payment.
  3. Initiate Payment – Create a payment request using the Order ID.
  4. Customer Authentication – Redirect the customer to the secure Pine Labs Checkout using the challenge_url.
  5. Payment Processing – The customer completes the payment using their preferred payment method.
  6. Payment Confirmation – Verify the payment status using Webhooks or the Payment Status API.
  7. Post-Payment Actions – Process refunds, settlements, and transaction enquiries as required.

Supported Payment Methods

Pine Labs Online Payments supports multiple payment methods through a single integration.

  • 💳 Credit & Debit Cards
  • 📱 UPI
  • 👛 Digital Wallets
  • 🏦 Net Banking
  • 💰 EMI & Cardless EMI
  • 🛍️ Buy Now, Pay Later (BNPL)
  • 🎁 Pay by Points / Loyalty Rewards
  • 🌍 International Payments

Available Payment APIs

Use the following APIs to manage the complete payment lifecycle.

APIPurpose
Create OrderCreate an order before initiating a payment.
Create PaymentInitiate a payment for an existing order.
Order StatusRetrieve the latest Order status.
Refund APIInitiate full or partial refunds.
Transaction EnquiryRetrieve transaction details.
Settlement APIsTrack and reconcile settlements.

Create a Payment

Before creating a payment, you must first create an order.

Use the Create Payment API to initiate a payment against the Order ID. The API response returns a challenge_url, which should be used to redirect the customer to the secure Pine Labs Checkout page to complete the payment.

After the customer completes authentication, verify the Order status using Webhooks or the Get Order Status API before fulfilling the order.

Custom Checkout Flow

Build your own payment UI with full control over the checkout experience using Pine Labs APIs.

→ Generate Token
→ Create Order
→ Create Payment
→ Get Order
→ Create Refund

Hosted Checkout Flow

Use Pine Labs hosted checkout for faster setup — no UI to build, payment page handled by Pine Labs.

→ Generate Token
→ Create Order
→ Get Order
→ Create Refund

What's Next?

Continue exploring the remaining stages of the payment lifecycle:

  • Refunds – Issue full or partial refunds.
  • Settlements – Track merchant settlements and reconciliation.
  • Transaction Enquiry – Retrieve transaction and payment details.
  • Webhooks – Receive real-time payment event notifications.