Configure a PSP

To take payments through the API, you add your payment service provider (PSP) to your GoMeddo Payments account. You create the API keys in your PSP account first, and then send them to GoMeddo Payments with the Create Payment Provider endpoint.

Before you start: you need an access token and your account id, see Authenticating. You also need the API keys of your PSP account. For Stripe, see Configure Stripe. For an overview of the API, see GoMeddo Payments API only.

Add the payment provider

Call the Create Payment Provider endpoint, POST /v1/account/{accountId}/providers, with a body like this:

JSON
{
    "name": "Stripe main account",
    "provider": "STRIPE",
    "credentials": {
        "api_key": "<your-restricted-key>"
    }
}

Field Name

Required

Description

name

Yes

A name for the provider, so you can tell your providers apart.

provider

Yes

The PSP, for example STRIPE or ADYEN.

credentials

Yes

The API keys from your PSP account. Which keys you need depends on the PSP, see the table below.

The credentials object takes these keys:

Provider

Credentials

STRIPE

api_key: the restricted key from your Stripe account.

ADYEN

x_api_key: the API key from your Adyen account. merchant_account: your Adyen merchant account. platform: the Adyen environment, test or live. For live, also add live_endpoint_prefix: the prefix of your live Adyen endpoint.

GoMeddo Payments checks the credentials with the PSP and stores them in a secret store, not in its database. For Stripe and Adyen, it then creates the webhook in your PSP account, so payment updates reach GoMeddo Payments without further setup.

The response returns the new provider with its provider_id. You use the provider_id in later calls, for example to start a transaction.

When the call fails

GoMeddo Payments doesn't create the provider when:

  • It returns 400 with Invalid credentials: the PSP rejected the API keys.

  • It returns 400 with field errors: a required field is missing, or provider has a value GoMeddo Payments doesn't support.

  • It returns 422: GoMeddo Payments could not create the webhook in your PSP account. The message tells you why.

API documentation

The full API documentation lists every endpoint and its parameters: