1. Log into your Primer account, go to Integrations

2. Select Stripe, click Connect

3. Go to https://dashboard.stripe.com/settings/account, copy Account ID

4. Go to https://dashboard.stripe.com/apikeys, generate new Secret key, add it to Primer


5. 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)

7. 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
8. 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
9. Add this API key to web2wave Project settings:

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

11. Generate Webhook signing

12. Add this signing key to web2wave Project settings

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


15. Enable required payment methods

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

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

19. Publish workflow (in case Publish button isn't active - contact w2w team to publish)
20. 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

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