Create transaction
Create a new transaction using a supported payment method. If additional buyer authorization is required, an approval URL will be returned. Duplicated gift card numbers are not supported.
transactions.write scope.Authorizations
Headers
Body
The monetary amount for this transaction, in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99. If the intent is set to capture, an amount greater than zero must be supplied. All gift card amounts are subtracted from this amount before the remainder is charged to the provided payment_method.
0 <= x <= 999999991299
The 2-letter ISO code of the country where the transaction is processed. This is also used to filter the payment services that can process the transaction. If this value is provided for redirect requests and it's not null, it must match the one specified for country in payment_method. Otherwise, the value specified for country in payment_method will be assumed implicitly.
^[A-Z]{2}$"US"
Create a transaction with raw card details
- CardWithUrlPaymentMethodCreate
- RedirectPaymentMethodCreate
- TokenPaymentMethodCreate
- ApplePayPaymentMethodCreate
- ClickToPayPaymentMethodCreate
- ClickToPayFPANPaymentMethodCreate
- GooglePayPaymentMethodCreate
- GooglePayFPANPaymentMethodCreate
- PazePaymentMethodCreate
- NetworkTokenPaymentMethodCreate
- PlaidPaymentMethodCreate
- BaseBankPaymentMethodCreate
- CheckoutSessionWithUrlPaymentMethodCreate
The ID of the buyer to associate this payment method to. If this field is provided then the buyer_external_identifier field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
The external_identifier of the buyer to associate this payment method to. If this field is provided then the buyer_id field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field.
1 - 200"buyer-12345"
The optional gift card(s) to use for this transaction. At least one gift card is required if no other payment_method has been added. By default, only a maximum limit of 10 gift cards may be used in a single transaction. Please contact our team to change this limit.
Create a charge against a gift card
- GiftCardTransactionCreate
- GiftCardTokenTransactionCreate
Defines the intent of this API call. This determines the desired initial state of the transaction.
authorize- (Default) Optionally approves and then authorizes a transaction but does not capture the funds.capture- Optionally approves and then authorizes and captures the funds of the transaction.
"authorize"
Whether or not to also try and store the payment method with us so that it can be used again for future use. This is only supported for payment methods that support this feature. There are also a few restrictions on how the flag may be set:
- The flag has to be set to
truewhen thepayment_sourceis set torecurringorinstallment, andmerchant_initiatedis set tofalse. - The flag has to be set to
false(or not set) when using a previously vaulted payment method.
true
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_sourceis set tocard_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_sourceis set torecurringorinstallmentandmerchant_initiatedis set totrue.payment_sourceis set tocard_on_file.
true
A scheme's transaction identifier to use in connecting a merchant initiated transaction to a previous customer initiated transaction. If not provided, and a qualifying customer initiated transaction has been previously made with the stored payment method, then Gr4vy will populate this value with the identifier returned for that transaction. This field is also know as the Visa Transaction Identifier, or Mastercard Trace ID.
1 - 100"123456789012345"
A scheme's transaction link identifier to use in connecting a merchant initiated transaction to a previous customer initiated transaction. If not provided, and a qualifying customer initiated transaction has been previously made with the stored payment method, then Gr4vy will populate this value with the identifier returned for that transaction. This field is also know as the Mastercard Transaction Link ID (TLID).
1 - 100"123456789012345"
The unique identifier of a set of shipping details stored for the buyer. If provided, the created transaction will include a copy of the details at the point of transaction creation; i.e. it will not be affected by later changes to the detail in the database.
"bf8c36ad-02d9-4904-b0f9-a230b149e341"
Allows for passing optional configuration per connection to take advantage of connection specific features. When provided, the data is only passed to the target connection type to prevent sharing configuration across connections. Please note that each of the keys this object are in kebab-case, for example cybersource-anti-fraud as they represent the ID of the connector. All the other keys will be snake case, for example merchant_defined_data or camel case to match an external API that the connector uses.
The date and time when the buyer's approval window for this transaction expires. If not provided, this is automatically computed from the connector's default expiration time. The value cannot exceed the connector's maximum approval window.
"2026-04-01T12:00:00+00:00"
Response
Returns the created transaction.
A full transaction resource.
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.
"default"