openapi: 3.1.0 info: title: Braintree Payments API description: >- The Braintree Payments API is the core server-side interface for accepting and processing payments through Braintree's gateway. It enables developers to create and manage transactions, handle authorizations and captures, and process refunds and voids. The API supports a wide range of payment methods including credit and debit cards, PayPal, Apple Pay, Google Pay, and Venmo. Authentication uses HTTP Basic auth with the merchant's public key as the username and private key as the password. All requests and responses use XML or JSON depending on the SDK and endpoint variant used. version: '1.0' contact: name: Braintree Developer Support url: https://developer.paypal.com/braintree/docs/ termsOfService: https://www.braintreepayments.com/legal externalDocs: description: Braintree Payments API Reference url: https://developer.paypal.com/braintree/docs/guides/overview servers: - url: https://api.braintreegateway.com/merchants/{merchantId} description: Production Server variables: merchantId: description: The unique identifier for the merchant account. default: your_merchant_id - url: https://api.sandbox.braintreegateway.com/merchants/{merchantId} description: Sandbox Server variables: merchantId: description: The unique identifier for the sandbox merchant account. default: your_merchant_id tags: - name: Client Tokens description: >- Operations for generating client tokens used to initialize Braintree client SDKs on web and mobile. - name: Customers description: >- Operations for creating, retrieving, updating, and deleting customer records in the Braintree Vault. - name: Disputes description: >- Operations for retrieving and managing payment disputes and chargebacks. - name: Payment Methods description: >- Operations for creating, retrieving, updating, and deleting vaulted payment methods associated with customers. - name: Transactions description: >- Operations for creating, capturing, voiding, refunding, and retrieving payment transactions. security: - basicAuth: [] paths: /transactions: post: operationId: createTransaction summary: Create a transaction description: >- Creates a new payment transaction (sale) through the Braintree gateway. Requires either a payment_method_nonce for a one-time payment method, a payment_method_token referencing a vaulted payment method, or a customer_id to use the customer's default vaulted payment method. The amount must be a positive decimal value matching the currency format. Optionally submit the transaction immediately for settlement or hold it in an authorized state for later capture. tags: - Transactions requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TransactionRequest' responses: '201': description: Transaction created successfully. content: application/json: schema: $ref: '#/components/schemas/Transaction' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /transactions/{transactionId}: get: operationId: getTransaction summary: Get a transaction description: >- Retrieves the full details of a specific transaction by its unique identifier. Returns the complete transaction object including current status, payment method details, billing and shipping addresses, descriptor information, and any associated disbursement data. tags: - Transactions parameters: - $ref: '#/components/parameters/TransactionId' responses: '200': description: Transaction retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/Transaction' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /transactions/{transactionId}/submit_for_settlement: put: operationId: submitTransactionForSettlement summary: Submit transaction for settlement description: >- Submits a previously authorized transaction for settlement, initiating the transfer of funds to the merchant. An optional amount may be specified for partial settlement if less than the full authorized amount is desired. The transaction must be in the authorized state to be eligible for settlement submission. tags: - Transactions parameters: - $ref: '#/components/parameters/TransactionId' requestBody: required: false content: application/json: schema: type: object properties: amount: type: string description: >- Amount to submit for settlement. If omitted, the full authorized amount is submitted. Must be less than or equal to the authorized amount. example: '10.00' responses: '200': description: Transaction submitted for settlement successfully. content: application/json: schema: $ref: '#/components/schemas/Transaction' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /transactions/{transactionId}/void: put: operationId: voidTransaction summary: Void a transaction description: >- Voids an authorized or submitted-for-settlement transaction, preventing it from being settled. Voiding cancels the payment before funds are transferred. A transaction can only be voided if it is in the authorized, submitted_for_settlement, or settlement_pending status. Once voided, a transaction cannot be captured or refunded. tags: - Transactions parameters: - $ref: '#/components/parameters/TransactionId' responses: '200': description: Transaction voided successfully. content: application/json: schema: $ref: '#/components/schemas/Transaction' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /transactions/{transactionId}/refund: post: operationId: refundTransaction summary: Refund a transaction description: >- Issues a full or partial refund on a settled transaction. Partial refunds may be issued multiple times until the cumulative refunded amount equals the settled amount. A new transaction of type "credit" is created representing the refund. The original transaction must be in a settled or settling status to be eligible for refund. tags: - Transactions parameters: - $ref: '#/components/parameters/TransactionId' requestBody: required: false content: application/json: schema: type: object properties: amount: type: string description: >- Amount to refund. If omitted, the full settled amount is refunded. Must be a positive decimal value less than or equal to the settled amount. example: '5.00' order_id: type: string description: >- An order identifier to associate with this refund transaction for merchant reference. maxLength: 255 responses: '201': description: Refund transaction created successfully. content: application/json: schema: $ref: '#/components/schemas/Transaction' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /client_token: post: operationId: generateClientToken summary: Generate a client token description: >- Generates a time-limited client token used to initialize the Braintree client-side SDK on web or mobile. The client token contains all authorization and configuration information the client SDK needs to communicate with Braintree. An optional customer_id may be provided to include that customer's vaulted payment methods in the Drop-in UI or to facilitate returning customer flows. tags: - Client Tokens requestBody: required: false content: application/json: schema: type: object properties: customer_id: type: string description: >- Existing customer identifier to include the customer's vaulted payment methods in the generated token. Enables returning customer payment selection flows. maxLength: 36 merchant_account_id: type: string description: >- The merchant account to use when generating this token. If omitted, the default merchant account is used. version: type: integer description: >- The version of the client token format. Defaults to 2. enum: [1, 2] default: 2 responses: '201': description: Client token generated successfully. content: application/json: schema: type: object properties: client_token: type: string description: >- A Base64-encoded client token string used to initialize the Braintree client SDK. '401': $ref: '#/components/responses/Unauthorized' /customers: post: operationId: createCustomer summary: Create a customer description: >- Creates a new customer record in the Braintree Vault. A customer record can optionally include a payment method nonce to simultaneously vault a payment method for the customer. No fields are strictly required; a blank customer may be created and updated later. Customer records serve as containers for vaulted payment methods and associated transaction history. tags: - Customers requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/CustomerRequest' responses: '201': description: Customer created successfully. content: application/json: schema: $ref: '#/components/schemas/Customer' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /customers/{customerId}: get: operationId: getCustomer summary: Get a customer description: >- Retrieves a customer record from the Braintree Vault by its unique identifier. Returns the customer's profile information and all associated vaulted payment methods, billing addresses, and transaction history summary. tags: - Customers parameters: - $ref: '#/components/parameters/CustomerId' responses: '200': description: Customer retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/Customer' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateCustomer summary: Update a customer description: >- Updates an existing customer record in the Braintree Vault. Only fields provided in the request body are updated; omitted fields retain their current values. A new payment method nonce may be provided to add an additional payment method to the customer's vault. tags: - Customers parameters: - $ref: '#/components/parameters/CustomerId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerRequest' responses: '200': description: Customer updated successfully. content: application/json: schema: $ref: '#/components/schemas/Customer' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteCustomer summary: Delete a customer description: >- Permanently deletes a customer record from the Braintree Vault along with all associated payment methods and addresses. This action is irreversible. Historical transaction records associated with the customer remain accessible but the customer profile is removed. tags: - Customers parameters: - $ref: '#/components/parameters/CustomerId' responses: '200': description: Customer deleted successfully. '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /payment_methods: post: operationId: createPaymentMethod summary: Create a payment method description: >- Creates a new vaulted payment method for an existing customer using a payment method nonce obtained from the Braintree client SDK. The nonce is consumed and the underlying payment details are stored securely in the Braintree Vault. Returns a payment method object with a token that can be used for future transactions without requiring the customer to re-enter payment details. tags: - Payment Methods requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PaymentMethodRequest' responses: '201': description: Payment method created and vaulted successfully. content: application/json: schema: $ref: '#/components/schemas/PaymentMethod' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /payment_methods/any/{paymentMethodToken}: get: operationId: getPaymentMethod summary: Get a payment method description: >- Retrieves a vaulted payment method by its unique token. Returns the payment method details including type, masked card number or account details, expiration information, and the customer it is associated with. The token uniquely identifies the payment method across all types. tags: - Payment Methods parameters: - $ref: '#/components/parameters/PaymentMethodToken' responses: '200': description: Payment method retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/PaymentMethod' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updatePaymentMethod summary: Update a payment method description: >- Updates an existing vaulted payment method. Supports updating billing address details, cardholder name, and other mutable fields. A new payment method nonce may be provided to replace the underlying payment details while preserving the existing token value. tags: - Payment Methods parameters: - $ref: '#/components/parameters/PaymentMethodToken' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PaymentMethodUpdateRequest' responses: '200': description: Payment method updated successfully. content: application/json: schema: $ref: '#/components/schemas/PaymentMethod' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deletePaymentMethod summary: Delete a payment method description: >- Permanently removes a vaulted payment method from the Braintree Vault. The associated customer record is retained but the payment method token is invalidated. Active subscriptions using this payment method token will fail on the next billing cycle unless updated to use a different payment method. tags: - Payment Methods parameters: - $ref: '#/components/parameters/PaymentMethodToken' responses: '200': description: Payment method deleted successfully. '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /disputes: get: operationId: listDisputes summary: List disputes description: >- Returns a list of disputes for the merchant account, optionally filtered by dispute status, received date range, amount range, or reason. Disputes represent chargebacks or retrievals initiated by cardholders or their issuing banks. Each dispute includes the associated transaction, amounts, deadlines, and current status. tags: - Disputes parameters: - name: status in: query required: false description: Filter disputes by current status. schema: type: string enum: - open - lost - won - accepted - disputed - expired - name: received_date in: query required: false description: >- Filter disputes received on or after this date in YYYY-MM-DD format. schema: type: string format: date - name: page in: query required: false description: Page number for paginated results, starting at 1. schema: type: integer minimum: 1 default: 1 responses: '200': description: List of disputes retrieved successfully. content: application/json: schema: type: object properties: disputes: type: array items: $ref: '#/components/schemas/Dispute' total_items: type: integer description: Total number of disputes matching the query filters. total_pages: type: integer description: Total number of pages of dispute results. '401': $ref: '#/components/responses/Unauthorized' /disputes/{disputeId}: get: operationId: getDispute summary: Get a dispute description: >- Retrieves the full details of a specific dispute by its unique identifier. Returns all dispute information including the associated transaction, evidence submitted, status history, amounts, deadlines, and any chargeback reason codes provided by the card network. tags: - Disputes parameters: - $ref: '#/components/parameters/DisputeId' responses: '200': description: Dispute retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/Dispute' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /disputes/{disputeId}/accept: put: operationId: acceptDispute summary: Accept a dispute description: >- Accepts a dispute without contesting it. Accepting a dispute is a final action that acknowledges the chargeback and surrenders the disputed funds to the cardholder. This action cannot be undone. Use this when you agree with the dispute or choose not to contest it. tags: - Disputes parameters: - $ref: '#/components/parameters/DisputeId' responses: '200': description: Dispute accepted successfully. content: application/json: schema: $ref: '#/components/schemas/Dispute' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: securitySchemes: basicAuth: type: http scheme: basic description: >- HTTP Basic Authentication using the merchant's public API key as the username and private API key as the password, Base64-encoded per RFC 7617. parameters: TransactionId: name: transactionId in: path required: true description: The unique identifier of the transaction. schema: type: string CustomerId: name: customerId in: path required: true description: The unique identifier of the customer record. schema: type: string PaymentMethodToken: name: paymentMethodToken in: path required: true description: The unique token identifying the vaulted payment method. schema: type: string DisputeId: name: disputeId in: path required: true description: The unique identifier of the dispute. schema: type: string responses: BadRequest: description: Bad request. The request body or parameters are invalid. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Unauthorized. Authentication credentials are missing or invalid. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Not found. The requested resource does not exist. content: application/json: schema: $ref: '#/components/schemas/Error' UnprocessableEntity: description: >- Unprocessable entity. The request was well-formed but the transaction was declined or failed validation. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: TransactionRequest: type: object description: >- Request body for creating a new payment transaction. Either payment_method_nonce, payment_method_token, or customer_id is required. properties: amount: type: string description: >- The billing amount for the transaction as a decimal string. Must be greater than 0 and match the currency decimal format. example: '10.00' payment_method_nonce: type: string description: >- A one-time-use reference to payment information collected by the Braintree client SDK. Consumed upon transaction creation. payment_method_token: type: string description: >- The token of a vaulted payment method to charge for this transaction. customer_id: type: string description: >- The identifier of a customer whose default vaulted payment method will be used for this transaction. maxLength: 36 order_id: type: string description: >- A merchant-defined order identifier associated with this transaction for reconciliation. maxLength: 255 merchant_account_id: type: string description: >- The identifier of the merchant account to process this transaction. If omitted, the default merchant account is used. device_data: type: string description: >- Customer device data string collected by the Braintree data collector for fraud prevention analysis. descriptor: $ref: '#/components/schemas/Descriptor' billing: $ref: '#/components/schemas/Address' shipping: $ref: '#/components/schemas/Address' options: $ref: '#/components/schemas/TransactionOptions' tax_amount: type: string description: >- The tax amount included in the transaction total for Level 2 and Level 3 processing. example: '1.00' shipping_amount: type: string description: >- The shipping amount included in the transaction total for Level 3 processing. example: '2.00' customer: $ref: '#/components/schemas/CustomerRequest' line_items: type: array description: >- Line items for Level 3 processing. Up to 249 line items may be included. maxItems: 249 items: $ref: '#/components/schemas/LineItem' transaction_source: type: string description: >- Indicates the origin of this transaction for network reporting. enum: - recurring - recurring_first - unscheduled - moto TransactionOptions: type: object description: Configuration options that modify transaction processing behavior. properties: submit_for_settlement: type: boolean description: >- If true, the transaction is automatically submitted for settlement after authorization. Defaults to false. default: false store_in_vault: type: boolean description: >- If true, the payment method is stored in the Braintree Vault after the transaction is created. default: false store_in_vault_on_success: type: boolean description: >- If true, the payment method is stored in the Vault only if the transaction is successfully authorized. default: false skip_avs: type: boolean description: Skip the address verification check for this transaction. default: false skip_cvv: type: boolean description: Skip the CVV verification check for this transaction. default: false hold_in_escrow: type: boolean description: >- If true, funds are held in escrow rather than disbursed immediately. Applicable to Braintree Marketplace transactions only. default: false Transaction: type: object description: >- Represents a payment transaction in the Braintree gateway. A transaction captures the full lifecycle from authorization through settlement, refund, or void. properties: id: type: string description: Unique identifier for the transaction assigned by Braintree. status: type: string description: The current processing status of the transaction. enum: - authorization_expired - authorized - authorizing - settlement_confirmed - settlement_declined - settlement_pending - settled - settling - submitted_for_settlement - voided - processor_declined - failed - gateway_rejected amount: type: string description: The transaction amount as a decimal string. example: '10.00' currency_iso_code: type: string description: ISO 4217 three-letter currency code for the transaction. example: USD type: type: string description: >- The type of transaction. "sale" for a charge, "credit" for a refund. enum: - sale - credit order_id: type: string description: Merchant-provided order identifier associated with this transaction. merchant_account_id: type: string description: The merchant account used to process this transaction. created_at: type: string format: date-time description: Timestamp when the transaction was created, in ISO 8601 format. updated_at: type: string format: date-time description: Timestamp when the transaction was last updated, in ISO 8601 format. payment_method_nonce: type: string description: >- The payment method nonce used for the transaction, if applicable. payment_method_token: type: string description: >- The token of the vaulted payment method used for the transaction, if applicable. customer_id: type: string description: >- The identifier of the customer associated with this transaction, if applicable. billing: $ref: '#/components/schemas/Address' shipping: $ref: '#/components/schemas/Address' customer_details: $ref: '#/components/schemas/Customer' credit_card_details: $ref: '#/components/schemas/CreditCardDetails' descriptor: $ref: '#/components/schemas/Descriptor' refund_ids: type: array description: >- List of transaction identifiers for refund transactions associated with this transaction. items: type: string processor_response_code: type: string description: >- The processor-specific response code returned when the transaction was processed. processor_response_text: type: string description: >- Human-readable text description of the processor response code. tax_amount: type: string description: The tax amount included in this transaction. shipping_amount: type: string description: The shipping amount included in this transaction. CustomerRequest: type: object description: >- Request body for creating or updating a customer record in the Braintree Vault. All fields are optional. properties: id: type: string description: >- Custom customer identifier. If omitted, Braintree generates a unique ID. Alphanumeric, hyphens, and underscores only. maxLength: 36 pattern: '^[a-zA-Z0-9_-]+$' first_name: type: string description: Customer's first name. maxLength: 255 last_name: type: string description: Customer's last name. maxLength: 255 email: type: string format: email description: Customer's email address. ASCII characters only. maxLength: 255 phone: type: string description: Customer's phone number. maxLength: 255 company: type: string description: Customer's company or organization name. maxLength: 255 website: type: string format: uri description: Customer's website URL. Must be a well-formed URL. maxLength: 255 fax: type: string description: Customer's fax number. maxLength: 255 payment_method_nonce: type: string description: >- A one-time nonce representing a payment method to vault for the customer at creation time. custom_fields: type: object description: >- Custom key-value pairs. Keys must be pre-configured in the Braintree Control Panel. additionalProperties: type: string Customer: type: object description: >- Represents a customer record stored in the Braintree Vault. Customers serve as containers for vaulted payment methods and provide a way to associate transaction history with individuals. properties: id: type: string description: Unique identifier for the customer assigned by Braintree. first_name: type: string description: Customer's first name. last_name: type: string description: Customer's last name. email: type: string description: Customer's email address. phone: type: string description: Customer's phone number. company: type: string description: Customer's company or organization name. website: type: string description: Customer's website URL. created_at: type: string format: date-time description: Timestamp when the customer was created, in ISO 8601 format. updated_at: type: string format: date-time description: Timestamp when the customer was last updated, in ISO 8601 format. payment_methods: type: array description: Collection of vaulted payment methods associated with this customer. items: $ref: '#/components/schemas/PaymentMethod' addresses: type: array description: Collection of addresses associated with this customer. items: $ref: '#/components/schemas/Address' custom_fields: type: object description: Custom key-value pairs associated with this customer. additionalProperties: type: string PaymentMethodRequest: type: object required: - customer_id - payment_method_nonce description: >- Request body for vaulting a new payment method for an existing customer. properties: customer_id: type: string description: The identifier of the customer to associate this payment method with. maxLength: 36 payment_method_nonce: type: string description: >- A one-time-use reference to payment information provided by the Braintree client SDK. Consumed upon vaulting. token: type: string description: >- Custom token to assign to this payment method. If omitted, Braintree generates a unique token. maxLength: 36 billing_address: $ref: '#/components/schemas/Address' options: type: object description: Options that modify the payment method vaulting behavior. properties: make_default: type: boolean description: >- If true, this payment method becomes the customer's default payment method. default: false fail_on_duplicate_payment_method: type: boolean description: >- If true, the request fails if a duplicate payment method already exists in the customer's vault. default: false verify_card: type: boolean description: >- If true, runs a card verification before vaulting the payment method. default: false PaymentMethodUpdateRequest: type: object description: >- Request body for updating an existing vaulted payment method. properties: payment_method_nonce: type: string description: >- A new one-time nonce to replace the underlying payment details while preserving the existing token. billing_address: $ref: '#/components/schemas/Address' options: type: object description: Options for the payment method update. properties: make_default: type: boolean description: If true, this payment method becomes the customer's default. update_existing_token: type: string description: >- Token of an existing payment method to update rather than creating a new one. PaymentMethod: type: object description: >- Represents a payment method stored in the Braintree Vault. This is a polymorphic object that may represent a credit card, PayPal account, Venmo account, or other supported payment type. properties: token: type: string description: >- Unique token identifying this vaulted payment method. Used as a reference for future transactions. customer_id: type: string description: The identifier of the customer who owns this payment method. default: type: boolean description: >- Indicates whether this is the customer's default payment method. image_url: type: string format: uri description: URL of an image representing the payment method type. created_at: type: string format: date-time description: Timestamp when this payment method was vaulted, in ISO 8601 format. updated_at: type: string format: date-time description: Timestamp when this payment method was last updated, in ISO 8601 format. CreditCardDetails: type: object description: >- Details of the credit or debit card used in a transaction, with sensitive fields masked. properties: bin: type: string description: First six digits of the card number identifying the issuing bank. pattern: '^\d{6}$' last_4: type: string description: Last four digits of the card number. pattern: '^\d{4}$' card_type: type: string description: >- The card network or type, such as Visa, MasterCard, American Express, or Discover. expiration_month: type: string description: Two-digit expiration month of the card. pattern: '^\d{2}$' expiration_year: type: string description: Four-digit expiration year of the card. pattern: '^\d{4}$' cardholder_name: type: string description: Name of the cardholder as it appears on the card. country_of_issuance: type: string description: Two-letter ISO 3166-1 country code of the card-issuing country. Descriptor: type: object description: >- Dynamic descriptor fields that appear on the customer's bank or credit card statement to identify the merchant and transaction. properties: name: type: string description: >- Merchant name as it appears on the customer's statement. Maximum 22 characters total; name and phone combined must be 22 characters or less with an asterisk separator. maxLength: 22 phone: type: string description: >- Merchant phone number as it appears on the customer's statement. Must be 10–14 digits. maxLength: 14 url: type: string description: >- Merchant URL as it appears on the customer's statement. Maximum 13 characters. maxLength: 13 Address: type: object description: A billing or shipping address associated with a transaction or customer. properties: first_name: type: string description: First name of the address holder. maxLength: 255 last_name: type: string description: Last name of the address holder. maxLength: 255 company: type: string description: Company or organization name at this address. maxLength: 255 street_address: type: string description: Primary street address line. maxLength: 255 extended_address: type: string description: Secondary address line such as apartment or suite number. maxLength: 255 locality: type: string description: City or locality of the address. maxLength: 255 region: type: string description: State, province, or region code of the address. maxLength: 255 postal_code: type: string description: Postal or ZIP code of the address. maxLength: 9 country_code_alpha2: type: string description: Two-letter ISO 3166-1 alpha-2 country code. pattern: '^[A-Z]{2}$' LineItem: type: object description: >- A line item representing a single product or service in a transaction, used for Level 3 processing data. required: - name - quantity - unit_amount - total_amount - kind properties: name: type: string description: Name or description of the product or service. maxLength: 127 description: type: string description: Additional description of the line item. maxLength: 127 kind: type: string description: Whether this item is a debit (charge) or credit (discount). enum: - debit - credit quantity: type: string description: Quantity of the line item as a decimal string. example: '1.0000' unit_amount: type: string description: Unit price of the line item as a decimal string. example: '5.00' total_amount: type: string description: Total amount for this line item (quantity * unit_amount) as a decimal. example: '5.00' unit_of_measure: type: string description: Unit of measure for the quantity, such as "each" or "kg". maxLength: 12 commodity_code: type: string description: Commodity code for Level 3 processing. maxLength: 12 tax_amount: type: string description: Tax amount for this line item as a decimal string. Dispute: type: object description: >- Represents a chargeback or retrieval dispute filed by a cardholder or issuing bank against a Braintree transaction. properties: id: type: string description: Unique identifier for the dispute. amount: type: string description: The disputed amount as a decimal string. currency_iso_code: type: string description: ISO 4217 currency code for the disputed amount. status: type: string description: Current status of the dispute. enum: - open - lost - won - accepted - disputed - expired reason: type: string description: >- The reason code or category provided by the card network for the dispute. received_date: type: string format: date description: Date the dispute was received by Braintree. reply_by_date: type: string format: date description: Deadline date by which the merchant must respond to the dispute. transaction_id: type: string description: >- The identifier of the original transaction that was disputed. created_at: type: string format: date-time description: Timestamp when the dispute was created, in ISO 8601 format. updated_at: type: string format: date-time description: Timestamp when the dispute was last updated, in ISO 8601 format. Error: type: object description: Standard error response returned by the Braintree API. properties: message: type: string description: Human-readable description of the error. errors: type: object description: >- Nested object containing field-level validation errors organized by resource type. additionalProperties: true