Stripe: A Fully Integrated Suite of Payments ProductsDeepak Sharma
- What actually Stripe is?
- Creating Stripe Account & Getting API Key
- How to install client library?
- How to install stripe using compose?
- Core Resources
What actually Stripe is?
Stripe is a platform that creates products for online payment.
Stripe’s products power payments for online and in-person retailers, subscriptions, businesses, software platforms, and marketplaces.
Stripe provides APIs which facilitate online payment to web applications and mobile applications.
Creating Account and Getting API key
To start with Stripe, a Stripe account is needed. After Signing up or signing in, Stripe provides a dashboard where all the transaction details, supports, Test API key, Live API Key, etc. available.
o API key: API Key is the way which is used to authenticate the request to make payment.
o There are two types of API keys.
|Test API Key|
Test API Key is used for testing purposes. It won’t communicate with your bank networks.
|Live API Key|
Live API Key is used on the production level where payments are actually made.
o Both API Keys are available on the dashboard where the stripe login page redirect after a successful login or sign up.
o Test key is easily available on the dashboard, just copy the test key and set it in the application and enjoy the online payment feature at the testing level.
o To implement Live API Key in the product Stripe accounts need to be activated. To activate an account, Stripe needs some valid information about the product or services for which stripe is implementing.
Each request to make payment using Stripe is Authenticated by API Key. This key does so many things like-
o it differentiates payment requests. In simple words, the API key is unique to every stripe customer. It tells the stripe server that the current coming payment request belongs to which stripe customer otherwise someone else payment will go to someone’s account.
o Stripe server uses API to recognize the request that it is coming from Stripe client (Web application), validate that, and do further processes to make a payment request successful.
o Test API Key has the prefix “sk_test _“.
o Whereas Live API key has the prefix “sk_live_”.
Creating a Stripe Client Object which takes API Key as an argument whether it is a Test API key or Live API Key.
|$stripeClient = new \Stripe\StripeClient(“sk_test_51I1UreFwExyTgnhXgeQQXaKHHHemLhl6HKM2JeSyV9pyF7P4B1Dleo3WGKWYSbN3RACaY5C8AoHypxrkPtYtJwRf002LHooBSF”);|
o Tokenization is the process Stripe uses to collect sensitive card or bank account details, or personally identifiable information, directly from customers in a secure manner. A token representing this information is returned to your server to use.
|$stripeClient = new \Stripe\StripeClient( ‘sk_test_51I1UreFwExyTgnhXgeQQXaKHHHemLhl6HKM2JeSyV9pyF7P4B1Dleo3WGKWYSbN3RACaY5C8AoHypxrkPtYtJwRf002LHooBSF’);$stripeClient ->tokens->create([ ‘card’ => [ ‘number’ => ‘4242424242424242’, ‘exp_month’ => 12, ‘exp_year’ => 2021, ‘cvc’ => ‘314’, ],]);|
o Customer Objects allow you to perform recurring charges, and to track multiple charges, that are associated with the same customer. The API allows you to create, delete, and update your customers.
|$stripeClient = new \Stripe\StripeClient( ‘sk_test_51I1UreFwExyTgnhXgeQQXaKHHHemLhl6HKM2JeSyV9pyF7P4B1Dleo3WGKWYSbN3RACaY5C8AoHypxrkPtYtJwRf002LHooBSF’);$stripeClient ->customers->create([ “description”=>”First time payment”,“email”=>”[email protected]”,“name”=>”Anuj Pathak”,“phone”=>”987643211”,“payment_method”=>”card”]]);|
Contact Us to Custom Software Platforms and Marketplaces Development