Braintree

App · Payments & Billing · 6 actions

Accept card and digital-wallet payments and automate refunds with Braintree, a PayPal service.

Actions

ActionWhat it does
Create a transactionCharge a payment method (a client-generated nonce or a vaulted token) for a given amount.
Generate a client tokenGenerate a client token used to initialize Braintree's client-side SDKs (Drop-in UI, Hosted Fields, or the mobile SDKs).
Get a transactionLook up one transaction: its status, amount, order ID and customer.
Refund a transactionRefund a settled transaction, in full or in part.
Reverse a transactionCancel a transaction.
Search transactionsSearch recent transactions, optionally filtered by status.

Create a transaction

Charge a payment method (a client-generated nonce or a vaulted token) for a given amount.

Inputs

Payment methodpayment_method_idtextRequired
A single-use payment method nonce or a vaulted payment method token to charge. In the sandbox you can use 'fake-valid-nonce' to simulate a successful card.
AmountamounttextRequired
The amount to charge as a decimal string, for example '10.00'. Use the account's default currency.
Order IDorder_idtext
Your own order or invoice reference (optional).

Outputs

Braintree transaction object with its id, status, amount, and order id.

Example output
{
  "amount": {
    "currencyIsoCode": "USD",
    "value": "10.00"
  },
  "id": "test_txn_id",
  "status": "SUBMITTED_FOR_SETTLEMENT"
}

Generate a client token

Generate a client token used to initialize Braintree's client-side SDKs (Drop-in UI, Hosted Fields, or the mobile SDKs).

Inputs

Merchant account IDmerchant_account_idtext
Scope the token to a specific merchant account, for example a non-default currency (optional).

Outputs

Object with a 'clientToken' string to hand to a Braintree client SDK.

Example output
{
  "clientToken": "test_client_token_value"
}

Get a transaction

Look up one transaction: its status, amount, order ID and customer.

Inputs

Transaction IDtransaction_idtextRequired
The transaction's ID, from Search transactions or the New transaction trigger, or the short ID the Control Panel shows.

Outputs

amounttext
The amount, such as 10.00
created_attext
When it was made
currencytext
The currency, such as USD
customer_companytext
The customer's company, if known
customer_emailtext
The customer's email, if known
customer_first_nametext
The customer's first name, if known
customer_idtext
The vaulted customer it belongs to, if any
customer_last_nametext
The customer's last name, if known
idtext
The transaction's ID, for the refund and reverse steps
legacy_idtext
The short ID the Control Panel shows
merchant_account_idtext
The merchant account it was made in
order_idtext
Your own order or invoice reference, if one was given
statustext
Its status, such as SUBMITTED_FOR_SETTLEMENT, SETTLED, VOIDED or PROCESSOR_DECLINED
Example output
{
  "amount": "10.00",
  "created_at": "2026-11-06T18:22:03.000000Z",
  "currency": "USD",
  "customer_company": "",
  "customer_email": "",
  "customer_first_name": "",
  "customer_id": "",
  "customer_last_name": "",
  "id": "dHJhbnNhY3Rpb25fa3ZyOHhrejI",
  "legacy_id": "kvr8xkz2",
  "merchant_account_id": "acme_usd",
  "order_id": "ORDER-1001",
  "status": "SETTLED"
}

Refund a transaction

Refund a settled transaction, in full or in part. Use Reverse a transaction instead if it has not settled yet.

Inputs

Transaction IDtransaction_idtextRequired
The ID of the settled transaction to refund.
Amountamounttext
The amount to refund as a decimal string, for example '5.00'. Leave blank to refund the full amount.

Outputs

Braintree refund object with its id, status, and amount.

Example output
{
  "amount": {
    "currencyIsoCode": "USD",
    "value": "5.00"
  },
  "id": "test_refund_id",
  "status": "SUBMITTED_FOR_SETTLEMENT"
}

Reverse a transaction

Cancel a transaction. Braintree voids it if it has not settled yet, or refunds it in full if it already has.

Inputs

Transaction IDtransaction_idtextRequired
The ID of the transaction to reverse.

Outputs

Braintree reversal object: either the voided transaction or a refund, distinguished by its __typename.

Example output
{
  "__typename": "Transaction",
  "amount": {
    "currencyIsoCode": "USD",
    "value": "10.00"
  },
  "id": "test_txn_id",
  "status": "VOIDED"
}

Search transactions

Search recent transactions, optionally filtered by status.

Inputs

Statusstatustext
Filter by transaction status, for example 'SETTLED', 'SUBMITTED_FOR_SETTLEMENT', 'VOIDED', or 'PROCESSOR_DECLINED'. Leave blank to return the most recent transactions of any status.
Maximum resultsfirstnumber
Maximum transactions to return (Braintree caps a page at 50).From 1 to 50. Default: 20.

Outputs

Array of Braintree transaction objects.

Example output
[
  {
    "amount": {
      "currencyIsoCode": "USD",
      "value": "10.00"
    },
    "id": "test_txn_id",
    "status": "SETTLED"
  }
]

On this page