Moving an existing subscription to pay by Loop
The steps are as follows:
In Stripe
- Ensure the payment/collection method is set to "email invoice to customer" and the "payment due" set to after "0 days after invoice is sent". This must be done manually.
- (Optional, if you want immediate payment) Finalize the bill
In Loop
- Create the Loop checkout link with the
subId
appended - Send link to customer to complete the authorization of payment via crypto
Loop will charge the customer based on the due date in Stripe. The customer will see this due date on the checkout page.
1. Ensuing the collection method
To move an existing subscription in Stripe from fiat to crypto, the billing method must be changed to "email invoice to customer" and the payment due set to "0 days after invoice is sent". You can do this manually or via API.
Manually
On Stripe, navigate to the subscription in question. Go to Actions-> update subscription in the top right corner.
Under the subscription settings, change the following:
- Payment: “Email invoice to the customer to pay manually”
- Payment due: “0 days”
- Invoice payment page: leave unchecked
API
Use the Stripe endpoint to update a subscription. Set the collection_method: send_invoice
and days_until_due:0
.
2. Optional finalizing the bill
When a subscription is set tocollection_method:send_invoice
, Stripe will by default create a draft invoice and finalize that invoice in 1 hour. This is true even if you set Stripe to bill immediately.
Loop only collects on finalized Stripe invoices. Thus, if you want to ensure immediate payment, you will need to finalize the bill in Stripe.
Manually finalize
On Stripe's dashboard, navigate to the invoice you want to finalize and click "Send invoice." This will finalize the invoice and it will change from "draft" to "open."
Note, you may want to send the invoice to yourself as this invoice may have fiat payment methods that could confuse the end customer.
API
You can change the due_date
on the invoice to the current timestamp with this Stripe method and force an invoice to finalize immediately with this Stripe method. Also, best practice is to set the due_date
to now + 2 seconds
to account for any processing time on Stripe's side (invoices cannot be due in the past). Be sure to keep automatic_collection:false
so Loop can collect on the payment.
3. Creating the checkout link
A Loop checkout page with the sub-id
appended to the end will connect the checkout to the subscription in Stripe. You can create the checkout link manually or programmatically.
Please note, we do not validate sub-ids. Thus, a customer will be able to successfully provide authorization to the Merchant but no record will be created in Stripe and no funds will be moved. Thus, we strongly suggest you test the sub-id is working properly.
Manually
- Get the Subscription ID from Stripe by navigating to Customers -> Select the customer -> Select the Subscription -> Subscription details.
- For example: sub_1N4pReEsKlmFX3FHH40hJAC5
- Navigate to Loop's company dashboard. Use the "create dedicated checkout link for an existing customer" to add in the
sub-id
and get the associated link.
API
To create the URL, you need to know the itemID
. To get this, you can call the GET Items endpoint to get a list of all the Loop items, and find the subscription's item based on the externalId
. Once you have the itemID
you can construct the payment link.
https://checkout.loopcrypto.xyz/<entity-id>/<item-id>?sub=<sub-id>
Updated 2 days ago