Amex Express Checkout Guide

Accept payments via Amex Express Checkout without modifying your existing Stripe integration. If you need help after reading this, check out our answers to common questions or chat live with other developers in #stripe on freenode.

American Express cardholders can use their online account details to pay using the Amex Express Checkout button on your site. It's both secure and convenient for the customer as no card details are provided.

If you have an American Express account, you can try out the flow by clicking the button below (you won't be charged).

American Express creates a card token that is linked to the customer's card and works with your existing Stripe integration to create a charge. This token also contains the customer's information—such as their name, billing address, email, and phone number.

Integrating the Amex Express Checkout button

To get started, first generate your Amex Express Checkout client ID in the Dashboard. After obtaining this, load the helper library from American Express on your checkout page:

<script src=""></script>

Before the checkout button can be displayed, it needs to be configured using an amex:init tag. This tag must be placed within your checkout page before the helper library is loaded:

<amex:init client_id="CLIENT_ID" env="production" callback="aecCallbackHandler"/>

The amex:init tag requires the following parameters:

Parameter Description
client_id Your Amex Express Checkout client ID
env The environment that the checkout button uses (production or qa). Default is production
callback A function that handles the JSON object returned by Amex Express Checkout

An example callback function you can use when accepting payments using Amex Express Checkout:

function aecCallbackHandler(response) {
  // Get the token ID:
  var token = response.token;
  if (response.token) {
    // Insert the token ID into the form so it is submitted to the server:
    $form.append($('<input type="hidden" name="stripeToken">').val(token));
  // Submit the form:

The string response.token represents the ID of a token. You can refer to the Stripe.js for further information on using a callback function.

The amex:init tag also accepts some configuration options to change the appearance of the button:

Option Description
theme The button theme (desktop or mobile). Default is desktop.
button_color The color of the checkout button (dark or light). Default is dark.

Embedding and customizing the button

When you load the American Express JavaScript library, it will insert the button into the DIV with an ID amex-express-checkout. Place this HTML where you want the button to appear.

<div id="amex-express-checkout"></div>

The button is only shown if the customer’s browser is supported. Amex Express Checkout supports all recent desktop and mobile browsers.

The card token

The token created by Amex Express Checkout is used in the same way as other tokens. It can be charged or attached to a Customer for repeated charging. An example card token is:

  "id": "tok_6gpp55Fir1Ca8u",
  "livemode": true,
  "created": 1438056436,
  "used": false,
  "object": "token",
  "type": "card",
  "card": {
    "id": "card_6gpqVeoHsV3beV",
    "object": "card",
    "last4": "1234",
    "brand": "American Express",
    "funding": "credit",
    "exp_month": 7,
    "exp_year": 2018,
    "fingerprint": "5q9AI2LPS47YQtLX",
    "country": "US",
    "name": "CHRISTINE ROBERTS",
    "address_line1": "1 DR. CARLTON B. GOODLETT PLACE",
    "address_line2": "",
    "address_city": "SAN FRANCISCO",
    "address_state": "CA",
    "address_zip": "94110",
    "address_country": "US",
    "cvc_check": null,
    "address_line1_check": "unchecked",
    "address_zip_check": "unchecked",
    "tokenization_method": "amex_express_checkout",
    "metadata": {
      "phone": "5555551212",
  "email": "",
  "client_ip": "",
  "usage": null

American Express provides the name and billing address of the customer. The customer’s first name will be truncated to ten characters if it is longer than that. The customer’s email address and phone number are also provided, if available.

Testing Amex Express Checkout

You can test the Amex Express Checkout flow using the following amex:init tag:

<amex:init client_id="799a098b-b65c-47dc-abb3-d9832bfc7227" env="qa" callback="aecCallbackHandler"/>

Because you are not currently logged in to Stripe, this test mode client ID is not specific to your account so you won’t be able to fetch the tokens created with it. If you log in and reload this page, you’ll see a test mode client ID associated to your Stripe account.

When testing Amex Express Checkout with a test mode client ID, you can use the following American Express QA credentials to perform a test transaction:

  • Username: test_user
  • Password: password
  • One-time access code: 123456