Understanding TurinPay
What is TurinPay?
At its core, TurinPay is more than just a payment processing system; it’s a bridge connecting traditional e-commerce to the revolutionary world of cryptocurrency. In an era where digital transactions are the norm, TurinPay stands as a testament to innovation and forward-thinking.
- Innovation Meets Tradition: TurinPay seamlessly blends the advanced technology of Bitcoin's Lightning Network with the familiar structure of online shopping carts. This ensures that while your business stays ahead of the curve, your customers enjoy a user experience that feels intuitive and straightforward.
- Safety First: Cryptocurrencies can sometimes be daunting due to their decentralized nature. However, TurinPay prioritizes security. By ensuring that API keys are never exposed on the frontend and by using the robust structure of the Lightning Network, it offers a payment solution that’s both secure and efficient.
- Global Reach, Local Feel: One of the standout advantages of cryptocurrencies is their universal appeal. With TurinPay, businesses can cater to a global audience without the hassle of currency conversions, while customers enjoy a local shopping experience regardless of their geographical location.
- Eco-Friendly Transactions: The Lightning Network, which TurinPay utilizes, offers a more environmentally-friendly approach to Bitcoin transactions. Compared to mainnet Bitcoin operations, the Lightning Network consumes significantly less energy, making TurinPay a green choice for e-commerce.
- Future-Ready: As the world leans more towards digital currencies, integrating TurinPay now means your business is prepared for the future. It’s not just about accepting Bitcoin; it’s about embracing a shift in global transaction trends.
Watch the App in action
Preparing for TurinPay Installation
For Developers:
Before diving deep into the integration of TurinPay's API into your e-commerce platform, it's essential to understand what's required. While we've done our best to simplify the process, some technical familiarity will ensure a smooth experience. But to get the FULL instalation process head over to our whitepaper where everything is explained in detail.
Here's a quick overview:
Equip with Knowledge:
- GraphQL: TurinPay leverages GraphQL for server requests. This modern query language allows you to request specific data, making your e-commerce operations more efficient.
- WebComponents: The TurinPay library, @turinlabs/turinpay, is built on WebComponents. Familiarity here will aid in seamless frontend integration.
- Registration & API Keys:Before any coding, you'll need to register on the TurinPay website. Registration will grant you two types of API keys:
- Development Key: For testing and ensuring everything functions as expected.
- Production Key: The real deal! This key is initially disabled and becomes active only after you clear the KYB (Know Your Business) stage.
A word of caution: Keep these keys confidential. They're your pass to the TurinPay world. Always use them on the backend to ensure security.
TurinPay's Simple Workflow:
Integrating TurinPay might seem like a complex task, but when broken down, it's simple:
- Backend Action: With your API key in hand, configure a payment intent. This intent essentially signifies the beginning of a transaction process.
- Frontend Magic: Utilize the @turinlabs/turinpay library. Here, you'll need the paymentIntentId, which was generated in the previous step.
- Making the Payment: The generated invoice can be paid using any Lightning Network wallet. However, if you're using the development API key, payments are made on the Lightning Network Testnet, a safe space for testing.
- Double Confirmation: Once a payment goes through, you'll receive confirmation on both the frontend (via an event) and the backend (via a webhook). This double-layered confirmation ensures no transaction goes unnoticed.
Webhooks:
Webhooks in TurinPay aren't just traditional notification mechanisms; they are the lifeline for real-time updates. The most crucial event? The Invoice paid event. When an invoice related to a Payment Intent is paid, this event springs into action, confirming the transaction's success and ensuring the funds are transferred appropriately.
In essence, integrating TurinPay is like assembling a jigsaw puzzle. Each piece, from GraphQL to Webhooks, plays a critical role. And once assembled, you have a robust, efficient, and futuristic payment gateway, ready to elevate your e-commerce platform.
The fun Part: How to Test TurinPay on Coolblockers Shop
Making a purchase using Bitcoin, especially on a test environment, might seem daunting for newcomers. However, with TurinPay’s seamless integration into the Coolblockers shop, the process is straightforward and user-friendly. If you’re looking to understand how TurinPay functions before integrating it into your platform or simply curious about how Bitcoin payments work, here’s a simple guide to help you test the system.
1. Setting Up Your TurinWallet
TurinWallet stands out in the Bitcoin wallet arena, thanks to its unique “developer mode.” This mode allows you to make testnet payments without needing actual test BTC in your wallet. Here's how to get started:
a. Download the TurinWallet APP:
b. Once the app is installed, open it and sign up.
c. Navigate to the settings. Tap on “Settings”, followed by “Account”. Here, select the "Developer mode". This mode will allow you to test transactions without using real Bitcoin.
2. Shopping on Coolblockers.com
With your TurinWallet set up in Developer mode, head back to the Coolblockers shop to experience the purchasing process.
a. Browse through the shop and select your desired product. Ensure that you’re in the LN testnet mode for this testing phase.
b. Once you've chosen your product, click on "pay", which will direct you to the shopping cart.
c. Proceed to checkout by clicking on "pay with TurinPay". An invoice will be generated, which you'll need to settle using TurinWallet.
3. Making the Payment
Now, it’s time to simulate the payment process using your TurinWallet.
a. Open your TurinWallet APP and locate the flask icon. This represents the testing environment due to the app being in Developer mode.
b. Tap on the icon and use the app to scan the invoice provided by Coolblockers.
c. Once the invoice is scanned, go ahead and authorize the payment. Remember, you won’t actually be using real Bitcoin for this test, so you won’t lose any funds. The app mimics a real transaction using the BTC testnet on your behalf.
Wrapping Up:
Congratulations! You've successfully simulated a Bitcoin payment using TurinPay on Coolblockers shop. The entire process is designed to be ultrafast, straightforward, and cost-effective, with transaction fees ranging between 0.75%-4% of the total payment, measured in satoshis. This simulation offers a glimpse into the future of e-commerce, demonstrating how integrating TurinPay can elevate the customer experience by offering a secure, efficient, and innovative payment method.