Subbi
  • What is Subbi?
  • Getting Started
    • Setting up your first subscription
    • Supported tokens
    • Contract links
  • Hosted Checkout
    • Introduction
    • Configuring URLs
  • Self Hosted Checkout
    • Installation
    • Components
      • Subbi Provider
      • Buttons
        • Metamask Button
        • Approve Button
        • Subscribe Button
        • Cancel Button
      • Checkout Flow
    • Hooks
  • Direct contract interaction
    • Introduction
    • Contract ABIs
  • Extras
    • Fee sharing
Powered by GitBook
On this page
  • Checkout
  • Cancellation
  1. Hosted Checkout

Configuring URLs

PreviousIntroductionNextInstallation

Last updated 3 years ago

Need a more integrated checkout? Have your devs take a look at using Subbi's components. Or perhaps even .

Checkout

Subbi self hosted checkout URLs are pretty simple to use. Simply direct your customers to the Subbi website using the following URL structure:

https://subbi.fi/checkout/<your subscription contract address>

Hosted checkout URLs also allow an optional redirectUrl parameter to tell Subbi to redirect your users somewhere after a successful checkout - perhaps a thank you page on your site. Redirect URLs should be and can include query parameters. A full example of a hosted checkout url might look like:

https://subbi.fi/checkout/0xadac08d7d5bf608d622a94bfab669b38fdc7bcb2?redirectUrl=https%3A%2F%2Fyoursite.com%2Fthankyou

You can see a live example on the mumbai environment .

Cancellation

As well as hosted subscription urls, Subbi also provide hosted cancellation urls when customers wish to stop being billed. Simply swap out the 'checkout' portion of the url for 'cancel', like so:

https://subbi.fi/cancel/<your subscription contract address>

Just like their checkout counterparts, cancellation urls also support an optional redirectUrl parameter. A full example might look like:

https://subbi.fi/cancel/0xadac08d7d5bf608d622a94bfab669b38fdc7bcb2?redirectUrl=https%3A%2F%2Fyoursite.com%2Fthankyou

You can see a live example on the mumbai environment .

self hosting your checkout
interacting with your subscription contract directly
encoded
here
here