Stripe is an affordable and developer friendly payments platform that can handle almost any payment scenario you need.
Gravity takes care of the hard-work of creating and managing subscriptions in your application, but you will need to create a Stripe account and configure a few settings before you can start processing payments and making some sweet dolla.
Head over to Stripe and create your account. Setup is free – you'll only be charged a small fee on each transaction that you process.
Once you've registered and signed in to your account, you'll be presented with your Stripe dashboard.
Stripe has two development modes:
Test mode is a great feature that enables you to build and test your payments engine without using your real credit cards and making your significant other angry. You can use test card numbers to test different scenarios and error messages.
Go ahead and toggle the View Test Data switch in the left sidebar menu to start working in test mode.
Next, click on Products and click the + Add Product button.
Enter a product name (the name of your application), description and statement descriptor here, which is the name that will appear on your customer's credit card statement (it's only required in live mode).
Next screen you can creating your pricing plan(s).
Select Standard pricing, set the price and currency and set the interval to recurring to create a subscription. You can also set the billing period here.
If you'd like to offer a trial period, you can add the number of trial days into the Trial period box. If you want to offer multiple pricing plans, simply repeat this step again for each price plan.
Finally, make a note of the API keys. Stripe has two API keys:
Publishable Key (used client-side)
Secret Key (used server-side)
There are two sets of keys for working with live data and test data. During development, you'll use the test API keys, but when you deploy your application – ensure you switch these to the live keys.
Click on Developers > API Keys
Copy the API keys somewhere safe for now. You'll need them soon.
That's it for Stripe! There are a lot of other options you can customise. Please refer to the Stripe Documentation for further information.