Integrate 1Price into your application in 15 mins
In Progress
before
following the guide $1Price
to your window object which will categorize new users.
YOUR_WORKSPACE_ID
with your unique data_1p
found on
connectUSER_ID
with the value of your customer’s unique id.Success Status
Currency
Product Details
Use this data to dynamically populate your pricing table and ensure your visitors always see the most up-to-date pricing information.
$1Price
Parameters:Sample Response
oneprice_cid
to your Stripe Checkout Session
You’ll need to send the 1Price generated priceId to your backend server when creating a Stripe subscription.
YOUR_1PRICE_CID
with the value of your $1Price.customer_id
and the value of YOUR_PRICE_ID
with the dynamic price_id (from your response
request).$1Price
or window.$1Price
/v3/price_value
endpoint contains a stripeCheckoutSubscriptionUpdate
property.
To retrieve this property simply follow the Step 2 and access the stripeCheckoutSubscriptionUpdate
property.
When creating your Stripe portal sessions you will first need to create a custom session. The following is an example of how to create a custom session using the NodeJS library.
BONUS: You can create a 100% off coupon on Stripe and use that code to make the test purchase, so you do not get charged.
In Progress
. The script will automatically activate once you have an active experiment.
What’s the difference between data-1p
and workspace_id
?
These are two references to the same identifier. data-1p
is used when embedding the script tag, while workspace_id
is used when accessing it programmatically through $1Price.workspace_id
. Both contain the same unique workspace identifier.
Do I need to specify the uniqueId
and currency
?
The uniqueId
parameter is optional and can be used to maintain consistent pricing for a specific customer across multiple sessions. The currency
parameter is also optional and can be used to specify the currency for returned pricing values.
How can I preview what a specific customer segment sees?
You can preview the pricing for any offer by making a GET request to: