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
  • Enabling and collecting payments
  • Authorization management
  1. Technical Docs
  2. Integrating the Loop Protocol into your dApp

Loan platforms (credit cards, BNPL)

E.g. credit cards, buy now pay later,

Applications enabling loans for on-chain assets (e.g. buy now, pay later) or lenders that utilize on-chain payments (e.g. credit cards for DAOs) can enable auto-repay for borrowers with Loop. Below outlines a typical flow for such applications. If you require a different use case, please reach out to Loop at hello@loopcrypto.xyz or grab a time on our calendar to discuss.

Enabling and collecting payments

Use Loop's modal to allow your end user to provide repayment authorization

Loop's modal allows applications to easily collect the requisite payment authorization. We suggest embedding this modal as part of the loan origination process and/or on a repayment page.

To implement, pass in the itemID for the default item called "Loan" (this is automatically created by Loop). You can get the itemID with the GET request. This item allows for repayment in any of the ERC-20 tokens in the default token list. You can modify this list with no-code on the company dashboard or using the PATCH request.

Payers will connect the wallet they are paying from to this modal, choose the token they will repay with and provide authorization. You will receive a webhook notifying you of the new authorization.

Tell Loop about the payments due

In order to process payments, a transfer request needs to be created, signed, and sent to Loop's API for each payment date. If the payment details are known ahead of time, you can sign and send the transfer requests preemptively. When a payment has been made on-chain, you will receive a webhook.

Your application may not store repayment information on its own servers but reference information stored on-chain. That’s OK! The key here is sending the information securely to Loop using the API key and signing the transaction, and, of course, the bills are dated correctly for any future payments. Thus, your application will be responsible for grabbing the data and telling Loop about the payment.

That's it for collecting payments.

Authorization management

How payers can disable autopay

Your users can disable autopay while retaining their payment authorization. This does not cancel their loan or remove any payment obligations. You can add a button on your website that calls the Loop API directly and cancels a user, resulting in any transfer requests outstanding to be automatically canceled. Loop provides webhooks to notify you of a cancelation.

How payers can manage their allowance

Natively in the modal users can set their allowance to any amount, thus users can set their allowance to zero, effectively removing the ability to autopay.

If you choose, you can add a button on your website that opens metamask to send a transaction that sets the allowance to zero.

PreviousPayroll applicationsNextSecurity

Last updated 1 year ago