Payment Service
Overview
The Payment Service provides comprehensive payment lifecycle management for digital businesses using the PHP SDK. It enables you to process payments across 100+ connectors through a unified SDK.
Business Use Cases:
E-commerce checkout - Authorize funds at purchase, capture when items ship
SaaS subscriptions - Set up recurring payments with mandate management
Marketplace platforms - Hold funds from buyers, release to sellers on fulfillment
Hotel/travel bookings - Pre-authorize for incidentals, capture adjusted amounts
Digital goods delivery - Immediate capture for instant-access products
Operations
Authorize a payment amount on a payment method. This reserves funds without capturing them, essential for verifying availability before finalizing.
Two-step payment flow, verify funds before shipping
Finalize an authorized payment transaction. Transfers reserved funds from customer to merchant account, completing the payment lifecycle.
Order shipped/service delivered, ready to charge
Retrieve current payment status from the payment processor. Enables synchronization between your system and payment processors for accurate state tracking.
Check payment status, webhook recovery, pre-fulfillment verification
Cancel an authorized payment before capture. Releases held funds back to customer, typically used when orders are cancelled or abandoned.
Order cancelled before shipping, customer request
Reverse a captured payment before settlement. Recovers funds after capture but before bank settlement, used for corrections or cancellations.
Same-day cancellation, processing error correction
Initiate a refund to customer's payment method. Returns funds for returns, cancellations, or service adjustments after original payment.
Product returns, post-settlement cancellations
Increase authorized amount if still in authorized state. Allows adding charges to existing authorization for hospitality, tips, or incremental services.
Hotel incidentals, restaurant tips, add-on services
Initialize an order in the payment processor system. Sets up payment context before customer enters card details for improved authorization rates.
Pre-checkout setup, session initialization
Validate redirect-based payment responses. Confirms authenticity of redirect-based payment completions to prevent fraud and tampering.
3DS completion, bank redirect verification
Setup a recurring payment instruction for future payments/debits. This could be for SaaS subscriptions, monthly bill payments, insurance payments and similar use cases.
Subscription setup, recurring billing
SDK Setup
Common Patterns
E-commerce Checkout Flow
Flow Explanation:
createOrder - Initialize a payment order at the processor before collecting payment details.
authorize - After the customer enters their payment details, call the
authorizemethod with theorder_contextfrom step 1.capture - Once the order is shipped, call the
capturemethod with theconnector_transaction_idfrom step 2.
Next Steps
Refund Service - Process refunds and returns
Dispute Service - Handle chargebacks and disputes
Customer Service - Manage customer payment methods
Last updated
Was this helpful?

