comecerodocs

Update a gateway

POST
/gateways/{gateway_id}

Changes a gateway's currencies, card brands, settings, weight, notes, or switches it on or off. Only the fields you send change. Fires the gateway:modified event.

Some gateways cannot be changed this way. Gateways that Comecero set up for you keep their settings, currencies and card brands (400), and may stay off while their set-up finishes or payments are on hold (422).

Secret and trusted tokens may call this with the gateways update permission.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

gateway_id*string

The gateway's gateway_id.

Request Body

application/json
  1. body

The fields to change. Fields you leave out keep their value. You cannot change provider_id or payment_method_types: add a new gateway instead (400).

currencies?array<string>

The ISO 4217 currency codes the gateway takes. Replaces the old list.

card_types?array<string>

The card brands the gateway takes. Replaces the old list. A card gateway must keep at least one (400).

fields?

New provider settings, keyed by each field's name. Replaces the saved settings.

active?boolean

True to take payments on the gateway, false to stop.

weight?integer

How often this gateway is picked compared to others.

Range0 <= value
comments?|

Your own notes about the gateway.

Lengthlength <= 1024

Response Body

The updated gateway.

application/json
  1. response

A payment provider connection that takes payments for your account. Gateways are kept per mode: test gateways only take test payments. When a payment ran through a gateway Comecero owns (on accounts where Comecero is the seller), a gateway in that payment shows only object, url, gateway_id, test, name (Comecero) and provider_id (comecero).

object?"gateway"

The object type. Always gateway.

Value in"gateway"
url?string

The URL of this gateway.

Formaturi
gateway_id?string

The gateway's ID.

test?boolean

True for a test gateway.

name?string

The provider's name, set from the provider.

provider_id?string

The payment provider. GET /gateways/options lists the providers you can add.

date_created?string

When the gateway was added.

Formatdate-time
date_modified?string

When the gateway was last changed.

Formatdate-time
account_id?string

The account the gateway belongs to.

payment_method_types?array<string>

The kinds of payment this gateway takes, such as credit_card, paypal, amazon_pay, apple_pay, wallet or ach. Set when the gateway is added. Gateways that Comecero sets up for you may show other values.

currencies?array<string>

The ISO 4217 currency codes the gateway takes payments in.

card_types?array<string>|

The card brands the gateway takes, such as visa or mastercard. Set on gateways that take cards. GET /gateways/options lists the values.

supports_void?boolean

True when a payment on this gateway can be voided before it settles.

supports_general_credit?boolean

True when the gateway can refund more than the payment, or with no payment.

active?boolean

True when the gateway takes new payments.

weight?integer

How often this gateway is picked, compared to the other active gateways that take the same payment. The default is 1. Use 0 to pick it only when no other gateway can take the payment.

Range0 <= value
comments?|

Your own notes about the gateway.

Lengthlength <= 1024
fields?

The provider settings you saved, such as API keys. Only present when you send show_sensitive=true. Treat them as secrets.

formatted?

Display text for the dates. Only present when you send formatted=true.

curl -X POST 'https://api.comecero.com/api/v1/gateways/0070576784690GtKDqfI7c' \  -H 'Content-Type: application/json' \  -d '{  "active": false,  "comments": "Paused while we change providers."}'
Example Response
{  "object": "gateway",  "url": "https://api.comecero.com/api/v1/gateways/0070576784690GtKDqfI7c",  "gateway_id": "0070576784690GtKDqfI7c",  "test": true,  "name": "Test Gateway",  "provider_id": "test",  "date_created": "2026-10-01T14:36:52Z",  "date_modified": "2026-10-01T14:36:52Z",  "account_id": "AB1234",  "payment_method_types": [    "credit_card"  ],  "currencies": [    "USD",    "EUR"  ],  "card_types": [    "visa",    "mastercard",    "american_express"  ],  "supports_void": true,  "supports_general_credit": false,  "active": true,  "weight": 1,  "comments": null}