---
# System prepended metadata

title: Braintree AXO Integration

---


# Braintree AXO Integration

### Add Script Tag
```
<script src="https://js.braintreegateway.com/web/axo/1.0.0/js/axo.min.js"></script>
```

### Initialize SDK and Containers
```
<div id="identity-container"></div>

// Cart UI ...

<div id="shipping-container"></div>

<div id="payment-container"></div>

// Checkout Button ...

braintree.axoSession.create({
  authorization: 'CLIENT_AUTHORIZATION',
  identity: {
    container: '#identity-container',
    email: {EMAIL_ON_FILE}
  },
  shippingOptions: {
    container: '#shipping-container',
    prefilledAddress: {ADDRESS_ON_FILE}
  },
  paymentOptions: {
    container: '#payment-container',
    flow: vault
  }
}, function (err, axoSessionInstance) {

    axoSessionInstance.on('identitySessionStarted', function(e, payload) {
      alert('identitySessionStarted changed!');
    })

    axoSessionInstance.on('shippingAddressChange', function(e, payload) {
      alert('shippingAddressChange changed!');
    })
    
    axoSessionInstance.on('paymentVerified', function(e, payload) {
      alert('paymentVerified changed!');
      // Submit payload.nonce to your server
    })

});
```