Skip to Content
Docs

Payment lifecycle

A map of how payments flow through Pay.com, from session creation to settlement, across both SDK and API integrations.

Every payment processed through Pay.com follows a lifecycle that moves through distinct stages. The stages connect the same way whether you integrate via the SDK, the API, or both.

Core transaction types

Pay.com's payment system is built around four transaction types (charge, hold, refund, and payout) and three session types (payment session, setup session, and tokenization session):

ObjectWhat it doesID prefix
ChargeCaptures a payment immediatelychrg_*
HoldAuthorizes funds without capturinghld_*
RefundReturns funds from a completed charge to the customerrfnd_*
PayoutSends funds from the merchant to a customerpo_*
Payment sessionManages a customer's checkout flow via the SDKps_*
Setup sessionVerifies and saves a payment method via the SDK without chargingss_*
Tokenization sessionCollects card details via the SDK and returns a card token, without chargingts_*

Two integration paths

Pay.com supports two paths for processing payments. You can use one or both simultaneously, and they share the same token vault, payment methods, and provider connections.

The SDK path uses sessions to manage the customer-facing checkout. You create a session on your server, render Pay.com.js on your frontend, and the SDK handles payment method collection, 3D Secure challenges, and payment processing. The API path gives you full control. You collect payment details (or use stored tokens), send them directly to the Pay.com API, and handle any additional flows like 3D Secure authentication yourself.

Sending raw card details via the API requires PCI DSS Level 1 compliance (SAQ-D). If you use stored tokens or payment method IDs, this requirement does not apply.

The payment lifecycle

A payment starts with the customer's first action and goes through Pay.com until a charge or hold is created. Both the SDK and API paths lead to the same underlying transaction types.

After a charge succeeds (or a hold is captured), two more stages follow:

  1. Clearing. The card network clears the transaction, usually a day or more after authorization. Pay.com then records a cash flow transaction with the fees for it and sends a cashflow_transaction.created webhook event. See cash flow.
  2. Settlement. Cleared funds are paid out to your bank account in a settlement, and Pay.com sends a settlement.paid webhook event. Until then, the charge has paid: false. See settlements.

Status overview

Once a charge or hold is created, it moves through its own status progression depending on the outcome. Its main states run from creation to success, failure, or cancellation.

A charge can resolve immediately or pass through authentication and confirmation steps depending on your 3D Secure configuration:

  1. Charge created
    • succeeded, Approved, no 3DS
    • requires_authentication, 3DS required
      • succeeded, Authentication passed, confirm: true
      • requires_confirmation, Authentication passed, confirm: false
        • succeeded, You confirm it
        • failed, Confirmation declined
      • failed, Authentication failed
    • failed, Declined
    • blocked, Blocked by a rule
    • pending, Result not final yet
      • succeeded or failed, Final result by webhook

If the issuer approves only part of the amount, the charge is succeeded_partially, or requires_partial_approval_action when server-to-server partial approval is on. See handle partial approvals. A charge is awaiting_final_confirmation when the payment method approved it but its final confirmation is still pending.

A hold follows a similar initial path, but lands on requires_capture instead of completing immediately. From there, you decide whether to capture or cancel:

  1. Hold created
    • requires_capture, Authorized
      • succeeded, Captured
      • canceled, You cancel it, or the hold expires
    • requires_authentication, 3DS required
      • requires_capture, Authentication passed, confirm: true
        • succeeded, Captured
        • canceled, You cancel it, or the hold expires
      • requires_confirmation, Authentication passed, confirm: false
        • requires_capture, You confirm it
          • succeeded, Captured
          • canceled, You cancel it, or the hold expires
      • failed, Authentication failed
    • failed, Declined

An expired hold is canceled with cancellation_reason: hold_on_funds_expired. A hold can also be blocked by a payment rule, succeeded_partially when it's approved for less than the requested amount, or pending when it's approved with no approved amount yet.

A refund is pending, succeeded, failed, or blocked. Partial and multiple refunds are supported on the same charge. A payout is pending, succeeded, failed, blocked, or returned. See Track and manage payouts.

Payment method verification

In addition to processing payments, Pay.com supports verifying and saving payment methods for future use without charging the customer. You can use a setup session via the SDK (POST /v1/sessions/setup) to save a card during checkout, or create a payment method via the API (POST /v1/payment_methods) to verify and store a card server-to-server. Both flows support 3D Secure authentication when required, following the same linked authentication session pattern used for charges and holds.

Next steps

Was this page helpful?