Actions (Capture/Void/Refund)

Capture, void, and refund transactions using the Flintn API.

Prerequisites

An API key with the appropriate permissions:

  • transaction.capture for capturing

  • transaction.void for voiding

  • transaction.refund for refunding

See Authentication.

Action Overview

Action
Description
Valid From
Results In

Capture

Finalize an authorization and collect funds

AUTHORIZED

CAPTURED

Void

Cancel an authorization before capture

AUTHORIZED

VOIDED

Refund

Return funds to customer

SETTLED

REFUNDED

Partial Refund

Return partial amount

SETTLED

PARTIALLY_REFUNDED

Capture

Convert an authorization into an actual charge.

Full Capture

Response:

Partial Capture

Capture less than the authorized amount:

Note: Partial capture releases the remaining authorized funds back to the customer's card.

When to Capture

  • Immediate capture: For digital goods or services delivered instantly

  • Delayed capture: For physical goods (capture when shipped)

  • Partial capture: When order total changes (e.g., out of stock items)

Auto-Capture

If configured in your subscription plan's settlement_interval_hours, authorized transactions are automatically captured after the specified time.

Void

Cancel an authorization before it's captured or settled.

Response:

When to Void

  • Customer cancels order before shipment

  • Fraud detected before capture

  • Duplicate authorization

  • Order cannot be fulfilled

Void vs Refund

Scenario
Use

Authorization not yet captured

Void

Transaction already settled

Refund

Voids are preferred when possible because:

  • They release funds immediately

  • No processing fees are incurred

  • No chargeback risk

Refund

Return funds to a customer after settlement.

Full Refund

Response:

Partial Refund

Refund a portion of the transaction:

Response:

Multiple Partial Refunds

You can issue multiple partial refunds up to the original amount:

Refund Request Fields

Field
Type
Required
Description

amount

integer

No

Amount in cents (full refund if omitted)

reason

string

No

Reason for refund

Refund Timing

  • Refunds are typically processed within 5-10 business days

  • The exact timing depends on the customer's bank

  • The refund appears on the original payment method

Code Examples

JavaScript

Python

Error Responses

400 Bad Request - Invalid State

400 Bad Request - Exceeds Amount

404 Not Found

Webhook Events

Actions trigger corresponding webhook events:

Action
Event

Capture

TRANSACTION_CAPTURED

Void

TRANSACTION_VOIDED

Full Refund

TRANSACTION_REFUNDED

Partial Refund

TRANSACTION_PARTIALLY_REFUNDED

See Webhook Events for payload details.

Best Practices

Capture

  • Capture only when you're ready to fulfill the order

  • Use partial capture when order amounts change

  • Set up auto-capture for subscription payments

Void

  • Void authorizations promptly when orders are cancelled

  • Prefer void over refund when possible

Refund

  • Include a reason for audit purposes

  • Process refunds promptly (within 24-48 hours of request)

  • Send confirmation to customer after refund is processed

Next Steps

Last updated