Integrate
Off-App Purchases
Enable seamless purchases through your app with a simple redirect flow.
Overview
Off-App Purchases let you generate a URL that your users can use to purchase a specific offering from your web or mobile app.
When opening the Off-App Purchase URL, customers sign up and confirm their purchase with Supertab. After completion, Supertab redirects the customer back to your app.
Prerequisites
Before generating a URL, make sure you have:
- A Site with a URL you wish to use as the post-purchase redirect destination.
- An Offering available for purchase.
Creating a Purchase Link
Include the following required query parameters to generate a valid purchase link:
client_id
– A live or test client ID associated with the Site you created.offering_id
– The ID of the Offering the user is purchasing.
Purchase URL
Metadata
You can optionally include a metadata
parameter with custom key-value pairs. This metadata:
- Is returned in the
metadata
query parameter during the redirect back to your app. - Is also attached to the purchase object after confirmation.
How to encode metadata:
- Format metadata as a URL query string (e.g.
user_id=123&nonce=456
). - Then encode using URL component encoding (e.g.
user_id%3D123%26nonce%3D456
).
Example with metadata:
Purchase URL with Metadata
Handling the Redirect
The customer is redirected to your app when they have completed the purchase flow.
Parameter | Description | Example |
---|---|---|
purchase_id | The ID of the purchase. | ”purchase.cf637646-71a4-430d-aaea-a66f1a48a83c” |
status | The purchase status.
| ”completed” |
offering_id | The ID of the selected offering, passed in the original purchase URL. | ”offering.4df706b5-297a-49c5-a4cd-2a10eca12ff9” |
metadata | The custom key-value metadata you included in the original URL. | ”user_id=123&nonce=456” |