Skip to main content

upsertPaymentGatewayConfig

Requires permission settings:integration:update.

Creates or updates the credentials and settings for one payment provider. Credentials are stored encrypted, and a credential field the provider does not define is refused. Enabling the gateway is a separate step: setPaymentGatewayEnabled.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation UpsertPaymentGatewayConfig($input: UpsertPaymentGatewayConfigInput!) {
upsertPaymentGatewayConfig(input: $input) {
id
configuredSecretKeys
enabledMethods
environment
isEnabled
provider
nonSecretValues {
key
value
}
}
}

Variables:

{
"input": {
"credentials": [
{
"key": "string",
"value": "string"
}
],
"environment": "LIVE",
"provider": "PEACH"
}
}

Response:

{
"data": {
"upsertPaymentGatewayConfig": {
"id": "id",
"configuredSecretKeys": [
"string"
],
"enabledMethods": [
"string"
],
"environment": "LIVE",
"isEnabled": true,
"provider": "PEACH",
"nonSecretValues": [
{
"key": "string",
"value": "string"
}
]
}
}
}
upsertPaymentGatewayConfig(
input: UpsertPaymentGatewayConfigInput!
): PaymentGatewayConfigGql!

Arguments​

upsertPaymentGatewayConfig.input ● UpsertPaymentGatewayConfigInput! non-null input​

The gateway configuration to create or update.

Type​

PaymentGatewayConfigGql object​

The organization's setup for one payment provider. Secret credentials are never returned.