Whether it be with Squarespace, Wordpress, BigCommerce, Shopify, or your own custom built site, integrations are a simple way of integrating VHX with your site. If you need deeper customization, see our full API reference.
The Checkout Embed allows your customers to purchase your VHX Products directly from your site. To get a feel for how it will work on your site, click the button below:
To integrate the Checkout embed on your site, include the following script at the bottom of your page:
<!-- include at the bottom of your site inside the body tag -->
<script src="https://cdn.vhx.tv/assets/api.js"></script>
With the included script, any link on your pointing to https://yoursubdomain.vhx.tv/buy/your-product will open the checkout embed with the associated VHX Product for purchase.
A VHX Product can be embedded to show your trailer and buy button anywhere. You can copy the code for your video embed from the Products page of your VHX Dashboard. If you'd like to customize it beyond what is out of the box, we offer these query parameters to modify the look.
<!-- VHX Trailer Embed -->
<iframe src="https://embed.vhx.tv/packages/15" width="850" height="480" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<!-- customize trailer embed features via query params -->
<iframe src="https://embed.vhx.tv/packages/15?color=ffffff&buy_btn=1" width="850" height="480" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
| Parameter | Description |
|---|---|
| auto=1 0 or 1 |
Enable or disable autoplay on page load. If not included, defaults to 0. |
| color=ffffff A valid 3 or 6 digit hexademical |
Sets the color of the player. Do not include the # sign. If not included defaults to your site color as set in the VHX Dashboard. |
| buy_button=1 0 or 1 |
Hide or show the buy button. If not included defaults to 1. |
| title=1 0 or 1 |
Hide or show the product title. If not included defaults to 1. |
| volume=100 0 to 100 |
Set the starting volume for the trailer on play. If not included, defaults to 50. |
For more specific instructions on how to integrate with your service of choice see the VHX Help links below.
Currently in private beta, webhooks allow external services to be notified when a purchase happens on VHX. Please email api@vhx.tv to request access.
For each purchase, we will make an HTML POST to the webhook URL with a JSON payload. The webhook must return an HTTP status code of 200. We will retry up to 5 times if we do not receive this status code.
The JSON payload we POST to the webhook URL is as follows:
{
"name": "Kevin Sheurs",
"amount": {
"cents": 500,
"currency": "USD",
"formatted": "$5"
},
"units": 1,
"campaign": "my-campaign",
"country_code": "US",
"referrer": "http://google.com?q=movie",
"user": {
"id": 1,
"email": "kevin@vhx.tv",
"name": "Kevin Sheurs"
},
"package": {
"id": 1,
"sku": "my-sku",
"title": "My package",
"price": {
"cents": 1000,
"currency": "USD",
"formatted": "$10"
}
},
"coupon": {
"code": "SPECIAL"
},
"created_at": "2014-02-18 17:29:10 UTC"
}