Payezydevelopers
Sandbox

Guides

Act on a customer with your platform key

List a linked customer's accounts with your platform key, then create and approve a payment. The key is created on the Developer page with three scopes.

platformOrgId is the platform response's org_id and customerOrgId is the customer response's org_id. The console fills platformOrgId from {{platform_id}} and customerOrgId from {{customer_id}}.

The key

Create the key on the Developer page of the sandbox app. Include these three scopes:

Scope What it allows
platform:customer_accounts_view List accounts, statements, funding, payments, recipients, and activity. This starts selected.
platform:customer_operate Create and cancel payments and withdrawals, and edit recipients and accounts. Check this.
platform:customer_payments_approve Approve or reject a payment. Check this.

A key that omits scopes is read-only. platform:customer_operate and platform:customer_payments_approve are not in that default, so check them when you create the key. A minted customer key cannot carry platform:*.

The customer link must be active. An unlinked customer is not_found. Payment events still go to the customer organization. Poll these calls, or use a customer key if you need the customer's webhooks.

  1. List customer accounts. GETList a customer's accounts with platformOrgId set to {{platform_id}} and customerOrgId set to {{customer_id}}. Keep an account id for the payment. This needs platform:customer_accounts_view.
  2. Create a payment. POSTCreate a customer's payment from that account to a recipient, with a new Idempotency-Key. This needs platform:customer_operate. Above the customer's approval threshold the status is pending_approval.
  3. Approve the payment. POSTApprove a customer's payment with paymentId from the create response. This needs platform:customer_payments_approve. The key that created the payment cannot approve it unless the customer's policy allows self-approval.
GET/v1/platforms/{platformOrgId}/customers/{customerOrgId}/accounts

List a customer's accounts

Reference