connectAppPaymentGateway
Requires permission settings:integration:update.
Connect an installed payment app as a payment gateway, or reconnect it. Issues a new signing secret (shown once; any earlier secret stops working), sets the environment, and leaves the gateway switched off until it passes testAppPaymentGateway and is 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:
- GraphQL
- cURL
mutation ConnectAppPaymentGateway($environment: PaymentGatewayEnvironment!, $installationId: ID!) {
connectAppPaymentGateway(
environment: $environment
installationId: $installationId
) {
signingSecret
config {
id
environment
isEnabled
secretIssued
unavailableReason
updatedAt
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ConnectAppPaymentGateway($environment: PaymentGatewayEnvironment!, $installationId: ID!) {\n connectAppPaymentGateway(\n environment: $environment\n installationId: $installationId\n ) {\n signingSecret\n config {\n id\n environment\n isEnabled\n secretIssued\n unavailableReason\n updatedAt\n }\n }\n}",
"variables": {
"environment": "LIVE",
"installationId": "id"
}
}
EOF
Variables:
{
"environment": "LIVE",
"installationId": "id"
}
Response:
{
"data": {
"connectAppPaymentGateway": {
"signingSecret": "string",
"config": {
"id": "id",
"environment": "LIVE",
"isEnabled": true,
"secretIssued": true,
"unavailableReason": "string",
"updatedAt": "2025-01-15T00:00:00Z"
}
}
}
}
connectAppPaymentGateway(
environment: PaymentGatewayEnvironment!
installationId: ID!
): AppPaymentGatewayConnectionGql!
Arguments
connectAppPaymentGateway.environment ● PaymentGatewayEnvironment! non-null enum
TEST or LIVE payments.
connectAppPaymentGateway.installationId ● ID! non-null scalar
The installed payment app.
Type
AppPaymentGatewayConnectionGql object
A payment app connection with its new signing secret. The secret is shown this once.