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.
- List customer accounts. GETList a customer's accounts with
platformOrgIdset to{{platform_id}}andcustomerOrgIdset to{{customer_id}}. Keep an accountidfor the payment. This needsplatform:customer_accounts_view. - Create a payment. POSTCreate a customer's payment from that account to a recipient, with a new
Idempotency-Key. This needsplatform:customer_operate. Above the customer's approval threshold the status ispending_approval. - Approve the payment. POSTApprove a customer's payment with
paymentIdfrom the create response. This needsplatform:customer_payments_approve. The key that created the payment cannot approve it unless the customer's policy allows self-approval.
/v1/platforms/{platformOrgId}/customers/{customerOrgId}/accountsList a customer's accounts