Skip to main content
Loop allows you to easily charge a Customer’s paymentMethod without having to ask the user to take an action. To do this, you will need the customerId or paymentmethodId.

How authorizations work

When a customer is created in Loop, the pay widget will have the payer set a minimumAuthorizationUsdAmount. This amount represents the maximum cumulative total the payer authorizes you to charge their wallet. With each successful payment, the amount decreases. Thus, we suggest that at the first payment you set a high minAuthorizationAmount. Please note, the wallet owner can increase or decrease their authorization amount at any time. Thus, we suggest you check the balance and authorization, described here.

Create a payin

Call the create payin endpoint to create a payment. Payins can be created at any point prior to or when a payment is due. A payin that is create with a billDate that has passed will be processed immediately. Payins process on their billDate only if the paymentMethod has a preAuthorization balance and authorization that is equal to or above the amount. If this is not the case, the payin will sit in scheduled while Loop retries every 3 minutes for 7 days. The payin will charge the default paymentMethod associated with the customerId. You can optionally pass in another paymentMethodId to not charge the default. The payin will respond with the status ( preAuthorization balanceandauthorizationon) of the customer's paymentMethod.

Listen to webhooks

When a payment confirms onchain, the payment.processed webhook will fire. If there is a pending payin that is 10 minutes past due, the missed.payment webhook will fire.
I