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
  • Configuring platform fees
  • Collecting payments for child entities
  • 1. Create a subscription or one-time payment
  • 2. Collecting authorization
  • 3. Invoice
  • 4. Configuring webhooks and granting access
  • 5. Cancellations
  1. Dashboard functionality

Payments for platforms

PreviousEditing an upcoming paymentNextStripe + Loop

Last updated 1 year ago

Creator platforms and marketplaces can collect subscription and one-time payments via crypto for their platforms, collect platform fees, and allow creators to manage their own subscriptions via the use of child entities in Loop.

Platform fees can only be applied when companies are using auto-invoicing via Loop.

When a contract is deployed, an entity is created that is the parent entity. Loop allows for users to create child entities linked to the parent, and create users associated with those child entities. A feature to create child entities via the Company Dashboard is coming soon, but creating child entities via API is currently supported for parent entity users. Child entities have the same fields as parent entities. Thus, each child entity has its own branded checkout pages, list of accepted tokens, inbound treasury address, subscriptions, etc.

Configuring platform fees

Creator platforms and marketplaces can also optionally configure a platform fee to automatically be charged for any child entity payments. The fee can be configured as a percentage (ex. 5%) or a fixed amount (ex. $0.50 USD). Different platform fee amounts can be configured for each child entity, or a single platform fee amount can be configured for all child entities.

When transfer requests are created for child entities, if a platform fee has been configured, two transfers (one for the platform fee, and one for the remaining amount) will be created, and they will be processed in an all-or-nothing fashion. In other words, if the end user has insufficient allowance or balance for both of these transfers to be processed, then neither of the transfers will be processed, and the end user will be prompted to increase their allowance or balance via an email notification.

Collecting payments for child entities

Collecting crypto subscriptions and one-time payments on-chain with child entities in Loop can be done in 5 simple steps. These steps can be completed via our dashboard (no-code) or via our SDK / API calls.

  1. Create a subscription or one-time payment

  2. Collect authorization

  3. Invoice (i.e. schedule payment)

  4. Configuring webhooks and granting access

  5. Handling cancellations

1. Create a subscription or one-time payment

On the company dashboard, when logged in as a child entity user, on the "Subscriptions" and "One-time payment" pages, companies can add a new subscription or one-time payment product using the form.

When creating a subscription or one-time payment, you are able to select which tokens you want to accept by network, and you can elect to enable auto-invoicing for subscriptions, among other fields.

Once a subscription or one-time payment is added, it will be included in the table and a hosted checkout page will automatically be generated.

2. Collecting authorization

Loop provides a custom checkout page for each subscription or one-time payment item. This page can be sent directly to the end customer via email, telegram, or an externally generated invoice, or it can be embedded directly on your site in a "pay with crypto" button.

For those that prefer, Loop provides checkout widget that can be integrated in the context of your company's website or application, to enable your customers to pay with crypto. The modal allows end users to give Loop authorization to enable autopay.

3. Invoice

Once you have authorization to bill a customer, you can then schedule payments. You must choose to auto-invoice.

Loop will automatically generate the next invoice for subscriptions and one-time payments (called items) with auto-invoicing enabled based on the item's payment frequency and amount specified.

4. Configuring webhooks and granting access

Loop uses webhooks to notify you of events. You can configure these webhooks to go to Slack, Airtable or Discord to be notified immediately of a payment by simply providing an endpoint.

The AgreementSignedUp event lets you know that a wallet provided authorization to be billed - it does not mean you have been paid yet, but it does indicate the user has set an allowance for payments.

The TransferProcessed event is the payment notification and indicates funds have been sent to the receiving wallet.

Granting access

You can use the wallet address, email, or a reference ID provided in either of these events to provide access to your system.

Even with immediate invoicing, there will be a delay between the webhook events, as the transaction must be confirmed on-chain. Companies can decide to grant access based on the AgreementSignedUp event and take action if you do not hear about the TransferProcessed event within a certain amount of time, (e.g. show a warning, etc). We built Loop to be flexible, so companies can decide how "aggressive" they want to be about payment confirmation.

There are a few reasons why the TransferProcessed event would not occur:

  • The wallet does not have enough balance to cover the payment

  • The wallet does not have enough token allowance to cover the payment

  • The transaction is stuck in the mempool

  • Loop's relay network is down

Wallet amount and balance information can be found on our Company Dashboard for all active subscribers if you are troubleshooting a late payment.

5. Cancellations

Customers can cancel a subscription either:

  1. directly with the end company and the company can cancel the customer on Loop's dashboard on the Customers page or

  2. the customer can cancel directly on Loop's Customer Portal.

Regardless of method, Loop will emit a AgreementCancelled events that can be used to manage the end customer's access.

When a subscription is canceled, all future scheduled invoices will be cancelled but any currently due invoices will not be. Companies can cancel these scheduled payments without code by canceling the transaction on the company dashboard.

Companies can listen to webhooks to subscribe to events about customer-initiated cancellations.