POST
/
transactions
/
{transaction_id}
/
capture

This endpoint requires the transactions.write scope.

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

transaction_id
string
required

The ID for the transaction to get the information for.

Body

application/json

A request to capture a transaction.

amount
integer

The monetary amount to capture an authorization for, in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99.

When omitted blank, this will capture the entire amount.

Required range: 1 < x < 99999999
airline
object

The airline addendum data which describes the airline booking associated with this transaction. When provided, this will override any airline data provided when authorizing the transaction. Only the data on this request will be passed to the payment service, and none of the original data will be sent or kept.

Response

200 - application/json

A transaction record.

type
enum<string>

The type of this resource. Is always transaction.

Available options:
transaction
id
string

The unique identifier for this transaction.

amount
integer

The total amount for this transaction across all funding sources including gift cards.

Required range: 0 < x < 99999999
additional_identifiers
object

A list of additional identifiers that we may keep track of to manage this transaction. This may include the authorization ID, capture ID, and processor ID, as well as an undefined list of additional identifiers.

auth_response_code
string | null

This is the response description received from the processor.

authorized_amount
integer

The amount for this transaction that has been authorized for the payment_method. This can be less than the amount if gift cards were used.

Required range: 0 < x < 99999999
authorized_at
string | null

The date and time when this transaction was authorized in the payment service.

Don't use this field to determine whether the transaction was authorized. A null value doesn't necessarily imply that the transaction wasn't authorized, it can mean that the payment service doesn't provide this value, that it didn't provide it at the time the transaction was authorized or that the transaction was authorized before the introduction of this field.

approval_expires_at
string | null

The date and time when this transaction will be marked as failed if it does not successfully gets captured, authorized or otherwise approved before.

avs_response_code
enum<string> | null

The response code received from the payment service for the Address Verification Check (AVS). This code is mapped to a standardized Gr4vy AVS response code.

  • no_match - neither address or postal code match
  • match - both address and postal code match
  • partial_match_address - address matches but postal code does not
  • partial_match_postcode - postal code matches but address does not
  • unavailable - AVS is unavailable for card/country

The value of this field can be null if the payment service did not provide a response.

Available options:
no_match,
match,
partial_match_address,
partial_match_postcode,
unavailable
buyer
object

The buyer used for this transaction.

captured_amount
integer

The captured amount for this transaction. This can be the full value of the authorized_amount or less.

Required range: 0 < x < 99999999
captured_at
string | null

The date and time when this transaction was captured in the payment service.

Don't use this field to determine whether the transaction was captured. A null value doesn't necessarily imply that the transaction wasn't captured, it can mean that the payment service doesn't provide this value, that it didn't provide it at the time the transaction was captured or that the transaction was captured before the introduction of this field.

cart_items
object[]

An array of cart items that represents the line items of a transaction.

checkout_session_id
string | null

The identifier for the checkout session this transaction is associated with.

country
string | null

The 2-letter ISO code of the country of the transaction. This is used to filter the payment services that is used to process the transaction.

created_at
string

The date and time when this transaction was created in our system.

currency
string

The currency code for this transaction.

cvv_response_code
enum<string> | null

The response code received from the payment service for the Card Verification Value (CVV). This code is mapped to a standardized Gr4vy CVV response code.

  • no_match - the CVV does not match the expected value
  • match - the CVV matches the expected value
  • unavailable - CVV check unavailable for card our country
  • not_provided - CVV not provided

The value of this field can be null if the payment service did not provide a response.

Available options:
no_match,
match,
unavailable,
not_provided
error_code
string | null

This is an error code set by Gr4vy.

external_identifier
string | null

An external identifier that can be used to match the transaction against your own records.

gift_card_service
object

The gift card service used for this transaction.

gift_card_redemptions
object[]

The gift cards redeemed for this transaction.

instrument_type
enum<string> | null

The name of the instrument used to process the transaction.

Available options:
applepay,
card_token,
googlepay,
network_token,
pan,
redirect,
redirect_token
intent
enum<string>

The original intent used when the transaction was created.

Available options:
authorize,
capture
intent_outcome
enum<string>

The outcome of the original intent of a transaction.

This allows you to understand if the intent of the transaction (e.g. capture or authorize) has been achieved when dealing with multiple payment instruments.

If all payment instruments (payment_method and/or gift_cards) have succeeded to get an authorization or direct sale at any point in time then this will return a succeeded value.

If any of the payment instruments fails or declines then this will return a failed value.

If any payment instruments is still in a pending or processing state then the result will be pending.

Please note that if any of the payment instruments are voided or refunded after the result reaches a succeeded state then the result will remain unchanged.

Available options:
pending,
succeeded,
failed
is_subsequent_payment
boolean
default: false

Indicates whether the transaction represents a subsequent payment coming from a setup recurring payment. Please note there are some restrictions on how this flag may be used.

The flag can only be false (or not set) when the transaction meets one of the following criteria:

  • It is not merchant_initiated.
  • payment_source is set to card_on_file.

The flag can only be set to true when the transaction meets one of the following criteria:

  • It is not merchant_initiated.
  • payment_source is set to recurring or installment and merchant_initiated is set to true.
  • payment_source is set to card_on_file.
merchant_account_id
string

The ID of the merchant account to which this transaction belongs to.

merchant_initiated
boolean
default: false

Indicates whether the transaction was initiated by the merchant (true) or customer (false).

metadata
object

Additional information about the transaction stored as key-value pairs.

method
enum<string> | null
Available options:
afterpay,
alipay,
alipayhk,
applepay,
bacs,
bancontact,
banked,
becs,
bitpay,
boleto,
boost,
card,
cashapp,
chaseorbital,
checkout-session,
clearpay,
click-to-pay,
dana,
dcb,
dlocal,
ebanx,
efecty,
eps,
everydaypay,
gcash,
gift-card,
giropay,
givingblock,
gocardless,
googlepay,
googlepay_pan_only,
gopay,
grabpay,
id,
ideal,
kakaopay,
kcp,
klarna,
laybuy,
linepay,
linkaja,
maybankqrpay,
mercadopago,
multibanco,
multipago,
netbanking,
network-token,
oney_3x,
oney_4x,
oney_6x,
oney_10x,
oney_12x,
ovo,
oxxo,
payid,
paymaya,
paypal,
paypalpaylater,
payto,
venmo,
pix,
pse,
rabbitlinepay,
razorpay,
scalapay,
sepa,
shopeepay,
singteldash,
smartpay,
sofort,
spei,
stripedd,
thaiqr,
touchngo,
truemoney,
trustly,
trustlyeurope,
upi,
vipps,
waave,
webpay,
wechat,
zippay
multi_tender
boolean

Defines if this transaction has been split across multiple payment instruments such as a payment_method and one or more gift_cards, or multiple gift_cards without a payment_method.

payment_method
object

The payment method used for this transaction.

payment_service
object

The payment service used for this transaction.

payment_service_transaction_id
string

The payment service's unique ID for the transaction.

payment_source
enum<string>

The source of the transaction. Defaults to ecommerce.

Available options:
ecommerce,
moto,
recurring,
installment,
card_on_file
pending_review
boolean

Whether a manual review is pending.

raw_response_code
string | null

This is the response code received from the payment service. This can be set to any value and is not standardized across different payment services.

raw_response_description
string | null

This is the response description received from the payment service. This can be set to any value and is not standardized across different payment services.

reconciliation_id
string

The base62 encoded transaction ID. This represents a shorter version of this transaction's id which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's transaction against our system.

This ID is sent instead of the transaction ID because not all services support 36 digit identifiers.

refunded_amount
integer

The refunded amount for this transaction. This can be the full value of the captured_amount or less.

Required range: 0 < x < 99999999
scheme_transaction_id
string | null

An identifier for the transaction used by the scheme itself, when available.

e.g. the Visa Transaction Identifier, or Mastercard Trace ID.

shipping_details
object

The shipping details associated with the transaction.

statement_descriptor
object

The statement descriptor is the text to be shown on the buyer's statements.

The specific usage of these fields will depend on the capabilities of the underlying PSP and bank. As a typical example, 'name' and 'description' could be concatenated using '* ' as a separator, and then the resulting descriptor would be truncated to 22 characters by the issuing bank.

status
enum<string>

The status of the transaction for the payment_method. The status may change over time as asynchronous processing events occur.

Please note that the possible statuses returned will depend on the operation performed. For example, a captured transaction will never move to a authorization_voided status.

Available options:
processing,
buyer_approval_pending,
authorization_succeeded,
authorization_failed,
authorization_declined,
capture_pending,
capture_succeeded,
authorization_void_pending,
authorization_voided
three_d_secure
object

The 3-D Secure data that was sent to the payment service for the transaction.

airline
object

Contains information about an airline travel, if applicable.

updated_at
string

Defines when the transaction was last updated.

voided_at
string | null

The date and time when this transaction was voided in the payment service.

Don't use this field to determine whether the transaction was voided. A null value doesn't necessarily imply that the transaction wasn't voided, it can mean that the payment service doesn't provide this value, that it didn't provide it at the time the transaction was voided or that the transaction was voided before the introduction of this field.

settled_currency
string | null

The currency of this transaction's settlement in ISO 4217 three-letter code format.

settled_amount
integer

The net amount settled for this transaction.

settled
boolean

Indicates whether this transaction has been settled.