Skip to main content

Wallet Apps


Overview

Use the API features to create an e-wallet app for your customers. You can use your e-wallet to create, update, patch, and delete payment methods and shipping addresses.

Manage Wallet Operations

Use the API features to create an e-wallet app for your customers. You can use your e-wallet to perform these operations:

  • Create a new customer account
  • Add a new shipping address
  • Edit or delete a shipping address
  • Create a new payment instrument
  • Edit or delete a payment method
  • Change the default payment method
  • Add a new payment method address
  • View wallet contents

Create a New Customer Account

  1. Call the POST /tms/v2/customers endpoint to create a new customer in the e-wallet app customer sign-up flow.
  2. The request returns the customer token. Store the customer token with the customer profile information in your database.

Add a New Shipping Address

  1. When you collect the new customer's shipping address, use the customer token from the create customer account step to create a shipping address for that customer.
  2. Call POST /tms/v2/customers/{customerTokenId}/shipping-addresses.

Edit or Delete a Shipping Address

  1. To get all addresses, call: GET /tms/v2/customers/{customerTokenId}/shipping-address.

    The first record is the default.

  2. To add an address, call: POST /tms/v2/customers/{customerTokenId}/shipping-addresses.

    This adds a non-default shipping address. If it is the customer's first address, it becomes the default address.

  3. To edit an address, call: PATCH /tms/v2/customers/{customerTokenId}/shipping-addresses/{shippingAddressTokenId}.

  4. To delete an address, call: DELETE /tms/v2/customers/{customerTokenId}/shipping-addresses/{shippingAddressTokenId}.

  5. To set an address as the default address, call: PATCH /tms/v2/customers/{customerTokenId}/shipping-addresses/{shippingAddressTokenId} and set the value of the request field default to true.

Create a New Payment Instrument with the Payments API

  1. Use the payments API in your e-wallet app to store the customer's payment method information in a payment instrument.

    Use the payment instrument you created in the call from the create payment instrument step to create a new payment method.

  2. Call: POST /pts/v2/payments and pass the instrument identifier token, card type, and expiration date in the request.

    If this is the first payment method, it becomes the customer's default.

  3. Store the card expiration date and last 4 digits with the customer profile information in your database.

Edit or Delete a Payment Method

  1. Use the API in your e-wallet app to retrieve a customer's payment method and allow the customer to delete or edit the payment method.

    To retrieve the customer's default payment method, call: GET /tms/v2/customers/{customerTokenId}/payment-instruments.

    The first record is the default payment method. The remaining payment methods are the non-default payment methods.

  2. To delete a payment method, call: DELETE /tms/v2/customers/{customerTokenId}/payment-instruments/{paymentInstrumentTokenId}

  3. To edit a payment method, call: PATCH /tms/v2/customers/{customerTokenId}/payment-instruments/{paymentInstrumentTokenId}

  4. Include the updated payment method details in the call.

Change the Default Payment Method

  1. Use the API in your e-wallet app to change the customer's default payment method.

    To get all payment methods, call: GET /tms/v2/customers/{customerTokenId}/payment-instruments.

    The first result is the default payment instrument. The remaining payment methods are the non-default payment methods.

  2. To make a non-default payment method the default, call: PATCH /tms/v2/customers/{customerTokenId}/payment-instruments/{paymentInstrumentTokenId} and set the value of the request field default to true.

Add a New Payment Method Address

  1. Use the API in your e-wallet app to list the customer's addresses or add a new address for a payment method.

    To list the customer's existing billing addresses, call: GET /tms/v2/customers/{customerTokenId}/payment-instruments.

    The call returns all of the payment methods for a customer, including their billing address details.

  2. To list the customer's existing shipping addresses, call: GET /tms/v2/customers/{customerTokenId}/payment-instruments.

    This call returns all the shipping address details for a customer.

  3. To add a new address, call: POST /tms/v2/customers/{customerTokenId}/shipping-addresses.

  4. To add an address to the payment method created in the create payment instrument step, call: PATCH /tms/v2/customers/{customerTokenId}/payment-instruments/{paymentInstrumentTokenId}.

  5. Pass the ID of the instrument identifier created in the create payment instrument step and the card expiration date.

View Wallet

  1. Use the API in your e-wallet app to view wallet.

    Call GET /tms/v2/customers/{customerTokenId}/payment-instruments.

    The first record is the default payment instrument.

  2. Retrieve the last four digits of the card number from your database or call the payment identifier endpoint.

Payments with Tokens and Wallet Apps

Use the API features to create an e-wallet app for your customers. You can use your e-wallet to authorize a payment.

Authorize a Payment

  1. Use the API in your e-wallet app to authorize a payment.

    To get the customer's default shipping address, call: GET /tms/v2/customers/{customerTokenId}/shipping-address.

    The first record is the default.

  2. To retrieve the customer's default payment method, call: GET /tms/v2/customers/{customerTokenId}/payment-instruments.

    The first record is the default.

  3. Finally, when the customer clicks the Place Order button, call: POST /pts/v2/payments pass the customer token, payment instrument token, and shipping address token.

Last published: September 29, 2026