Skip to main content
A card payment (cpy_*) records one attempt to pay a payment intent. An intent can have multiple attempts, but only one successful payment. To learn more, see Get paid by link, Refund a card payment and Accept in Sandbox.

Example

GET /card-payments/{cardPaymentId}
The object is everything inside data. The field names below are relative to it: attributes.amount is data.attributes.amount in the response.

Fields

string
required
Card payment ID (cpy_*).
string
required
Resource type. Always cardPayment.
object
required
The card payment’s details.
object
required
Related resources, each by type and ID.

Statuses

Permissions

List and get need cardPayments.read.

Failure codes

Use failure.advice to decide what to do next: doNotRetry, tryAgainLater, or confirmCardData. Do not infer advice from the code alone. failure.code is one of: genericDecline, insufficientFunds, limitExceeded, issuerUnavailable, processorError, cardExpired, incorrectCardNumber, incorrectCvc, incorrectAddress, authenticationRequired, cardNotSupported, cardInactiveOrClosed, stopPayment, cardLostStolen, suspectedFraud, duplicateTransaction. failure.reason explains each one.

Events

  • cardPayment.created: A card payment was submitted and is processing. The fee is assessed when the card is authorized, so it’s always null on cardPayment.created. Read it from cardPayment.succeeded. A charge or hold you create with mandateId on POST /payment-intents doesn’t send it. Its only card payment events are cardPayment.succeeded and cardPayment.failed.
  • cardPayment.succeeded: A card payment was approved by the card network.
  • cardPayment.failed: A card payment was declined or could not be processed.

Errors

See the error codes these endpoints return.

Sandbox simulations

  • Card fixtures: Test successful payments, declines, 3-D Secure, subscriptions, settlement, cancels, and refunds in Sandbox
  • Sandbox: Settle a card payment: Settle a successful sandbox card payment into the receiving wallet.