Transactions
Understand charges, holds, and refunds in Pay.com, including their lifecycles and status models.
Every movement of money in Pay.com is represented as a transaction object: money-in transactions (charges and holds) and money-out transactions (refunds and payouts).
| Transaction type | Use case |
|---|---|
| Charges | Immediate payment capture |
| Holds | Reserve funds before capture |
| Refunds | Return funds from completed charges |
| Payouts | Send funds to customers |
For 3D Secure authentication on charges and holds, see 3D Secure. For payout statuses, see Track and manage payouts.
Charges
A charge captures funds from a customer's payment method into your account.
Creating a charge
How you create a charge depends on your integration path:
Create a payment session with capture: true (the default) via POST /v1/sessions/payment.
Pay.com.js handles payment collection, 3D Secure, and processing, and creates
the charge automatically.
See Universal checkout, Headless checkout, or Headless wallet payments.
Charge statuses
A charge can resolve immediately or pass through authentication and confirmation steps, depending on your 3D Secure configuration:
- Create charge
- Pay.com API
- succeeded
- failed
- blocked
- pending
- Final result by webhook
- succeeded
- failed
- requires_authentication
- 3DS challenge
- succeeded
- failed
- requires_confirmation
- Confirm charge
- succeeded
- failed
A charge has one of these statuses:
| Status | Meaning |
|---|---|
succeeded | The charge was approved and funds have been captured. |
succeeded_partially | The issuer approved only part of the amount. See Handle partial approvals. |
pending | The result isn't final yet (for example, with redirect-based payment methods). Wait for the webhook with the outcome. |
failed | The charge was declined by the issuer. |
blocked | A payment rule blocked the charge. |
requires_authentication | The charge needs 3D Secure authentication before it can be completed. |
requires_confirmation | Authentication is complete, but you must confirm the charge (when you create it with confirm: false). |
requires_partial_approval_action | The charge was partially approved and server-to-server partial approval is on. Confirm or cancel the partial amount. See Handle partial approvals. |
awaiting_final_confirmation | The payment method approved the charge, but its final confirmation is still pending. |
When the API returns requires_authentication, create a
linked authentication session
to complete the challenge. With Pay.com.js, 3D Secure is handled
automatically. Pay.com.js shows the challenge and handles the redirects, so
you don't need extra code.
For the charge webhook events, see Webhook events.
Charge object fields
When you retrieve a charge with GET /v1/charges/{charge_id}, the response
includes these fields:
| Field | Description |
|---|---|
amount | The charge amount in the smallest currency unit (for example, cents). |
amount_refunded | The total amount that has been refunded from this charge. |
status | The current status of the charge. |
payment_method | The ID of the payment method used. |
hold | If this charge was created by capturing a hold, the hold ID. |
payment_session | If this charge was created from a payment session, the session ID. |
refunds | A list of refund objects linked to this charge. |
metadata | Custom key-value pairs attached to the charge. |
paid | Whether the charge has been settled and paid to your bank account. A charge with status: succeeded can have paid: false because settlement happens after approval. Use status to confirm the charge was approved, and paid to confirm funds have reached your account. |
A charge can also be created by capturing a hold. When you capture a hold
(fully or partially), a charge object is created and linked to the original
hold through the hold field. See Holds and captures.
Holds and captures
A hold (also called an authorization) reserves funds on a customer's payment method without capturing them. This is useful when you need to confirm an order, verify inventory, or wait for fulfillment before taking the money. Once a hold is approved, you decide when to capture the funds or cancel the hold to release them back to the customer.
Creating a hold
There are two ways to create a hold, depending on your integration path:
Create a payment session with capture: false via POST /v1/sessions/payment. Pay.com.js
handles the rest, and on success Pay.com creates a hold instead of a charge.
The hold lifecycle
A hold moves from creation through authorization to its final state, captured or canceled:
- Create hold
- Pay.com API
- failed
- blocked
- requires_capture, Approved (no 3DS)
- Capture hold
- succeeded
- Cancel hold
- canceled
- canceled, Expired (
hold_on_funds_expired)
- requires_authentication
- 3DS challenge
- failed
- requires_capture
- Capture hold
- succeeded
- Cancel hold
- canceled
- canceled, Expired (
hold_on_funds_expired)
- requires_confirmation
- Confirm hold
- requires_capture
- Capture hold
- succeeded
- Cancel hold
- canceled
- canceled, Expired (
hold_on_funds_expired)
Hold statuses
A hold has one of these statuses:
| Status | Meaning |
|---|---|
requires_capture | The hold was approved. Funds are reserved and waiting for you to capture or cancel. |
succeeded | At least one capture was made, and a charge was created for each capture. |
canceled | The hold was canceled or expired. All reserved funds have been released to the customer. |
failed | The hold was declined by the issuer. |
blocked | A payment rule blocked the hold. |
requires_authentication | 3D Secure is needed to complete the authorization. |
requires_confirmation | Authentication succeeded, and the hold is waiting for you to confirm it (when you create it with confirm: false). |
succeeded_partially | The approved amount differs from the requested amount. A hold that accepts partial approval returns requires_capture for the approved amount instead. See Partial approvals on holds. |
pending | The hold was approved, with no approved amount yet. |
Hold expiration
Holds don't last forever. By default, an uncaptured hold expires after
7 days. The exact window depends on the card network and acquirer
rules. When a hold expires, the reserved funds are released back to the
customer automatically. The hold transitions to status: canceled with
cancellation_reason: hold_on_funds_expired, and Pay.com sends a
hold.canceled webhook event.
Capturing a hold
Once a hold is in requires_capture status, you capture it via
POST /v1/holds/{hold_id}/capture to move the funds. Pay.com supports three capture
strategies:
- Full capture: Omit
amount_to_capture(or set it to the full hold amount) to capture the entire authorized amount. - Partial capture: Set
amount_to_capturebelow the authorized amount. The rest stays capturable (seeamount_capturable) until you capture it, cancel the hold, or the hold expires. - Multiple captures: You can capture a hold in multiple steps, as long as the total captured amount doesn't exceed the original authorization. Each capture creates a separate charge object linked to the hold.
The hold object includes an amount_capturable field that tells you how much is still
available to capture. This value decreases with each capture you make.
For detailed instructions, see the Hold and capture guide.
Canceling a hold
If you no longer need to capture the funds, cancel the hold via
POST /v1/holds/{hold_id}/cancel to release the reservation. The customer's issuer
decides when the released funds are available to them again.
Cancellation is full only. You can't partially cancel a hold. To release only part of the funds, capture only the amount you need (a partial capture).
For detailed instructions, see the Cancel a hold guide.
Hold object fields
When you retrieve a hold with GET /v1/holds/{hold_id}, the response includes
these fields:
| Field | Description |
|---|---|
amount | The original authorized amount. |
amount_capturable | The remaining amount available to capture. Decreases as you make captures. |
charges.data | An array of charge objects created from this hold (via capture). |
canceled | Whether the hold has been canceled. |
cancellation_reason | Why the hold was canceled: requested_by_merchant or hold_on_funds_expired. |
payment_session | If this hold was created from a payment session, the session ID. |
To list the charges created from a hold's captures, call
GET /v1/holds/{hold_id}/charges.
Common patterns
Holds are commonly used across a range of business scenarios:
- Pre-authorization in e-commerce: Place a hold at checkout, capture when the order ships, and cancel if the order is canceled before shipment.
- Partial fulfillment: Ship an order in multiple packages and use multiple partial captures so the customer is only charged for what has shipped.
- Tip adjustment in hospitality: Place a hold for the base amount, then capture for the adjusted total including the tip.
For the hold webhook events, see Webhook events.
Refunds
A refund returns funds from a completed charge back to the customer's original payment method. Pay.com supports full refunds, partial refunds, and multiple refunds on the same charge.
Creating a refund
Pay.com.js has no refund component. Create a refund with the API or in the Pay.com dashboard.
With the API, call POST /v1/refunds with the charge ID and optionally an amount. In
the Pay.com dashboard, open the transaction and click Refund.
A refund request takes these parameters:
| Parameter | Required | Description |
|---|---|---|
charge | Yes | The ID of the charge to refund, for example chrg_686511195653406720. |
amount_to_refund | No | The amount to refund in the smallest currency unit. Omit for a full refund. |
reference | No | Your custom reference string for this refund. |
metadata | No | Custom key-value pairs to attach to the refund. |
For a step-by-step walkthrough, see the Refund a charge guide.
Full, partial, and multiple refunds
Pay.com gives you three ways to return funds from a single charge. A full
refund returns the entire charge amount. To issue one, omit
amount_to_refund. A partial refund returns less than the full charge.
Set amount_to_refund to a smaller value. You can also issue multiple
refunds against the same charge, as long as the total refunded amount
doesn't exceed the original charge amount. Each refund creates a separate
refund object.
A refund returns money from a completed charge to the customer. A hold cancellation releases a reserved authorization without capturing it. Refunds happen after payment, and hold cancellations happen before it. Refunds can be partial or multiple, but a cancellation is always for the full hold. To release part of a hold, use a partial capture instead.
Tracking refunded amounts
The charge object provides two fields to help you track how much has been refunded. The
amount_refunded field shows the total amount refunded so far (the sum of all refunds), and
the refunds.data array contains all individual refund objects linked to the charge. To check
how much is still available to refund, subtract amount_refunded from amount. To list a
charge's refunds on their own, call
GET /v1/charges/{charge_id}/refunds.
The refunded field on the charge object is true only when the charge has
been fully refunded, meaning amount_refunded equals amount.
Refund statuses
A refund moves through these statuses:
- Create refund
- Pay.com API
- failed
- pending
- Bank processes transfer
- succeeded
- failed
| Status | Meaning |
|---|---|
pending | The refund was submitted. The final result arrives by webhook (refund.succeeded or refund.failed). |
succeeded | The refund was processed successfully. Funds are being returned to the customer. |
failed | The refund could not be processed. |
blocked | A payment rule blocked the refund. |
For the refund webhook events, see Webhook events.
Refund object fields
When you retrieve a refund with GET /v1/refunds/{refund_id}, the response
includes these fields:
| Field | Description |
|---|---|
amount | The refund amount in the smallest currency unit. |
charge | The ID of the charge this refund was issued against. |
status | The current status of the refund (pending, succeeded, failed, or blocked). |
reference | Your custom reference, if provided when creating the refund. |
metadata | Custom key-value pairs attached to the refund. |
Next steps
Related payment guides:
- Create a charge: step-by-step walkthrough for creating a charge via the API.
- Hold and capture: reserve funds and capture them when you're ready to fulfill.
- Refund a charge: issue full or partial refunds via the API.
- Create a payout: send funds to a customer's payment method.
- Webhook events: full reference of events emitted for charges, holds, refunds, and payouts.