Skip to main content
POST
Cancel a terminal payment

Authorizations

Authorization
string
header
required

A secret key, sk_test_... or sk_live_...; a publishable key (pk_...) on the browser routes only

Path Parameters

id
string
required
Required string length: 1 - 64

Response

The payment

object
enum<string>
required
Available options:
payment
id
string
required
Example:

"pay_test_7Hs2kQ9mL1pXv4cR8tWzAbCdEf"

status
enum<string>
required

processing until the processor answers, and, on a bank debit, until it settles, that is until the processor sends it to the bank in its next batch; authorized when it approved but has not captured; succeeded once a card is captured or a bank debit has settled, which does not make a bank debit final (see returned); failed when it refused (the create then answers 402 and this object stays readable); canceled after a void, a cancel, or a terminal payment nobody paid within five minutes (see cancellation_reason); returned when the money came back after success (a bank return or a chargeback, see failure); requires_action while the customer has to pass 3-D Secure at next_action.url, which only a charge created with a return_url can reach; it then moves to succeeded or failed.

Available options:
processing,
requires_action,
authorized,
succeeded,
failed,
canceled,
returned
Example:

"succeeded"

amount
integer
required

In the smallest unit of the currency (cents).

Example:

12550

currency
enum<string>
required
Available options:
USD,
CAD
Example:

"USD"

payment_method
string | null
required

The payment method charged; null on a terminal payment, where the customer presented the card on the terminal.

Example:

"pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf"

customer
string<uuid> | null
required
Example:

null

description
string | null
required
Example:

"Invoice INV-1042"

reference
string | null
required

Your reference, as you sent it.

Example:

"INV-1042"

card
object | null
required

Set when payment_method_type is card.

failure
object | null
required

Set when status is failed or returned: why, in a fixed vocabulary. card_declined, insufficient_funds, authentication_failed, invalid_payment_method and duplicate_transaction are the processor refusing the card; ach_returned, acss_returned and chargeback are money coming back after success; processing_error is a fault on the way to the processor or in the request, safe to retry later; a refusal in words Payra cannot classify reads card_declined. message is Payra's own sentence for the reason, or for the code when there is none; the processor's own text is never relayed.

next_action
object | null
required

Set while status is requires_action: send the customer to url for 3-D Secure. Only a charge created with a return_url can be challenged; otherwise this is null.

Example:

null

livemode
boolean
required
Example:

false

created_at
string<date-time>
required
Example:

"2026-09-18T20:00:00.000Z"

succeeded_at
string<date-time> | null
required

When the card was captured, or the bank debit settled.

Example:

"2026-09-18T20:00:01.312Z"

amount_refunded
integer
default:0

How much of amount has been refunded so far, counting refunds that succeeded, wherever they were made. status stays succeeded; GET /v1/refunds?payment= lists them.

Example:

0

payment_method_type
enum<string>
default:card

us_bank_account for a US bank debit (ACH), acss_debit for a Canadian one (EFT), card_present for a terminal payment. More values may be added: treat one you do not know as a card.

Available options:
card,
us_bank_account,
acss_debit,
card_present
Example:

"card"

terminal
string | null

The terminal a terminal payment was sent to (GET /v1/terminals/{id}); null on any other payment.

Example:

null

line_items
object[] | null

The order behind amount, as you sent it (or as the checkout session it was paid on had it); null when there was none.

Example:

null

amount_details
object | null

Shipping, tax and discount around line_items; null when none were sent.

Example:

null

us_bank_account
object | null

Set when payment_method_type is us_bank_account.

Example:

null

acss_debit
object | null

Set when payment_method_type is acss_debit.

Example:

null

cancellation_reason
enum<string> | null

Set when status is canceled: requested (canceled on request before the card was presented, through the API or in RevOS), expired (no card was presented within five minutes) or voided (voided before the batch, in RevOS or by a full refund). More values may be added.

Available options:
requested,
expired,
voided
Example:

null