# Braintree Payments

## Retrieve the Braintree token

 - [GET /blaize/payment/braintree/token](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/getbraintreetoken.md): Issues a Braintree client token for the current blaize session.
This holds the user's userId if the user has an authenticated session.
This token can be used to request a payment once.

## Create a subscription charged callback

 - [POST /blaize/payment/braintree/subscriptionChargedCallback](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/createsubscriptionchargedcallback.md): This endpoint generates a callback for subscription charges when a product purchase is created, regardless of success or failure. It requires a mandatory string payload containing the bt_signature  and bt_payload parameters.  To use subscriptions, configure the Braintree callback to direct to this endpoint.

## List the Braintree subscriptions of a user

 - [GET /blaize/payment/braintree/subscriptions](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/listuserbraintreesubscriptions.md): Lists all Braintree subscriptions for the logged-in user.

## Update the Braintree subscription

 - [PATCH /blaize/payment/braintree/subscriptions/{subscriptionId}](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/updatebraintreesubscription.md): Updates a Braintree subscription by ID.
This operation currently only supports updating the payment method for a subscription, sending the payment method token or nonce.

## Cancel the Braintree subscription

 - [DELETE /blaize/payment/braintree/subscriptions/{subscriptionId}](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/cancelbraintreesubscription.md): Cancels a Braintree subscription by ID.

## Create a Braintree buy (one-off)

 - [POST /blaize/payment/braintree/buy](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/createbraintreebuyoneoff.md): Uses the payment info captured by the braintree drop-in UI and encoded in the payment nonce to create a braintree customer and issue a one-off payment.
When braintree responds successfully, the logged-in user will be granted all entitlements in the product's associated bundle.

## List Braintree payment methods

 - [GET /zephr/payment/braintree/payment-methods](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/listbraintreeuserpaymentmethods.md): Lists the Braintree payment method details associated with the logged-in user.

## Create a new Braintree payment method.

 - [POST /zephr/payment/braintree/payment-methods](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/createbraintreeuserpaymentmethod.md): Creates the Braintree payment method with the associated vaulted nonce, for the authenticated user.

## Update a Braintree payment method

 - [PATCH /zephr/payment/braintree/payment-methods/{paymentMethodToken}](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/updateuserbraintreepaymentmethod.md): Updates the Braintree payment method details associated with the logged-in user.
The details to update must first be captured from Braintree in a nonce and vaulted.

## Delete the Braintree payment method

 - [DELETE /zephr/payment/braintree/payment-methods/{paymentMethodToken}](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/deleteuserbraintreepaymentmethod.md): Deletes the Braintree payment method associated with the provided token.

## Set the default Braintree payment method

 - [PUT /zephr/payment/braintree/default-payment-method](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/setuserdefaultbraintreepaymentmethod.md): Sets the Braintree default payment method for the logged-in user.
This must be a valid payment method already associated with the user.

## List all Braintree plans

 - [GET /zephr/payment/braintree/plans](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/listbraintreeplans.md): Lists the plans associated with the identified product.
The product ID is required.

## Get a Braintree Promo Code

 - [GET /blaize/payment/braintree/promo-code](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/getbraintreepromocode.md): Gets a Braintree promo code.

## List Braintree add-ons

 - [GET /blaize/payment/braintree/addons&promoCode={promoCode}](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/listbraintreeaddons.md): Lists the Braintree add-ons.

## Start the Braintree subscription (Deprecated)

 - [POST /blaize/payment/braintree/subscribe](https://developer.zuora.com/zephr-api-reference/zephr-public-api/braintree-payments/startbraintreesubscriptiondeprecated.md): (Deprecated - use the "/zephr/subscribe" operation intead)
Uses the payment info captured by the braintree drop-in UI and encoded in the payment nonce to create a braintree customer in with a recurring payment.
When braintree responds successfully, the logged-in user will be temporarily granted all entitlements in the product's associated bundle.

