Connect a payment processor

Creates a payment gateway for the instance: a connection to a payment processor, set up either by authorising Shuttle at the processor (OAuth, or the processor's own embedded onboarding script) or by entering credentials into the processor's settings form. The gateway is created first and the credentials are then tested at the processor: a rejected connection is reported to the merchant but the gateway it created stays behind. When the merchant has no routing yet Merchant Setup also names the organisation legal entity, and the same call routes the new provider for every payment method it supports, which is what makes the checkout start using it. The sandbox "Skip" shortcut is the same function with the SANDBOX processor and seeded values.

Where you can do this

Before you start

  • The instance resolves to an application (the platform's product configuration for it).
  • The processor is an integration of an active or hidden vendor and has a configuration for the instance's environment: the sandbox configuration for a sandbox instance, the live one otherwise.
  • For an OAuth processor, a completed authorisation at the processor whose token is still cached; the token expires an hour after the authorisation returns.
  • For the sandbox shortcut, a sandbox instance with no connected provider and a sandbox processor that is visible to it.
  • Nothing about existing gateways: the same processor can be connected again, creating a second gateway.

Inputs

InputRequiredMeaning and constraints
namenoDisplay name. Defaults to the processor's name
codenoYour reference for the gateway. Must be unique across gateways; generated when omitted
valuesnoThe processor's settings values, as its own settings form defines them. Posted values win over values supplied by the OAuth authorisation, which win over the processor's defaults
metadatanoCustom key-value pairs stored on the gateway
tagsnoReferences for searching

Rules

Checked by the API means Shuttle refuses the request however it is sent; a screen name means only that screen refuses it, and a direct API call would be accepted.

RuleChecked byWhat you see
The body must carry a gateway object naming a processorThe APIVALIDATION_ERROR (400): "API body error: missing gateway object"
Whether the processor is visible to the instance is not checked on create; Merchant Setup offers only visible processors, narrowed by the deep link's processor list and the country filterMerchant Setup screenthe processor is not in the picker
The instance must resolve to an applicationThe APIINVALID_REQUEST (400): "Invalid endpoint"
The processor is mandatory on createThe APIMANDATORY: "validations.paymentGateway.gatewayType.notempty"
A name is mandatory; Shuttle defaults it to the processor's name, so this only bites a caller that sends an empty oneThe APIMANDATORY: "validations.name.notempty"
The reporting code must be unique across the instance's gateways; left blank it is generatedThe APIINVALID: "validations.reportingCode.nonunique"
The processor connection is tested by the provider integration before the settings are stored, and a failure rejects them. The test runs only when settings values were supplied and the processor implements a connection check; a processor without one reports the connection as unknown and always savesThe APIINVALID (400) with the processor's message: "Invalid credentials", "Connection Failed", or the processor's own text
Settings values are not checked against the processor's settings schema server-side; the processor's own save and Merchant Setup's form are the only checksMerchant Setup screenform validation
status sent on create is dropped: every gateway starts at SETUP and Shuttle moves it itself. Merchant Setup sends CREATEDThe APIsilent
status_reason sent on create is dropped: Shuttle's create request carries no field for it, so a new gateway never has one, even though the gateway object returns it. Shuttle writes it only on a status change of its ownThe APIsilent
Omitting currencies or payment_method_types on create enables the gateway for everything the processor supports; on an existing gateway the same omission disables it, see Update a provider's settingsThe APIsilent
The merchant must accept the terms before Merchant Setup will let a provider be connected; not enforced server-sideMerchant Setup screenthe app sends the merchant to the terms screen first, see Accept Shuttle's terms for the instance
The sandbox shortcut is offered only on a sandbox instance that has no gateway yet and whose sandbox processor is visible; it connects the SANDBOX processor with cards, ACH and SEPA enabled, network tokenisation on and a 60-second pending windowMerchant Setup screenthe shortcut is not shown
Merchant Setup names a legal entity only when the instance has no routing at all, and always the organisation entity; an API caller may name any legal entity. A second provider connected through the app is therefore created unrouted and takes no payments until it is routedMerchant Setup screenno routing is created with the gateway, see Route a payment method to a provider
Connecting the same processor twice is allowed; only a single-provider deep link prevents it, by opening the existing connection instead and refusing outright when the instance already has other connectionsMerchant Setup screena second gateway for the same processor is created

What happens

  • A gateway is created for the processor and appears on the merchant's provider list, named after the processor unless a name was given. It starts at SETUP, reaches CREATED once the processor's settings are stored (or the processor needs none), and LINKED once it has routing.
  • The credentials are tested at the processor as part of the call. A rejected connection returns the processor's own message and stores nothing, but the gateway it created is still on the list and has to be reconnected (Reconnect a provider) or archived (Disconnect a provider).
  • When the merchant had no routing at all, the organisation legal entity is routed to the new provider for every payment method it supports, so the checkout starts offering it; where an existing route is displaced it is run down rather than removed, so saved cards on the old provider keep working (Route a payment method to a provider). When routing already exists, nothing is routed and the new provider takes no payments until it is.
  • The response carries the new gateway: its id, status, the account name the processor reports, and the currencies and payment methods the processor accepts.
  • GATEWAY.CREATED is delivered, with LEGAL_ENTITY_ROUTE.CREATED for each route created; the provider is added to the instance's settings. No email or SMS is sent.

Who can do this

  • Roles: Admin only. Support does not hold payment_gateway, and by design does not set up providers.
  • Permission keys (for clients managing permissions directly): payment_gateway (or *), checked by Shuttle against the division the gateway is created in: the division in the body, or the instance-wide division when none is sent, which is what Merchant Setup sends. Without it the call is refused with NO_PERMISSION (403) "apiValidation.error.permissions"; without a valid session, UNAUTHORIZED (401). Shuttle checks nothing on this route, unlike Update a provider's settings, which checks payment_gateway on the gateway itself. Merchant Setup enables its connect controls for anyone holding payment_gateway (or *) on any object, so a user whose key is scoped to a single division sees the controls and is refused by Shuttle. The sandbox shortcut and the processor picker are not gated at all in the app; only the connect confirmation and the settings form are.
  • App options: a single-provider deep link restricts which processor can be connected and suppresses the surrounding navigation; a deep link may also carry a processor list that narrows the picker, and a country that presets its filter. All of that is Merchant Setup's routing, not the server's.

Related


Did this page help you?