Embed

Payment button

A payment button opens the Prio window with one task: pay one of your users. The token is the referralToken the API returned when you created that user. To send a payment or an invoice from your server with no window, use Send a payment or Request a payment.

Attribute Value Required
data-prio-pay the payee’s referralToken yes
data-prio-amount a positive number, in US dollars no
data-prio-color dark (default) or light no
data-prio-text the button’s label no
HTML
<button data-prio-pay="maya-ortiz"
        data-prio-amount="250"
        data-prio-text="Pay Maya"></button>

With no data-prio-text the button reads Pay Now.

Who can be paid, and how much

The recipient must be one of your users, and not rejected or suspended. The amount must be a plain number: "1,200" or "$50" is ignored. An amount above 2000 is dropped, and the window asks the payer for the amount.

The button and PrioPay.open() take no tokens: the payer signs in by phone code inside the window.

Opening it from your code

Open the payment window for one of your users.

JavaScript
PrioPay.open("maya-ortiz", { amount: 250 });

Open setup for a customer whose tokens you hold.

JavaScript
PrioPay.openOnboarding({ jwt, refreshJwt });

Close the window.

JavaScript
PrioPay.close();

Wire buttons you add to the page after it loads.

JavaScript
PrioPay.init();