If you sell subscription products using DAP, make sure to setup webhook notification in Stripe. This will ensure that upon subscription payment in Stripe, member’s subscription will be extended in DAP.
Here are the steps:
Step 1: Login to your stripe account.
Step 2: Click on developers >> webhooks.
Step 3: Click on add endpoint.
https://imgur.com/iyNLqq1
Step 4: Set the webhook URL to:
https://YOURSITE.com/dap/dap-stripe.php
(replace YOURSITE.com with your domain name).
Step 5: Click on "Select events to listen to"
Step 6: Select these events:
invoice.payment_failed
customer.subscription.deleted
charge.failed
invoice.payment_succeeded
invoice.payment_failedcustomer.subscription.updated
Step 7:
In DAP setup >> config page >> payment / secret key tab >> enter your stripe credentials.
How to get Stripe Live and Test Keys
1. Login to your Stripe account.
2. Click on the Developers menu, then click on API Keys.
3. Click on "Create a secret key"
https://i.imgur.com/U04fqT0.png
4. Copy the secret key and publishable key.
5. Enter live keys in SPC:
Go to SPC >> Settings >> Payment Settings page.
Click on Live Tab.
Enter Stripe keys.
6. Go back to Stripe and click on Test Mode (next to developers menu).
7. Generate secret key and publishable key for test mode.
8. Enter test keys in SPC:
Go to SPC >> Settings >> Payment Settings page..
Click on Sandbox Tab.
Enter Stripe keys.