# Payment Settings
# Get PayPal API credentials
If you want to receive payment via PayPal, create your API by clicking here.
Steps
API Creation
- Sign in
- Click My Apps & Credentials on the left menu.
- Select the type of API you want to choose (Sandbox or Live) and click the Create App button.
- Type a name you want in App Name and click the Create App button.
- You will get your Client ID and Secret key that you created on this page.
Note
Please do not close this page, Webhook settings will also be made on this page.
Updating the .env file
- Open the .env file with a text editor.
- Fill in the relevant field depending on the type of API you created (Sandbox or Live).
#PayPal API Mode
#Values: sandbox or live
PAYPAL_MODE=sandbox
#PayPal Setting & API Credentials - Sandbox
PAYPAL_SANDBOX_CLIENT_ID="Write your sandbox client id here"
PAYPAL_SANDBOX_CLIENT_SECRET="Write your sandbox secret here"
We highly recommend testing your API in the sandbox mode. You can change PAYPAL_MODE to live after making sure everything is okay.
Note
If the package duration is unlimited, PayPal Subscriptions will not be listed in the payment methods list.
# PayPal Webhook Settings
Webhook settings are required for PayPal to send payment notification to your system when Subscription payments are made.
To get the PayPal Webhook URL, click the Payment & Listing Settings link under the Settings tab in your site's dashboard and copy the PayPal Webhook URL.
Return to the PayPal developer console, click the Add Webhook button at the bottom of the page and paste the PayPal Webhook URL into the Webhook URL, then select all events and click Save.
Tip
In case of a possible problem, the selection of all events is important for faster analysis of the problem.
Copy the Webhook ID and open the .env file again with a text editor and change the following part.
#PayPal Webhook ID
PAYPAL_WEBHOOK_ID="Write your Webhook ID here"
# Get Stripe API credentials
If you want to receive payment via Stripe, create your API by clicking here.
Steps
API Creation
- Sign in
- Click on the Developers tab in the top menu.
- Click on API Keys tab in left menu
- Copy Publishable key and Secret key
#Stripe API Credentials
STRIPE_KEY="Write your sandbox client id here"
STRIPE_SECRET="Write your sandbox secret here"
#Cashier Currency
CASHIER_CURRENCY="USD"
CASHIER_CURRENCY_SYMBOL="$"
Note
Unlike other payment methods, the currency and currency symbol must be set in the .env file. For other payment methods, the currency and currency symbol need to be set on the Payment & Listing Settings page under the Settings tab in your dashboard.
The minimum amount is $0.50 or equivalent. If the package price is below this amount, Stripe will not appear in the payment methods lists.
# Get Coinbase API credentials
If you want to receive payment via Coinbase (Cryptocurrency Payments), create your API by clicking here.
Steps
API Creation
- Sign in
- Click on your email address in the top left menu, then click on Settings.
- Click the Security tab and click the New API Key button.
- Copy the API key
Note
Please do not close this page, Webhook settings will also be made on this page.
Updating the .env file
- Open the .env file with a text editor.
- Fill in the API key.
#Coinbase API Credentials
COINBASE_API_KEY="Write your API key here"
COINBASE_API_VERSION="2018-03-22"
The latest API version is 2018-03-22
. You can check the latest API version by clicking here.
# Coinbase Webhook Settings
Webhook settings are required for Coinbase to send payment notification to your system when payments are made.
The Endpoint URL you should use for Coinbase is https://yoursite.com/api/coinbase/webhook.
Click the Notifications tab in the Coinbase dashboard and click the Add an endpoint button at the bottom of the page, paste the Endpoint URL and click the Save button.
After that click on Show shared secret button and copy Webhook Shared Secret.
Open the .env file again with a text editor and change the following part.
#Coinbase Webhook Secret
COINBASE_WEBHOOK_SECRET="Write your Webhook secret here"