White-label Overview
Below are high level steps to implementing Loop.
Getting set up
1. Create your account
The first step is to create an entity. Here you will be able to set the payoutDestination
, defining where payments should be sent, as well as the paymentTypes
, defining the tokens
and networks
that an end User can pay Merchants. If the payout destination is a bank account, you will need to contact Loop to complete KYB.
Relevant API: Create entity
Relevant Guide: Create your entity
2. Configure merchants (optional)
By default, your entity is a Merchant, and can receive payments to it's payoutDestinations
. If you a platform supporting other Merchants, you may want to configure these Merchants in Loop so they can have their own unique payout destination
and accepted tokens
, networks
and their payments are kept seperate.
Relevant API: Create merchant
Relevant Guide: Creating merchants
3. Configure webhooks
If you are using Loop for subscriptions or are not using our Pay component, you will need to configure webhooks to hear about payment confirmations and failures.
The only field thats required in the create webhook request is the postUrl
which is where the webhook will be sent to (it does allow for more detailed control but thats the easiest setup). Once that's configured, the URL that you configured will get an event each time a payin
is created and when the payin
is processed on chain.
Relevant API: Create webhooks
Relevant Guide: Webhooks
4. Set up your payment gateway
Before you can charge a customer, you must create a customer
with a paymentMethod
in Loop and then get the wallet's approval.
The easiest way to enable this is by embedding Loop's Pay component in your checkout process. When the Pay component is used, it will create a customer
and paymentMethod
, initiate the requesit transaction to get the wallet's approval, and initiate your first payin
. Our components are configurable, embeddable web components designed to simplify your integration to Loop while retaining your platform's look, feel and control of your Merchant and User's experience.
If you would like to not use Loop's component, you can create the customer
, paymentMethod
and gather the approval yourself. Here are directions and sample code to get the wallet's approval.
Relevant API: Create customer
Revenant Docs: LoopConnect Library
Implementation video: Demo video
Taking payments
5. Take the first payment
With Loop's Pay Component
When initiating the Pay component, you will tell the component which Merchant is being paid and for how much. Using the MerchantId
, the component will show only the pre-configured networks
and tokens
. The User will be able to connect their wallet and click Pay. This will initiate:
- Creating the
customer
in Loop - Assigning that
customer
apaymentMethod
based on thenetwork
andtoken
they select and marking that method asdefault
- Initiate the first payment using the parameters passed in
- Check the
paymentMethod
’s status to confirm the payment will be successful - Respond with any steps to rectify errors (e.g. low balance or low authorization)
- Initiate the Create payin if authorization and balance checks have passed
- Respond with any success or error codes as well as the
customerId
that is used to send additionalpayins
for this customer
With Loop's APIs to take the first payment
If you are not using the component, then you will need to repeat each of the steps above by calling our API endpoints.
- If not already done, you will need to create the
customer
with apaymentMethod
by calling the Create customer endpoint- The
paymentMethod
’s status will be included in the response
- The
- Send a
payin
request if authorization and balance checks have passed using the Create Payin endpoint - Listen to webhooks for response
6. Send Loop subsequent payments (e.g. recurring payments)
While the Pay component allows Merchants to get paid for the 1st payment, all subsequent payments must be sent using the Create Payin endpoint.
Recurring Payments Best Practices
Balance and Authorization Verification
(Recommended) Verify wallet balance and approval status before processing payments.** For Loop to initiate a payment, the payer's wallet must have sufficient balance and approval amounts that equal or exceed the charge amount. Use the customers
or payment methods
endpoints and check the preAuthorization
parameter to verify these amounts.
Relevant API: Get customer, Get Payment Methods
Revenant Docs: Payment Methods
Customer Communication
(Recommended) Send proactive reminder emails to customers about potential payment issues before they occur.
Payment Method Management
(Recommended) Implement Loop's pre-built widget that allows customers to manage their saved payment methods. The widget enables viewing, editing authorization amounts, adding new methods, and setting defaults. Embed this on your customer management page for easy payment method management.
Revenant Docs: PaymentMethods component
How Loop Handles Payments
Processing & Retries
When payins comes due, Loop checks wallet balance and authorization every 10 minutes. Once sufficient funds and approval are confirmed, the transaction is sent on-chain. This process virtually eliminates transaction failures.
Potential Failures
Transactions can only fail if someone maliciously moves funds or changes approvals between our balance check and transaction submission. This requires:
- Developer-level blockchain knowledge
- Active monitoring of our pending transactions
- Submitting competing transactions with higher fees
On fast blockchains like Solana (millisecond confirmation times), this window is extremely narrow. If someone acts maliciously in this way, you'll notice the failure immediately and may want to reconsider them as a customer.
That's it!
Key Terminology
Entity
: The platform or merchant that owns the Loop account
Merchants
: Sub-merchant accounts (by default, the entity is also a merchant)
Payment Destinations
: Where funds settle - either wallet addresses or bank accounts
Payment Types
: Tokens and networks an entity/merchant accepts for payment
Payment Methods
: The wallet/token/network combination an end payer uses
Payins
: Payments processed by Loop, with these possible statuses:
Scheduled
- Payment scheduled for future processingPending
- Transaction sent on-chain, awaiting confirmationCompleted
- Transaction confirmed on-chainFailed
- Transaction failed on-chainCanceled
- Loop will no longer process this paymentUncollectible
- Stripe integration onlyDraft
- Stripe integration only
Customers
: End payers whose wallets will be charged
See our completeglossary for additional terms.
Updated 1 day ago