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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
Do it
- GETGet the customer account agreements
- POSTUpload a customer verification document
- POSTUpload a customer verification document
- POSTUpload a customer verification document
- POSTSubmit a customer for review
Done when the application is pending review
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
What happened
5,000.00 USD is available. Acme's endpoint received payment.updated with purpose: deposit and status: completed.
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.
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.
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.
What happened
The cheapest rail is {{rail}}. Each option shows the fee, Payezy's share and the network's, and when the money arrives.
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.
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.
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.
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.
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
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.