Skip to main content

Key Concepts

Before diving into the Getting Started integration guide, it's important to understand the core concepts and data model behind Express Checkout (XCO).

XCO User

An XCO User is a cross-merchant customer identity managed by Purse. It represents a single customer who can interact with multiple merchants through Express Checkout.

An XCO User profile contains:

FieldDescription
emailCustomer email address (required, minimum identifier)
phone_numberCustomer phone number
first_name / last_nameCustomer identity
gendermale, female, or other
birthdateDate of birth (ISO 8601 YYYY-MM-DD)
addressesArray of billing and/or delivery addresses
Cross-Merchant Identity

An XCO User exists independently of any single merchant. The same customer can be linked to multiple merchants, each through its own consent. This enables a seamless checkout experience across the Purse ecosystem.

New vs. Existing User

When a customer arrives at your signup flow, two scenarios apply:

  • New user (exists: false) — No XCO account exists yet. You create one alongside the customer account in your system.
  • Existing user (exists: true) — The customer already has an XCO account (possibly created through another merchant). You link it via passwordless authentication.

A consent is the link between a merchant and an XCO User. It represents the customer's explicit agreement to share their XCO data (profile and payment tokens) with a specific merchant.

Consent creation depends on whether the XCO user already exists:

ScenarioHow consent is created
New userConsent is created automatically when you call POST /v1/merchants/{merchantId}/users with the customer data.
Existing userConsent is created explicitly via POST /v1/merchants/{merchantId}/users/{customerReference}/consents after successful passwordless verification.
Consent Is Required

Without an active consent, a merchant cannot access the customer's XCO data or payment tokens. Consent must be obtained before any Express Checkout payment flow can take place.

Once a consent is established, the merchant can:

  • Retrieve the customer's XCO profile via GET /v1/merchants/{merchantId}/users/{customer_reference}
  • Access the customer's saved payment tokens for Express Checkout payments
  • Pre-fill checkout forms with the customer's stored address and identity data

Customer Reference

The customer reference (customer_reference) is your own identifier for the customer in your system. It serves as the bridge between your internal customer record and the XCO User.

Uniqueness

The customer_reference must be unique per merchant. It is used as a path parameter in all subsequent API calls (e.g., retrieving user data, creating consents).

Where It's Used

API EndpointRole of customer_reference
POST /v1/merchants/{merchantId}/usersSent in the request body to link the new XCO account
POST /v1/merchants/{merchantId}/users/{customerReference}/consentsPath parameter to identify which customer to link
GET /v1/merchants/{merchantId}/users/{customer_reference}Path parameter to retrieve the customer's XCO profile

Passwordless Authentication (OTP)

When a customer already has an XCO account, their identity must be verified before a consent can be created. Express Checkout uses a passwordless OTP (One-Time Password) flow for this purpose.

Flow Overview

Three Sub-Steps

StepEndpointPurpose
StartPOST /v1/merchants/{merchantId}/users/passwordless/startSends an OTP to the customer's email or phone
VerifyPOST /v1/merchants/{merchantId}/users/passwordless/verifyValidates the OTP and returns a consent_challenge_id along with the customer's XCO profile
ConsentPOST /v1/merchants/{merchantId}/users/{customerReference}/consentsFinalizes the link using the consent_challenge_id
Consent Challenge

The consent_challenge_id is a short-lived token returned after successful OTP verification. It must be used promptly to create the consent — it cannot be reused or stored for later.

Rate Limiting & caller_id

All passwordless endpoints accept an optional caller_id parameter (e.g., the customer's browser IP address). Without it, rate limiting is applied solely based on your clientId, which may block legitimate requests in production.

→ See Rate Limiting for details.


Payment Tokens

Payment tokens are saved payment instruments (e.g., credit cards) linked to an XCO User. They enable returning customers to pay without re-entering card details.

Token Count

When checking if an XCO user exists (GET /v1/users/exists), the response includes a token_count field:

token_countMeaning
0The user has no saved payment methods
≥ 1The user has one or more saved payment instruments available for Express Checkout
Cross-Merchant Tokens

Payment tokens belong to the XCO User, not to a specific merchant. Once a customer grants consent, the merchant can access the customer's saved tokens for a streamlined checkout experience.

Token Lifecycle

  1. Creation — A token is created when a customer saves a payment method during a checkout flow with any consenting merchant.
  2. Reuse — The token can be reused across all merchants that hold an active consent with the customer.
  3. Deletion — The customer can remove tokens through wallet management interfaces.

Summary

ConceptDescription
XCO UserA cross-merchant customer identity managed by Purse
ConsentA merchant-specific link granting access to an XCO User's data and tokens
Customer ReferenceYour internal customer ID, used to bridge your system with the XCO User
Passwordless OTPIdentity verification flow for linking existing XCO accounts
Payment TokensSaved payment instruments reusable across consenting merchants

Next Steps