---
title: "POST /api/payments/gateways"
method: POST
path: "/api/payments/gateways"
tags: ["api", "payment-gateways"]
---

# POST /api/payments/gateways

`POST /api/payments/gateways`

Create a Payment Gateway

## Request body

- POSTPaymentGatewaysCreateAPaymentGateway
  - `type` string — The type of the gateway
  - `name` string, required — The display name of the payment gateway
  - `redirectUrl` string, uri, nullable — The URL to which the customer gets redirected
  - `data` object — Any additional data required for the integration to work
  - `orgId` string — The ID of the organization to create this payment gateway for

## Response `200`

OK

- PaymentGatewayResource
  - `_id` string, required — The ID of the payment gateway
  - `type` string — The type of the gateway
  - `name` string, required — The display name of the payment gateway
  - `data` object — Any additional data required for the integration to work
  - `orgId` string — The ID of the organization to create this payment gateway for
  - `active` boolean — Whether the payment gateway is active
  - `secret` string, required — The secret of the payment gateway
  - `sellerId` string, required — The ID of the seller that gateway belongs to
  - `redirectUrl` string, uri, nullable — The URL to which the customer gets redirected
  - `channels` string[] — An array of channels the payment gateway is used for
  - `entitlements` object
    - `target` 'all' | 'selection', required — The target of the entitlement
    - `sellerIds` string[] — An array of seller ids for which the gateway is active
  - `capabilities` object
    - `refunds` object
      - `enabled` boolean — Whether refunds are enabled
      - `endpointUrl` string, uri, nullable — The endpoint URL to call in order to request a refund
    - `charge` object
      - `endpointUrl` string, uri, nullable — The endpoint URL to call in order to request a charge
  - `icon` string, nullable — The URL of the icon of the payment gateway
  - `description` string — A description of the payment gateway for the user
  - `createdAt` string, date-time, required — An ISO timestamp indicating when the gateway was created
  - `updatedAt` string, date-time, required — An ISO Timestamp indicating when the gateway was last updated

## Other responses

- `400` — Bad Request
- `401` — Unauthorized

---

[API](https://skmtc.net/vivenu/apis/vivenu-api.md) · [All operations](https://skmtc.net/vivenu/apis/vivenu-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vivenu/vivenu-api/revisions/36be0dca14e7/schema)
