Skip to main content
EasyPPP has one public endpoint. It takes your public key and up to 50 Stripe Price IDs, and returns the Price ID each visitor should be charged, with an amount to display.
Call it from the visitor’s browser. The country is taken from the request itself, so a call from your server would be priced for your server’s location. There is no way to pass a country or IP address.

Request

string
required
Your public key from the dashboard. Starts with ep_live_, ep_test_ or ep_sbx_ and selects that Stripe environment.
string
required
Comma-separated Stripe Price IDs, 1 to 50. Base Price IDs or sibling IDs both work; a sibling resolves through its base. price= is accepted for a single ID.
Only GET and OPTIONS are allowed. There are no headers to set. Responses are JSON with Access-Control-Allow-Origin: * and Cache-Control: no-store.

Response

data has one entry per requested ID, in the order you sent them.
string
The Stripe Price ID to charge. A sibling when the visitor is localized, otherwise the base Price.
string
The base Price this entry belongs to. Useful as a stable key when you request several IDs.
boolean
true when a market sibling was selected.
boolean
true when the ID is a Price EasyPPP localizes for this key. Unknown IDs are echoed back with known: false and null pricing fields, so you can always fall back to your own price.
string | null
ISO 3166-1 alpha-2 code of the visitor’s country, or null when it could not be determined. This is the most specific location field returned.
integer | null
Percentage of the base price this visitor pays. 100 when not localized. Above 100 in premium markets.
number | null
100 - pay, or 0 when there is no discount. Never negative.
string | null
Currency of amount and display: the visitor’s currency when a rate is available, otherwise the Price’s own currency.
integer | null
Amount in the smallest unit of currency, following Stripe’s convention (no decimals for JPY and KRW, three for KWD and BHD, two for most others). Prefer display.
string | null
amount formatted with a currency symbol and the correct number of decimals, for example $49.00, CA$66.15, ¥4,900.
boolean
true when amount was converted into a currency other than the Price’s own. The conversion uses the exchange rate from rates_as_of and is for display only.
string
The currency of the Stripe Price, which is what Stripe charges. Absent for unknown IDs.
integer
The amount of the selected Price (the sibling when localized) in base_currency, in its smallest unit. This is what Stripe charges. Absent for unknown IDs.
string
When the exchange rates used for the estimate were published, ISO 8601 UTC. Absent for unknown IDs.
string | null
Quote this when writing to support about a specific response.
boolean
true when localized pricing is paused for this account, either by you or because no card is on file. Every entry then carries the base Price.

A visitor who is not localized

The same fields come back, pointing at the base Price. display is still the base price converted into the visitor’s currency when a rate is known.
This shape is returned for visitors in the base bucket, visitors whose country cannot be determined (country: null, amount in the base currency), visitors behind a VPN or proxy when the guard is on, and every visitor while the account is paused. The response does not say which.

An ID EasyPPP does not know

Errors

Errors are JSON with a single error field. On any error, show your base price and charge your base Price ID.

Limits and timing

The key

The key is public and meant to live in client code. It can read localized prices for the Prices you selected and nothing else: it cannot charge, refund, change anything in Stripe, or see your customers, payments or revenue. Each Stripe connection (live, test mode, sandbox) has its own key.