Checkout
To add a Posfra Checkout Widget to your website simply add the following code to your website.
The script tag loads the JavaScript plugin from our CDN. This line can optionally be placed in your <head> tag if you prefer. The script will look for any div with the class posfra.
<script src="https://cdn.posfra.com/embed.js"></script>
<div
class="posfra"
data-embed-token="99a2ef448e590a94228e4821970f32966ca159f2e"
data-amount="0.002"
></div>
Example
Attributes
This section outlines all required and optional HTML attributes that configure the behavior of the Posfra Checkout widget. These attributes allow you to tailor how the widget interacts with customers during their payment experience.
data-embed-token
- Description: A unique embed token required for the widget to function.
- Type:
string - Required: ✅ Yes
All Posfra widgets must include a valid embed token. This token links the widget to your account and enables transaction processing.
data-amount
- Description: Specifies a fixed BTC amount the customer must send to complete the checkout process
- Type:
float
This is the amount being requested at the checkout. A user must send this amount to the address provided to complete the checkout process.
data-redirect-url
- Description: URL to redirect the customer after a successful transaction.
- Type:
string(URL)
After the transaction is received and confirmed, the user will be redirected to the URL specified here.