Create Stripe Connection
Prerequisites
- A Commerce company id.
- A Stripe account.
Step 1
Retrieve your Stripe API key
.
Follow the Stripe Docs and retrieve either a test or live API key
to use in the next step.If you create a restricted API secret key, the Commerce API requires the following permissions:
Resource | Permission |
---|---|
Balance | Read |
Charges | Read |
Webhook Endpoints | Read and Write |
Step 2
Create a new Settlement Connection for Stripe.
In this step, we're creating a new settlement connection with theAPI key
you got from your Stripe Dashboard.Note:
The Commerce API will automatically create a webhook in stripe when a connection is created, which will used to receive charge events. You can view your webhooks and their statuses in the stripe webhook dashboard.
Loading...
Test Connection
If you used a Stripe test API key, you can simulate webhooks to test that the Settlement Connection is able to receive transactions.
Prerequisites
- A settlement company id.
- A settlement connection id.
Step 1
Simulate webhooks with the Stripe CLI
- Download and install the Stripe CLI.
- From the command-line, log in to stripe with the
Stripe CLI
.
stripe login
- Trigger Stripe
charge.captured
events.
stripe_cli\stripe.exe trigger charge.captured
Note:
You can find more information about testing Stripe webhooks here.
Step 2
GET
Transactions for your Settlement Connection
Warning:
It may take up to 10 minutes for transactions to become available after a Stripe event is captured.
Loading...