Follow these steps to connect your Stripe account to GoMeddo Payments through the API. You create a restricted key in Stripe and register it as a payment provider. GoMeddo Payments then creates the webhook in Stripe for you.
Before you start: you need an access token and your account id, see Authenticating. To connect Stripe from Salesforce instead, see Configure a Stripe payment provider.
Create a restricted key in Stripe
-
Log in to your Stripe dashboard.
-
Click Developers, then API Keys.
-
Create a Restricted Key with only these permissions: Write on Checkout Sessions, Write on Webhook Endpoints, and Read on Accounts.
-
Copy the key.
GoMeddo Payments needs Write on Webhook Endpoints to create the webhook for you. For the full steps in the Stripe dashboard, see Configure a Stripe payment provider.
Add Stripe as a payment provider
Call Create Payment Provider as described in Configure a PSP, with STRIPE as the provider and the restricted key as api_key:
{
"provider": "STRIPE",
"credentials": {
"api_key": "<your-restricted-key>"
}
}
GoMeddo Payments checks the key, stores the provider, and creates a webhook endpoint with the description GoMeddo Payments in your Stripe account. Stripe sends the checkout session events to that endpoint, so payment status updates reach GoMeddo Payments without further setup. You don't have to create the webhook or share its signing secret.
Stripe limits the number of webhook endpoints per account. When that limit is reached, GoMeddo Payments returns an error and doesn't create the provider. Delete a webhook endpoint you no longer use in Stripe and call Create Payment Provider again.