| Field | Type | Required | Description | Example |
|---|---|---|---|---|
Amount |
long | ✔️ | 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. |
1299 |
Currency |
string | ✔️ | A supported ISO 4217 currency code. For redirect requests, this value must match the one specified for currency in payment_method. |
Example 1: EUR Example 2: GBP Example 3: USD |
Country |
string | ➖ | 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. |
US |
PaymentMethod |
TransactionCreatePaymentMethod | ➖ | The optional payment method to use for this transaction. This field is required if no gift_cards have been added. |
|
Buyer |
GuestBuyer | ➖ | Guest buyer details provided inline rather than creating a buyer resource beforehand and using the buyer_id or buyer_external_identifier keys. No buyer resource will be created on Gr4vy when used. |
|
BuyerId |
string | ➖ | 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 |
BuyerExternalIdentifier |
string | ➖ | 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. |
buyer-12345 |
GiftCards |
List<GiftCardUnion> | ➖ | 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. |
|
ExternalIdentifier |
string | ➖ | An external identifier that can be used to match the transaction against your own records. | transaction-12345 |
Intent |
string | ➖ | N/A | |
Store |
bool | ➖ | 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 true when the payment_source is set to recurring or installment, and merchant_initiated is set to false.* The flag has to be set to false (or not set) when using a previously vaulted payment method. |
true |
ThreeDSecureData |
ThreeDSecureData | ➖ | Pass through 3-D Secure data to support external 3-D Secure authorisation. If using an external 3-D Secure provider, you should not pass a redirect_url in the payment_method object for a transaction. |
|
ThreeDSecure |
ThreeDSecure | ➖ | Optional 3-D Secure values to use during the authentication flow. | |
Metadata |
Dictionary<String, string> | ➖ | Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it. | { "cohort": "cohort-12345", "order": "order-12345" } |
IsSubsequentPayment |
bool | ➖ | 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. |
true |
MerchantInitiated |
bool | ➖ | Indicates whether the transaction was initiated by the merchant (true) or customer (false). | true |
PaymentSource |
string | ➖ | The way payment method information made it to this transaction. | |
Airline |
Airline | ➖ | The airline addendum data which describes the airline booking associated with this transaction. | |
CartItems |
List<CartItem> | ➖ | An array of cart items that represents the line items of a transaction. | |
StatementDescriptor |
StatementDescriptor | ➖ | Details about the payment and the merchant which may end up on the (bank) statement for the payment. | |
PreviousSchemeTransactionId |
string | ➖ | 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. | 123456789012345 |
BrowserInfo |
BrowserInfo | ➖ | Information about the browser used by the buyer. This can be used by anti-fraud services. | |
ShippingDetailsId |
string | ➖ | 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 |
ConnectionOptions |
TransactionConnectionOptions | ➖ | 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. |
|
AsyncCapture |
bool | ➖ | Whether to capture the transaction asynchronously. - When async_capture is false (default), the transaction is captured in the same request.- When async_capture is true, the transaction is automatically captured at a later time.Redirect transactions are not affected by this flag. This flag can only be set to true when intent is set to capture. |
true |
AntiFraudFingerprint |
string | ➖ | This field represents the fingerprint data to be passed to the active anti-fraud service. | yGeBAFYgFmM= |
PaymentServiceId |
string | ➖ | The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped. | fffd152a-9532-4087-9a4f-de58754210f0 |
AccountFundingTransaction |
bool | ➖ | Marks the transaction as an AFT. Requires the payment service to support this feature, and might recipient and buyer data |
true |
AllowPartialAuthorization |
bool | ➖ | Defines if the transaction will allow for a partial authorization. | |
Recipient |
Recipient | ➖ | The recipient of any account to account funding. For use with AFTs. | |
InstallmentCount |
long | ➖ | The number of installments a buyer is required to make. | |
TaxAmount |
long | ➖ | The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99 |
1299 |
MerchantTaxId |
string | ➖ | Merchant tax ID (for example, EIN or VAT number). | |
PurchaseOrderNumber |
string | ➖ | Invoice number or Purchase Order number. | |
CustomerReferenceNumber |
string | ➖ | Customer code or reference. | |
AmountIncludesTax |
bool | ➖ | Whether the tax is included in the amount. | false |
SupplierOrderNumber |
string | ➖ | The merchant's unique identifier for the sales order or invoice. | |
DutyAmount |
long | ➖ | Total charges for import/export duties. | 1299 |
ShippingAmount |
long | ➖ | Total shipping amount. | 1299 |
IntegrationClient |
string | ➖ | Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance. | web |