Getting setup
Integration time: 2 minutes
Last updated
Integration time: 2 minutes
Last updated
Before getting started please you'll need an account with Loop. Reach out to your contact at Loop to help with this.
If you have more than 100 products in Stripe, please let Loop know so we can ensure all your products are properly pulled into Loop.
Create an API key and send it to your contact at Loop using foxcry.pt or another secure method.
Loop will then use the API key to create a webhook with Loop’s endpoint, which Loop will use to update Product, Price, and Invoice information. And that’s it!
Additionally, please let us know:
Where funds ought to be sent (Inbound treasury address) for each network (it can be the same address)
What email customers can use to get in touch with you (this is used as part of our automated emails)
Go to the “developer” tab in the top right corner, click on API key, and create a new “restricted” key
Create a key with the following permissions (these should all be set in the "Permissions" column, not the "Connect Permissions" column):
Write permissions
Customers
Products
Invoices
Prices
Subscriptions
Webhook Endpoints
Read Permissions
Events
For production API keys, securely send Loop this key using foxcrypt (https://foxcry.pt/). Enter the key as the message, and foxcrypt will generate a one-time URL that Loop will use to view the key.
Note: Your restricted key should start with "rk_", not "pk_". "pk_" denotes a publishable key, which does not have permissions needed for this integration.
Note: Loop will then programmatically create a webhook to consume status updates from Stripe. No action is required in this step.
Some reference information about the webhook event types that Loop consumes:
product.updated, product.deleted, product.created
Product fields in Stripe that we use for part of our item
price.updated, price.deleted, price.created
Price fields in Stripe that we use for part of our item
invoice.created, invoice.finalized
Invoice flow for creating transfers
One of the great features of Loop's integration with Stripe is that you can continue to use Stripe's webhooks for any automations you have. Since Loop updates the Customer and Invoice record automatically, Stripe webhooks continue to fire.
However, you should note, when a Loop payment occurs, a payment_intent.canceled
event is emitted. This is because Stripe will want to charge the payment method on file (fiat). Thus, Loop cancels this event and instead updates the invoice to be "paid outside of Stripe." The invoice.paid
event will emit once the payment takes place on chain and Loop marks the invoice as paid.
If you're collecting payment in both fiat and crypto, we recommend you listen to both the payment.intent_succeeded
and the invoice.paid
events to ensure you are notified of a payment. Technically, you could only listen to the invoice.paid
as this event fires whenever an invoice's payment status changes to Paid.
For crypto payments, only the invoice.paid
event in Stripe will be emitted.