API

Environments and testing

Prio runs a production environment and a development one. Build and test against development, then switch both hosts below to production.

Hosts

Environment API Embed script
production https://server.heyprio.com https://heyprio.com/prio-pay/v1.js
development https://server-dev.heyprio.com https://dev2.heyprio.com/prio-pay/v1.js

The script you load decides which Prio the window talks to: a page loading heyprio.com's script reaches production. Your console is on heyprio.com.

Keys

Your Prio contact gives you a development key. The key you create in your console works only on production.

http://localhost and http://127.0.0.1 can be allowed sites only in development.

Test approval

A test customer stays in review until Prio decides. To have one approved, email [email protected].

A test run

1. Create a customer with POST /api/partner/users.

2. Open setup on your page with PrioPay.openOnboarding({ jwt, refreshJwt }).

3. The customer's status stays review.

4. Once Prio approves them, the user.status_changed webhook arrives.

5. Send or request a payment. Run this example on development — it sends as Clearpath, Prio’s test partner, and cannot use your key or customers.

6. The invoice.created and invoice.updated webhooks arrive.

7. Read the customer's invoices with GET /api/partner/users/:userId/invoices.

Prio may display inaccurate info at times, please double check the responses.