Docs / Build

Customers and onboarding

Register consumers and merchants, run hosted onboarding, and handle every verification outcome.

Register the customer#

Shell
curl -X POST https://sandbox.a2ainstapay.com/v1/customers \
  -H "Authorization: Bearer $A2A_ACCESS_TOKEN" -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \
  -d '{"type":"business","external_ref":"merchant-2001","email":"owner@example.com","mobile_number":"+16465550123","prefill":{"legal_name":"Seaside Bakery LLC","trading_name":"Seaside Bakery"}}'
FieldNotes
typeindividual for a consumer, business for a merchant
external_refYour own reference, unique in your workspace, up to 64 characters
email, mobile_numberThe mobile number is a US number in E.164 format. A number can hold one account of each type
prefillOptional values to start the screens with: first_name and last_name, or legal_name and trading_name

The response has verification.status created and an onboarding_session. Open it with the SDK.

What the customer does on the hosted screens#

StepConsumerMerchant
Mobile checkOne-time code to the mobile numberOne-time code to the mobile number
DetailsName, date of birth (18 or over), residential address, SSN or ITINLegal and trading name, EIN, entity type, industry, registered address, website, expected volume and average ticket
PeopleEvery owner of 25% or more and one control person, with a certification that the information is complete
DocumentsDigital Account Terms, E-SIGN Consent, Privacy Notice, Customer Identification NoticeMerchant Services Agreement, Acceptable Use Policy, Privacy Notice, E-SIGN Consent
PINA six-digit PIN that is not a simple sequenceA six-digit PIN for the business's authorized user

Full SSNs and EINs are used for the checks and are not kept. A business in a prohibited industry is refused at once, before any personal details are collected.

Verification outcomes#

StatusMeaningWhat to do
pendingChecks are runningShow "checking your details"
approvedThe Digital Account is open; account_id is set and account.created followsContinue to bank linking
in_reviewThe compliance team is reviewing, for example a possible sanctions match or a recent SIM swapTell the customer you will let them know; wait for the webhook
rejectedThe account cannot be openedShow a neutral message. A new application is possible after verification.retry_available_at

Each change raises customer.verification.updated. For merchants, GET /v1/customers/{id}/owners lists the owners and their own outcomes.

If the customer leaves before finishing#

The session expires, and the customer stays created. Create a new session to let them continue:

Shell
curl -X POST https://sandbox.a2ainstapay.com/v1/sessions -H "Authorization: Bearer $A2A_ACCESS_TOKEN" -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" -d '{"flow":"onboarding","customer_id":"cus_..."}'

After onboarding#

NeedFlow or endpoint
The customer forgot their PINPOST /v1/sessions with flow: pin_reset
New e-mail, mobile number or addressflow: contact_change. A new address re-verifies the customer
Updated customer documentsflow: terms_acceptance when GET /v1/customers/{id}/documents shows pending_acceptance
PIN locked after ten wrong attemptscustomer.pin_locked; it unlocks after an hour, or with a PIN reset
Close the accountPOST /v1/customers/{id}/close; any balance is paid to the verified linked account

Questions about this page? Contact developer support.