Today, we’re excited to introduce a new way to purchase Unlock memberships with Stripe!
Stripe recently announced a new onramp mechanism and it is a great match for our membership contracts. You can test it today by buying a membership on this lock. (We’re happy to refund you if you ask!)
We have had support for credit card payments for a few years now. However, this legacy credit card payment implementation required lock managers (who deployed the membership contracts) to connect their smart contract(s) to Stripe’s payment gateway using Stripe Connect. This works great, and we’re keeping this option, but is limited in scope as Stripe Connect is not available in every country or for any kind of business.
With Stripe onramp, we’re adding support for credit card payments on a lock, even if the lock manager themselves has not connected with Stripe! For now, this feature works only for locks deployed on Polygon and Ethereum Mainnet, and only for locks priced in USDC, but soon, using our swap and purchase capabilities, this will be available for locks in any currency, provided that there is a way to convert from USDC to that currency, and for all the networks that Stripe will add support for.
How does it work?
First, I should mention that it works for both for users who have their own wallets, as well as for users who don’t have a wallet (using their Unlock Account).
When the user selects the option to checkout with Stripe’s onramp, we ask them to sign two messages (these are just signatures, without any gas spent). The first message to sign is an approval to spend the funds they will receive from Stripe, immediately after they received them. The second one is a confirmation that they want to spend these funds for a specific membership contract.
These two signatures are critical for security and helps ensure the funds they receive from Stripe cannot be spent for anything else.
Once they have signed these two transactions, they will follow the Stripe checkout flow (the one that you already find on many websites around the world). At the end of it, Stripe sends USDC to their address and Unlock Labs triggers a transaction that uses the two signatures they provided earlier to use these USDC tokens to purchase the NFT membership.
Like always in the crypto space, we’re learning as we explore! The obvious next step for us is to add support for our “swap and purchase” flow. This would add support to memberships priced in any currency, not just USDC. The flow would be nearly identical from a user’s perspective, but instead of using the USDC to purchase the membership, our contract will instantly swap it for the right amount of tokens required to purchase the membership.
Stripe has indicated that they will add support for more chains and L2s. We will of course add support for these chains as soon as they do! Finally, Stripe has also indicated that they want to explore support for recurring purchases, which we would be thrilled to add support for, on top of our native crypto recurring payments.