Payezydevelopers
Sandbox

Journeys

Platform: from zero to your customer's first payment

Onboard a business customer under your platform, verify it, give your servers a key for it, fund its account and pay a vendor - every step a real API call.

15 stages, about 25 minutes. For fintechs that onboard customers under their own brand.

You are Northstar Payroll, a platform on Payezy. Acme Robotics is about to become your customer. By the end you will have created Acme's organization, filed its KYB, had it approved, minted a key your servers use for Acme, funded Acme's USD account and paid one of Acme's vendors.

The console on the right loads each call for you. Read the stage, check the request, press Send request. The trail on the left fills in with the objects you create.

1

Start a sandbox platform

Why

Platforms are invite-only and reviewed by Payezy, which is slow for a first look. A sandbox platform is already active, so you can try every platform call right away. It expires after 7 days.

Do it

  1. POSTStart a sandbox platformProposed

Done when the platform is active

What happened

Your platform organization {{platform_id}} exists and is active. Everything a platform does is scoped to this id - its team, its keys, its webhooks and its links to customers.

2

Find your platform

Why

Every integration starts by asking who the credential is. getMe lists each organization you belong to with your role and permissions; the platform's org_id is the {orgId} in every platform call.

Do it

  1. GETGet the caller and their organizations
  2. GETGet the platform profile

Done when the platform profile loads

What happened

Your membership on the platform carries permissions like platform:customers_add and platform:customer_keys. The profile holds what customers see: legal name, support email, the customer types you offer and your enrollment link.

3

Listen for customer changes

Why

Verification takes minutes to days in production, so you learn about it from webhooks, not polling. Register an endpoint on your platform for platform_customer.updated; it fires when a customer is created, activated, restricted or reinstated.

Do it

  1. POSTRegister a webhook endpoint

Done when the endpoint is registered

What happened

Endpoint {{platform_webhook_id}} now receives platform_customer.updated. Every delivery carries Payezy-Signature: t=...,v1=..., an HMAC-SHA256 of <t>.<raw body> with your signing secret. Reject anything older than five minutes.

4

Create the customer

Why

You already hold Acme's details, so create the organization for them instead of sending an invitation. The customer is a separate organization linked to your platform; you never become one of its members. external_ref is your own id for Acme - if this request is retried, Payezy refuses a duplicate.

Do it

  1. POSTCreate a platform customer

Done when verification is a draft

What happened

Acme Robotics is organization {{customer_id}}, status kyc_required, with a draft KYB application. The response lists required_documents - the files you upload next. Acme's owner exists as a member already, so you can act for them, but their email is verified only for sign-in, not KYC.

5

File Acme's KYB

Why

Nothing reaches the banking partner until Payezy staff review the application, and they need documents: a certificate of formation for the business, plus a photo ID and a proof of address for its controller. Then you submit, attesting that Acme accepted the account agreement.

What happened

The application is pending_review and Acme is kyc_pending. In production a Payezy reviewer approves it, sends it back with a message, or rejects it. Then the banking partner verifies it and may ask for more documents (documents_required), which you send with submitPlatformCustomerOnboardingDocuments.

6

Get Acme approved

Why

In the sandbox you decide the outcome instead of waiting for a reviewer. Choose approve here; the failure lab tries request_changes and reject.

Do it

  1. POSTDecide a sandbox verificationProposed

Done when Acme is active

What happened

Acme is active and its USD account is open. Your platform endpoint received platform_customer.updated with status: active - that is the signal to let Acme start using money features in your product.

7

Give your servers a key for Acme

Why

Your platform's own credential never acts inside a customer's organization; try it and you get not_found. To call Acme's accounts, recipients and payments from your servers, mint a customer key with only the scopes you need. Money scopes are opt-in.

Do it

  1. POSTMint a customer API key

Done when a test-mode key exists

What happened

Key {{key_id}} acts only inside Acme's organization and only with those scopes. Every call it makes is recorded as source=platform_api with your platform id, on Acme's activity log and on yours. If you unlink Acme, Payezy revokes the keys you minted.

8

Listen for Acme's payments

Why

Events are delivered to endpoints registered on the organization they are about. Payment and verification events belong to Acme, so register an endpoint on Acme's organization, using Acme's key.

Do it

  1. POSTRegister a webhook endpoint

Done when the endpoint is registered on Acme

What happened

You now hear about Acme's deposits and payments. Many platforms point every customer's endpoint at one URL and route on the customer in the path, as here.

9

Find Acme's account and funding details

Why

Approval opened a USD account with a named virtual account at the banking partner. Its routing and account numbers are what Acme gives payers - or what you show inside your product.

Do it

  1. GETList accounts and balances
  2. GETGet funding instructions

Done when funding instructions load

What happened

Account {{account_id}} has a balance of 0. Money sent over ACH, wire or FedNow to the virtual account credits it. Balances come from Payezy's double-entry ledger, reconciled hourly against the partner.

10

Fund the account

Why

In production a payer sends money to the virtual account and it settles in hours to days depending on the rail. In the sandbox you simulate the deposit.

Do it

  1. POSTSimulate a deposit
  2. GETList accounts and balances

Done when the balance shows the deposit

What happened

5,000.00 USD is available. Acme's endpoint received payment.updated with purpose: deposit and status: completed.

11

Add a recipient

Why

Acme pays its vendor Globex. A recipient holds one or more bank or wallet accounts and is screened before money can go to it.

Do it

  1. POSTAdd a recipient

Done when screening is clear

What happened

Globex is recipient {{counterparty_id}}; its bank account {{external_account_id}} is the default. Screening came back clear. A name with "Blocked" or "Review" in the sandbox shows the other outcomes.

12

Price the payment

Why

Rails differ in fee and speed. Quote first and show Acme the options, or send policy: cheapest or fastest and let Payezy pick.

Do it

  1. POSTQuote a payment

Done when at least one rail is offered

What happened

The cheapest rail is {{rail}}. Each option shows the fee, Payezy's share and the network's, and when the money arrives.

13

Send the payment

Why

Creating a payment reserves the amount plus fee immediately. The Idempotency-Key makes retries safe: send the same key again and you get the same payment back instead of paying twice.

Do it

  1. POSTSend a payment

Done when the payment is on its way

What happened

Payment {{payment_id}} is processing. Had Acme set an approval policy and the amount crossed its threshold, it would be pending_approval until an approver approved it.

14

Watch it settle

Why

The banking partner reports progress asynchronously. In the sandbox you move the payment forward yourself; in production you wait for payment.updated.

Do it

  1. POSTAdvance a sandbox paymentProposed

Done when the payment completed

What happened

The payment is completed. The 250.25 USD hold became a posted debit. If the receiving bank had returned it, a later payment.updated with returned would credit the money back.

15

Reconcile from your side

Why

Platforms watch their whole book of customers. The platform transactions list shows every customer's payments without minting keys.

Do it

  1. GETGet a payment
  2. GETList transactions across customers

Done when the platform sees Acme's payments

What happened

You see the deposit and the payment, each with Acme's name. Reconcile them against the webhook events you stored, using id and status.

✓

Finished

You built the full platform flow: platform, customer, KYB, approval, a scoped customer key, webhooks, funding, a screened recipient, a quoted and settled payment, and reconciliation.

  • Run the failure lab to see what goes wrong and how to recover.
  • Read going live for the production checklist.
  • Every call you made has a reference page with code in four languages.