1. Log into your Primer account, go to Integrations

2. Login in Stripe first -> Select Stripe -> click Connect -> Choose your Stripe account
The same procedure is for prod and sandbox. When you setup sandbox mode, don't forget to turn stripe to test mode as well

3. Go to https://dashboard.primer.io/developers/apiKeys, click New Api Key
Add name like "Stripe webhook key", select "Third Party Webhook Trigger".
Copy created API key


Or "Developers > Webhooks" section.
Click "Add webhook" / "Add destination"

Select events payment_intent.succeeded, payment_intent.payment_failed, payment_intent.processing, payment_intent.canceled, payment_intent.amount_capturable_updated, charge.dispute.created, and charge.dispute.closed, charge.refund.updated, payment_intent.partially_funded (9 in total)

In the Webhook Endpoint URL field type https://api.primer.io/callbacks/stripe?api_key=YOUR_API_KEY (it was created in Primer on previous step)

5. Go to https://dashboard.stripe.com/settings/integration, enable "Handle card information directly"

‼️ If it's not available - go to Customer Support Form, send them the message
- Question: Request to enable raw card data APIs
- Message text: I would like to request that Stripe enable raw card data APIs for my account
- Upload ZIP file: https://drive.google.com/drive/u/1/folders/1Vj9vkqjjPkoUnt8FBgb-K4ttkzVgtR-R
- After request will be approved, the option will be enabled
6. Go to https://dashboard.primer.io/developers/apiKeys and Create an API Key with access:
- client_tokens:write
- transactions:authorize
- transactions:read
- transactions:refund
- payment_instrument:read
- payment_instrument:write
Copy this API key
7. Add this API key to web2wave Project settings:

Create new webhook, check ALL Triggers https://YOUR_PROJECT_ID.web2wave.com/primer/webhook

9. Generate Webhook signing

10. Add this signing key to web2wave Project settings

11. To "Payment descriptor" field add "YOURAPPNAME {hash}" - optional
12. Go to Integration in Primer, click into connected Stripe account, then click Edit


13. Enable required payment methods

14. Go to https://dashboard.primer.io/workflows-v1, create new Workflow by file import

15. Download this ZIP file, upload it to Import file above
16. Go to created Workflow, set up in Authorize payments section:
- Processor
- Merchant account

17. Publish workflow (in case Publish button isn't active - contact w2w team to publish)
18. Add Apple Pay integration
Go to https://dashboard.primer.io/integrations

Enter your domain and download the file Open the file - copy whole document - go to web2wave - project - stripe

Put it here so you can verify your domain and then save settings in w2w and Primer as well

19. Go to
https://sandbox-dashboard.primer.io/checkout, enable payment methods, Publish
