Skip to content

How it works

Customer's website or app
| your customer session
v
Your backend + order database
| partner Bearer token, HTTPS /v1
v
Zwipe API + background issuance worker
| issuer integration
v
Card issuer
Customer -- deliberate wallet action --> issuer-hosted wallet page
Component Responsibility
Your frontend Customer sign-in, forms, code entry, progress messages, balance display, wallet action.
Your backend Partner credentials, customer authorization, trusted order amount, stable reference, API calls, saved mappings, recovery.
Zwipe Partner permissions, restaurant ownership, idempotency records, background issuance, issuer communication.
Issuer Card creation/loading, email verification service, current balance, available hosted links.

The Zwipe token identifies your partner account. It is not a customer session and must remain on your server. Your backend must check which customer owns every requested order or card.

  1. Resolve the signed-in customer and configured restaurant on your server.
  2. Follow the email verification flow.
  3. Store the immutable purchase data and external_ref in your database.
  4. Submit the order to Zwipe. A 202 response means a background job was accepted.
  5. Save the returned card_id and check status approximately every two seconds during a bounded foreground wait.
  6. On issued, retrieve the balance. On in_doubt, use the recovery procedure.
  7. Resume unfinished work from your backend after the app closes; a card.* webhook tells your backend when the outcome is known.

200 OK can contain a card whose status is pending, failed, or in_doubt. 202 Accepted does not mean the customer has usable funds. Read the JSON status and error_code, and use the dedicated balance endpoint for a timestamped balance.

Changing external_ref creates a different order. It is not a way to retry a slow request. See idempotency before implementing checkout retries.