Official Rocket Buttons

Version 1 · Rocket supplies the button; your application supplies its existing authorization or purchase handler.

Approved variants

Primary: Rocket blue #167ac6, white mark and text without an outline. Dark: #172331, white mark and text. Light: white with #172331 mark and text, visible border. White text on the primary blue meets WCAG AA text contrast.

Integration

<script defer src="https://tryrocket.ai/buttons/v1/rocket-buttons.js"></script>
<rocket-button id="rocket-sign-in" action="continue" variant="primary"></rocket-button>
<rocket-button id="rocket-buy" action="buy" variant="primary"></rocket-button>
document.getElementById("rocket-sign-in")
  .addEventListener("rocket-activate", startExistingRocketSignIn);
document.getElementById("rocket-buy")
  .addEventListener("rocket-activate", startExistingRocketPurchase);
// While your existing handler is pending:
button.setAttribute("loading", "");
// On failure or completion:
button.removeAttribute("loading");

The kit is a framework-independent custom element, works with React, Vue and ordinary HTML, and makes no network requests for identity or payment. Its mark is embedded. It uses a native button inside Shadow DOM so host styles do not alter branding. Add https://tryrocket.ai to your script policy and allow the component's inline styles and data-image mask if your CSP restricts them. Do not weaken an existing CSP: review your policy or self-host the unmodified versioned file. Nothing else is loaded. Importing is safe only in the browser; load after client hydration for SSR apps.

Supported attributes: action="continue|buy", variant="primary|dark|light", boolean loading and disabled (remove them to reset; setting "false" still enables a boolean attribute). Listen for rocket-activate, not both that and click. Action and variant fall back to Continue with Rocket and primary when invalid. Set a Buy control disabled until your existing eligibility checks pass. Keep price, currency, recurrence and purchase terms beside the button.

Brand and accessibility rules

Back to Buy with Rocket

Hosted pricing and plan-specific buttons

Use the same published offers as your Rocket listing. The buyer reviews the selected plan on Rocket before checkout. No secret keys belong in this markup.

<script defer src="https://tryrocket.ai/buttons/v1/rocket-buttons.js"></script>
<rocket-button action="buy" app-id="YOUR_APP_UUID"></rocket-button>
<rocket-button action="buy" app-id="YOUR_APP_UUID" offer-id="YOUR_OFFER_UUID"></rocket-button>

Without offer-id, Rocket shows the hosted plan picker. Copy exact app and offer UUIDs from payment setup. An unpublished offer cannot be purchased. Existing rocket-activate listeners continue to work; call event.preventDefault() to override navigation when app-id is set.

For a plain link: https://tryrocket.ai/apps/YOUR_APP_UUID?buy=1&offer=YOUR_OFFER_UUID&source=developer_website#pricing. Omit offer to show all published plans. Rocket resolves the exact merchant, price, fee and entitlement on its server.

After payment, check connect-entitlements from your server using the buyer's Rocket ID access token. Use entitlement_key for a logical tier (monthly and annual), or the legacy product_key for an exact offer. Check the matching app/client, active status, expiry and revocation. A return URL is never payment proof. One-time fulfilment requires verified_paid and granted, deduplicated by purchase_id.

Plan changes are not supported in V1. Buyers manage existing subscriptions in My Purchases and must wait for the current subscription to end before buying another. An inline pricing widget is deferred; these buttons and hosted links require no additional integration infrastructure.