Skip to main content
POST
Authorize a Braintree transaction

Path Parameters

cart_token
string
required

Opaque cart token returned by the create-cart response. It scopes the request to a single cart and is the credential for these endpoints — cart-token authentication carried in the path, with no bearer token or API key.

Body

application/json
payment_method_nonce
string
required

Nonce from the Braintree JS SDK.

payment_account_id
string
required

Braintree PaymentAccount UUID.

device_data
string

Braintree Data Collector fraud fingerprint.

payment_type
string

The only value ever honored is braintree_paypal_pay_later, and only when the authorization is a PayPal account with no subscription in the cart; any other value is ignored and the type is taken from gateway detection instead.

payer_email
string
shipping_address
object
expected_total
string

The cart total the client showed the shopper, as a decimal string in the cart currency's major unit ("141.74"). Requires expected_currency.

Required while the company's quote-failure policy is enabled: omitting it, or sending it malformed, answers 422 with an expected_total or expected_currency error before the cart is repriced and before any provider call. When it no longer matches the cart, the response is 409 with meta.code = cart_total_changed and nothing is charged; retry with the total in meta.cart. Optional, and ignored, otherwise.

Pattern: ^\d{1,12}(\.\d{1,5})?$
Example:

"141.74"

expected_currency
string

ISO 4217 code of the currency the shopper was shown. Requires expected_total.

Response

Transaction authorized

Success body for a Braintree authorization.

transaction_id
string
required

Braintree transaction id for the authorized charge; the vault context is stored on the cart and the PaymentMethod is created later via the payment_method endpoint.

payment_type
string
required

Detected payment type (e.g. braintree_paypal, venmo).

meta
object
required

Standard response metadata included on every response.