# TransactionInput

Input · GraphQL API

Input fields for creating a transaction.

## Fields

- `amount` (`Amount!`) — required: Billing amount of the request. This value must be greater than 0, and must match the currency format of the merchant account. This can only contain numbers and one decimal point (e.g. x.xx). Can't be greater than the maximum allowed by the processor.
- `merchantAccountId` (`ID`): Merchant account ID used to process the transaction. Currency is also determined by merchant account ID. If no merchant account ID is specified, we will use your default merchant account.
- `orderId` (`String`): Additional information about the transaction. On PayPal transactions, this field maps to the PayPal invoice number. PayPal invoice numbers must be unique in your PayPal business account. Maximum 255 characters or 127 for PayPal transactions.
- `exchangeRateQuoteId` (`ID`): ID of exchange rate quote to be used for the transaction.
- `purchaseOrderNumber` (`String`): A purchase order identification value you associate with this transaction. *Required for Level 2 processing*.
- `riskData` (`RiskDataInput`): Customer device information, which is sent directly to supported processors for fraud analysis.
- `customFields` (`[CustomFieldInput!]`): Collection of custom field/value pairs. You must [set up each custom field in the Control Panel](https://articles.braintreepayments.com/control-panel/custom-fields#creating-a-custom-field) prior to passing it with a request.
- `descriptor` (`TransactionDescriptorInput`): Fields used to define what will appear on a customer's bank statement for a specific purchase.
- `recurring` (`RecurringType`) — deprecated since 2020-07-20: The type of recurring payment this transaction represents.
- `paymentInitiator` (`PaymentInitiator`): The initiator of the payment. Payment can either be merchant-initiated or customer-initiated. If the transaction is an ecommerce transaction initiated by the customer, no value is passed.
- `channel` (`String`): For partners and shopping carts only. If you are a shopping cart provider or other Braintree partner, pass a string identifier for your service. For PayPal transactions, this maps to paypal.bn_code.
- `customerId` (`ID`): If charging a single-use payment method, optional ID of a customer to associate the transaction with. If vaulting the single-use payment method, this customer will be associated with the resulting multi-use payment method.
- `shipping` (`TransactionShippingInput`): Shipping information. *Required for Level 3 processing*.
- `tax` (`TransactionTaxInput`): Tax information about the transaction. *Required for Level 2 processing*.
- `discountAmount` (`String`): Discount amount that was included in the total transaction amount. Does not add to the total amount the payment method will be charged. This value can't be negative. Please note that this field is not used on PayPal transactions. *Required for Level 3 processing*.
- `surchargeAmount` (`String`): Surcharge amount that was included in the total transaction amount. Does not add to the total amount the payment method will be charged. This value can't be negative. *Required for Visa Rent Discount Program*.
- `lineItems` (`[TransactionLineItemInput!]`): Line items for this transaction. Up to 249 line items may be specified. *Required for Level 3 processing*.
- `threeDSecurePassThrough` (`ThreeDSecurePassThroughInput`) — deprecated since 2020-09-28: Results of a merchant-performed 3D Secure authentication. You will only need to use these fields if you've performed your own integration with a 3D Secure MPI provider (e.g. Cardinal Centinel). Otherwise, Braintree's SDKs handle this for you in our standard 3D Secure integration.
- `vaultPaymentMethodAfterTransacting` (`VaultPaymentMethodAfterTransactingInput`): When a single-use payment method is used to create this transaction, it can be automatically stored in the vault after transacting. If this field is left blank, the single-use payment method will not be vaulted.
- `customerDetails` (`TransactionCustomerDetailsInput`): Customer information to be stored on the transaction and used for fraud protection. Use this if you wish to pass customer information on a transaction without creating an independent stored customer record in the vault. This parameter can only be used if you do not pass `customerId`, and if you are not using a vaulted/multi-use payment method. In other words, this field is only valid when the transaction will not be associated with an existing customer. If `vaultPaymentMethodAfterTransacting` is also passed, these values will be used when creating a new customer for the newly-vaulted payment method.
- `processingOverrides` (`TransactionProcessingOverridesInput`): The values provided will take precedence over any similar fields, and will only be used for processing. These values will not update any similar fields and will not be returned in responses.
- `industry` (`TransactionIndustryInput`): Industry data information. Only one of the three sub-input fields can be provided.
- `acceptPartialAuthorization` (`Boolean`): Controls whether to allow partial authorizations (or "partial approvals") for this transaction. Defaults to false.
- `paymentFacilitator` (`PaymentFacilitatorInput`): Details of the Payment Facilitator (mandatory for PayFac Merchants).
- `merchantCategoryCode` (`MerchantCategoryCode`): Merchant Category Code (MCC) used to classify the type of business associated with this transaction. Defaults to merchant account's configured MCC unless explicitly overridden during transaction creation.

## Used by

- [AuthorizeCreditCardInput](/braintree/graphql/reference/types/authorize-credit-card-input) — Input; transaction
- [AuthorizeInStoreCreditCardInput](/braintree/graphql/reference/types/authorize-in-store-credit-card-input) — Input; transaction
- [AuthorizePaymentMethodInput](/braintree/graphql/reference/types/authorize-payment-method-input) — Input; transaction
- [AuthorizePayPalAccountInput](/braintree/graphql/reference/types/authorize-pay-pal-account-input) — Input; transaction
- [AuthorizeVenmoAccountInput](/braintree/graphql/reference/types/authorize-venmo-account-input) — Input; transaction
- [ChargeCreditCardInput](/braintree/graphql/reference/types/charge-credit-card-input) — Input; transaction
- [ChargeInStoreCreditCardInput](/braintree/graphql/reference/types/charge-in-store-credit-card-input) — Input; transaction
- [ChargePaymentMethodInput](/braintree/graphql/reference/types/charge-payment-method-input) — Input; transaction
- [ChargePayPalAccountInput](/braintree/graphql/reference/types/charge-pay-pal-account-input) — Input; transaction
- [ChargeUsBankAccountInput](/braintree/graphql/reference/types/charge-us-bank-account-input) — Input; transaction
- [ChargeVenmoAccountInput](/braintree/graphql/reference/types/charge-venmo-account-input) — Input; transaction
- [CreateOfflineDeclinedTransactionInput](/braintree/graphql/reference/types/create-offline-declined-transaction-input) — Input; transaction

## GraphQL definition

```graphql
input TransactionInput {
  amount: Amount!
  merchantAccountId: ID
  orderId: String
  exchangeRateQuoteId: ID
  purchaseOrderNumber: String
  riskData: RiskDataInput
  customFields: [CustomFieldInput!]
  descriptor: TransactionDescriptorInput
  recurring: RecurringType @deprecated(reason: "This field is included for supporting legacy clients. Please use `paymentInitiator` instead.")
  paymentInitiator: PaymentInitiator
  channel: String
  customerId: ID
  shipping: TransactionShippingInput
  tax: TransactionTaxInput
  discountAmount: String
  surchargeAmount: String
  lineItems: [TransactionLineItemInput!]
  threeDSecurePassThrough: ThreeDSecurePassThroughInput @deprecated(reason: "This field is included for supporting legacy clients. This field is specific to credit card payment methods only, and cannot be applied to transactions with other payment method types. If you need to pass this field, please use `authorizeCreditCard` or `chargeCreditCard`. See the `CreditCardTransactionOptionsInput` type for details.")
  vaultPaymentMethodAfterTransacting: VaultPaymentMethodAfterTransactingInput
  customerDetails: TransactionCustomerDetailsInput
  processingOverrides: TransactionProcessingOverridesInput
  industry: TransactionIndustryInput
  acceptPartialAuthorization: Boolean
  paymentFacilitator: PaymentFacilitatorInput
  merchantCategoryCode: MerchantCategoryCode
}
```

---

[View the complete GraphQL schema on GitHub](https://raw.githubusercontent.com/braintree/graphql-api/refs/heads/master/schema.graphql)