Skip to main content

testPaymentGatewayConnection

Requires permission settings:integration:update.

Verifies the stored credentials for one provider by calling it. When the provider rejects them, the error carries the provider's own message. Verified keys are required before the gateway can be enabled.

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 TestPaymentGatewayConnection($provider: PaymentGatewayProvider!) {
testPaymentGatewayConnection(provider: $provider) {
keysCheckedAt
keysValid
needsReverification
testPaymentAt
webhookReachable
}
}

Variables:

{
"provider": "PEACH"
}

Response:

{
"data": {
"testPaymentGatewayConnection": {
"keysCheckedAt": "string",
"keysValid": true,
"needsReverification": true,
"testPaymentAt": "string",
"webhookReachable": true
}
}
}
testPaymentGatewayConnection(
provider: PaymentGatewayProvider!
): PaymentGatewayVerificationGql!

Arguments​

testPaymentGatewayConnection.provider ● PaymentGatewayProvider! non-null enum​

The payment provider whose stored credentials to test.

Type​

PaymentGatewayVerificationGql object​

The result of checking a gateway's credentials, webhook and test payment.