old_Loopcrypto.xyz
  • Introduction
  • Supported networks and tokens
  • Loop + Frames
  • Learn
    • How Loop works
    • Core components
      • Collecting authorization
        • Enabling payment on multiple networks
        • Accepting ETH and MATIC
      • Sending payment requests
      • Checking a customer's balance & allowance
      • Receipts and reminders
      • Customer portal
    • Loop + your financial stack
      • Linking on-chain transactions with invoices in your ERP system
      • Connecting with accounting software
      • Crypto off-ramp
    • Case studies
  • Dashboard functionality
    • Subscriptions
      • Free trials, discounts and more
      • Auto-invoicing
      • Auto-cancelations
    • One-time payments
    • Scheduling outbound payments
      • Internal notes
    • Editing an upcoming payment
    • Payments for platforms
  • Integrations
    • Stripe + Loop
      • Getting setup
      • Stripe Connect setup
      • Subscriptions
        • Free trials
        • Upgrading a customer or editing a subscription's products
      • Invoicing
      • One-time payments
      • Coupon codes
      • Stripe Connect - Subscriptions
      • FAQs about Stripe integration
    • Chargebee + Loop
      • Getting setup
      • Subscriptions
      • One-time payments
      • Coupon codes
    • Quickbooks + Loop
      • Invoicing
    • Xero + Loop
      • Invoicing
    • Ghost.org + Loop
    • Zapier + Loop
    • Manually add integrations
  • Technical Docs
    • APIs
      • Entity
        • Adding child entities
        • Adding user to child entity
        • Get child entities
      • Items
        • Adding items
          • Item types
          • Categories
        • Retrieving an item
        • Updating an item
        • Deactivating an item
      • Agreements
      • Transfer requests
        • Signing transfer requests
        • Loop CLI
        • Canceling transfer requests
        • Transfer request status
        • Handling unfulfilled transfer requests
        • Validations
      • Webhooks
        • Checking webhook signatures
        • Demo App
        • Slack, Airtable, Discord, Telegram
    • Archeticture
      • Smart contract
        • Deploying your smart contract
          • Modifying smart contract properties
      • Collecting authorization
        • Checkout page
          • Additional functionality
          • Add "pay with crypto" button
        • Checkout widget
          • NPM package readme
        • Checkout parameter examples
      • Providing on-chain payment based access
        • Subscription gated communities
    • Loop SDK
      • Verify Webhook
      • Transfers
      • Error Handling
      • Generating API keys
    • Sample guide: Collect a subscription or one-time payment
    • Integrating the Loop Protocol into your dApp
      • Payroll applications
      • Loan platforms (credit cards, BNPL)
    • Security
      • API Authentication
      • Securing with signatures
      • API Trust assumptions
      • Audits
  • FAQs
  • Company Dashboard
  • Loop Portal
Powered by GitBook
On this page
  • Creating coupon codes
  • Passing in coupon codes to the checkout
  1. Integrations
  2. Stripe + Loop

Coupon codes

PreviousOne-time paymentsNextStripe Connect - Subscriptions

Last updated 1 year ago

Loop supports the ability to accept promotion codes created in Stripe at the time of checkout.

Customers can input this code themselves or companies can pass in coupon codes themselves into the widget.

When a customer authorizes payment via the widget or checkout page, they can input a promotion code, Loop will validate this code, and upon checkout, Loop will create or update the customer in Stripe and note the use of the code. Then, when Stripe creates the invoice, it will include the code's discount.


Creating coupon codes

In Stripe, create a coupon in Stripe with a customer facing coupon code.

Supported coupon criteria
Unsupported Coupon

Loop supports the following functionality for coupon codes:

Customers can apply the coupon code at checkout and Loop will validate if the coupon code works.


Passing in coupon codes to the checkout

Companies can also pass in coupon codes themselves into the widget.

  1. Create coupon codes in Stripe & grab the ID.

You can find directions on how to create codes here.

Once you have created the code, you see it creates an ID - this is the code that you will need to pass to Loop.

  1. Collect payment authorization, passing through the code to Loop

Loop allows you to collect payment authorization either through our widget or checkout page. Currently it is recommended to use the widget and your own custom checkout page.

Company checkout page + Loop widget

You will need to pass the coupon code to the modal upon initialization. You can read how in the modal's NPM package readme. Thus, you will need to provide a way for the customer to input the coupon code and then pass through to Loop.

Please note, the cart will not update to display the discount code. Thus, we recommend that you set cartEnabled: false in the modal (or you can not set the cartEnabled option at all, because false is the default value).

Hosted checkout page

You can use Loop’s checkout page and append the code at the end if the URL. You can use this link to send directly to customers that you are offering the discount to or embed in a link.

https://checkout.loopcrypto.xyz/<entity ID>/<item ID>?coupon=<ID>

Please note, the cart will not update to display the discount code. Thus, we recommend that you hide the cart.

  1. Invoice

After a customer provides authorization, Loop will automatically create that customer in Stripe or update an existing customer. At this time we will tell Stripe that the coupon should be applied. When Stripe generates the invoice, it will include the logic of the coupon and this will be pulled into Loop just like all invoices are.

Percentage or fixed amount discount Apply to specific products Forever, once, and multiple months duration

Limit the date range Max redemption: this is set on the promotion code

✅
✅
✅
❌
❌