Braintree
Resources and tools for developers to integrate Braintree’s global payments platform.
table of contents
Pretext
Yes, PayPal acquired Braintree in September 2013 for approximately $800 million. The acquisition, made while PayPal was part of eBay Inc., was intended to help both companies innovate and grow in the mobile and online payments space. Braintree continues to operate as a separate service within PayPal and includes the popular mobile payment app, Venmo, which Braintree had acquired earlier.
Paypal
- Sandbox - Search Transaction
- Paypal - user login
- Braintree Direct
- How it Works - Diagram
- Setup Guide - Set Up Your Client and Set Up Your Server
- Payment Flow - Vaulted Payments vs. One-Time Payments vs. Recurring Payments
- Set Up Your Server - sale api call (Transaction: Sale) returns a Transaction Result Object (same response for other actions of Transaction)
- Transaction Lifecycle - Braintree Transaction has possible values for status
- Transaction: Refund - transactions that have a status of settled or settling, for others use Transaction: Void instead.
- Voiding settlement - If you submit a transaction for settlement and then decide you actually don’t want to settle it, you can void it before it’s settled. After it’s settled, you’ll need to refund it instead.
- Transaction: Cancel Release - This functionality is specific to Braintree Marketplace merchants.
- This has a master-merchant and sub-merchant
- Payment Methods : PayPal
- Options
- Submit for settlement and then refund on error
- authorize and then either void OR Submit for settlement
- Managing Authorizations with statuses of auth-expired - for businesses that wait to collect funds until they are ready to ship their products
result.isSuccess();
// true
Transaction transaction = result.getTarget();
transaction.getStatus();
// Transaction.Status.AUTHORIZED
Transaction transaction = result.getTarget();
transaction.getPaymentInstrumentType().equals(PaymentInstrumentType.PAYPAL_ACCOUNT);
// false
transaction.getPaymentInstrumentType().equals(PaymentInstrumentType.CREDIT_CARD);
// true
STEPS
- Create Customer
- Create Instrument (save in vault on success)
- Sale without submit for settlement
- Perform your checks
- Submit transaction for settlement