Add a gateway
Connects a payment provider to your account, in the mode of the token you call with. Call GET /gateways/options first to see the providers and the settings each one needs. A new gateway is inactive unless you send active: true. Fires the gateway:created event.
Secret and trusted tokens may call this with the gateways create permission.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
application/json- body
A new gateway.
provider_id*stringThe payment provider, from GET /gateways/options. It cannot be changed later. Some providers are set up only by Comecero and cannot be added here (400).
payment_method_types*array<>The kinds of payment the gateway takes. At least one, and the provider must support them. They cannot be changed later.
1 <= itemscurrencies*array<string>The ISO 4217 currency codes the gateway takes. At least one.
card_types?array<string>The card brands the gateway takes. Required, with at least one, when payment_method_types has credit_card.
fields?The provider settings, keyed by each field's name from GET /gateways/options. Required when the provider has fields. Comecero keeps them encrypted and may check them with the provider (400 if they do not work).
active?booleanTrue to take payments on the gateway now. The default is false.
falseweight?integerHow often this gateway is picked compared to others. The default is 1.
0 <= value1comments?stringYour own notes about the gateway.
length <= 1024The new gateway.
application/json- 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.
"gateway"url?stringThe URL of this gateway.
urigateway_id?stringThe gateway's ID.
test?booleanTrue for a test gateway.
name?stringThe provider's name, set from the provider.
provider_id?stringThe payment provider. GET /gateways/options lists the providers you can add.
date_created?stringWhen the gateway was added.
date-timedate_modified?stringWhen the gateway was last changed.
date-timeaccount_id?stringThe 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?booleanTrue when a payment on this gateway can be voided before it settles.
supports_general_credit?booleanTrue when the gateway can refund more than the payment, or with no payment.
active?booleanTrue when the gateway takes new payments.
weight?integerHow 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.
0 <= valuecomments?|Your own notes about the gateway.
length <= 1024fields?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' \ -H 'Content-Type: application/json' \ -d '{ "provider_id": "test", "payment_method_types": [ "credit_card" ], "currencies": [ "USD" ], "active": true}'{ "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}List gateways GET
Lists the gateways of your account in the mode of the token you call with. The list is offset-based. Secret and trusted tokens may call this with the `gateways` read permission.
List gateway options GET
Lists what you can choose from when you add a gateway: the providers for the mode of your token, the settings each one needs, the currencies and the card brands. Secret and trusted tokens may call this with the `gateways` read permission.