Customers

Manage customers and their payment methods.

Customers are sandbox-aware — test keys only see sandbox customers. You can store contact, billing, and shipping details on each customer.

List Customers

List customers. Automatically filtered by sandbox/live based on API key mode. Each customer includes processorType ('nmi', 'stripe', or 'aptpay') — the gateway their saved payment methods live on.

GEThttps://paysio.com/api/v1/customers

Authorizations

Authorizationstringheaderrequired

Any API key. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Query parameters

limitinteger

1-100, default 10

starting_afterstring

Cursor for pagination

processorstring

Filter by gateway: 'nmi', 'stripe', or 'aptpay'. Use processor=aptpay to list customers whose saved payment methods can receive payouts.

searchstring

Find a customer by email, first or last name, full name, or phone. Case-insensitive, matches anywhere in the field; phone ignores punctuation and needs at least 4 digits.

Get Customer

Retrieve a single customer by ID.

GEThttps://paysio.com/api/v1/customers/:id

Authorizations

Authorizationstringheaderrequired

Any API key. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Create Customer

Create or update a customer with optional card vaulting. If a customer with the same email already exists, their info is updated and the response includes existing: true (no error — safe to call repeatedly).

POSThttps://paysio.com/api/v1/customers

Authorizations

Authorizationstringheaderrequired

Secret key (sk_*). Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Body

emailstringrequired

Customer email address

first_namestring

First name

last_namestring

Last name

phonestring

Phone number

billing_address_1string

Billing street address

billing_citystring

Billing city

billing_statestring

Billing state/province

billing_postal_codestring

Billing ZIP/postal code

billing_countrystring

Billing country (2-letter ISO code)

shipping_first_namestring

Shipping recipient first name

shipping_last_namestring

Shipping recipient last name

shipping_address_1string

Shipping street address

shipping_citystring

Shipping city

shipping_statestring

Shipping state/province

shipping_postal_codestring

Shipping ZIP/postal code

shipping_countrystring

Shipping country (2-letter ISO code)

payment_tokenstring

Token from paysio.createToken() — vault a card at creation (optional)

cc_numberstring

Card number — vault via raw card (optional, use payment_token instead)

cc_exp_monthstring

Expiry month (01-12), required with cc_number

cc_exp_yearstring

Expiry year (e.g. 2028), required with cc_number

Update a customer

Update an existing customer's details. Only fields you include in the request body are updated.

PATCHhttps://paysio.com/api/v1/customers/:id

Authorizations

Authorizationstringheaderrequired

Secret key (sk_*). Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Body

first_namestring

First name

last_namestring

Last name

phonestring

Phone number

billing_address_1string

Billing street address

billing_citystring

Billing city

billing_statestring

Billing state/province

billing_postal_codestring

Billing ZIP/postal code

billing_countrystring

Billing country (2-letter ISO code)

shipping_first_namestring

Shipping recipient first name

shipping_last_namestring

Shipping recipient last name

shipping_address_1string

Shipping street address

shipping_citystring

Shipping city

shipping_statestring

Shipping state/province

shipping_postal_codestring

Shipping ZIP/postal code

shipping_countrystring

Shipping country (2-letter ISO code)

Complete custom checkout flow

This example shows the full flow: collect form data + card token from paysio.js, then create/find a customer, vault the card, and charge it — all from your server.

JavaScript
// FRONTEND: Get a token from your card form

const { token } = await paysio.createToken({
  number: '4111111111111111',
  exp_month: '12', exp_year: '29', cvv: '123',
});

// Send everything to YOUR server
await fetch('/api/checkout', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    token,
    email: '[email protected]',
    first_name: 'Jane',
    last_name: 'Doe',
    phone: '+15551234567',
    billing_address_1: '123 Main St',
    billing_city: 'New York',
    billing_state: 'NY',
    billing_postal_code: '10001',
    billing_country: 'US',
    amount: 2999,
  }),
});

// SERVER: Process the checkout
const API = 'https://paysio.com/api/v1';
const SK = 'sk_live_your_secret_key';
const headers = {
  'Authorization': `Bearer ${SK}`,
  'Content-Type': 'application/json',
};

// Step 1: Create (or update) customer + vault card in one call
const createRes = await fetch(`${API}/customers`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    email: body.email,
    first_name: body.first_name,
    last_name: body.last_name,
    phone: body.phone,
    billing_address_1: body.billing_address_1,
    billing_city: body.billing_city,
    billing_state: body.billing_state,
    billing_postal_code: body.billing_postal_code,
    billing_country: body.billing_country,
    payment_token: body.token,  // vault the card at creation
  }),
});

const { data: customer, payment_method, existing } = await createRes.json();
const customerId = customer.id;
// If existing === true, customer was updated (not duplicated)
// payment_method.billing_id — reference for this card

// Step 2: Charge the customer
const chargeRes = await fetch(`${API}/charges`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    customer_id: customerId,
    amount: body.amount,
    currency: 'USD',
  }),
});

const { data: charge } = await chargeRes.json();
// charge.status === 'pending_settlement' means success