---
title: "Create a Pay connector"
method: POST
path: "/pay_connectors"
tags: ["Pay Connectors"]
---

# Create a Pay connector

`POST /pay_connectors`

## Request

- Base URL: `https://api.telnyx.com/v2`
- URL: `https://api.telnyx.com/v2/pay_connectors`
- Auth: HTTP bearer

Create a generic payment connector in the authenticated organization. The name must be unique in that organization. Authentication supplies ownership; do not send user_id or organization_id. Config is encrypted at rest; passwords and tokens are omitted from responses. This operation stores configuration and does not initiate a payment. See the [processor contract](/docs/voice/programmable-voice/pay#request-sent-to-the-payment-processor).

## Request body

- CreateGenericPayConnectorRequest
  - `name` string, required: Unique within the authenticated organization. Used in resource paths and as connector_name in the Call Control Pay request. Cannot be renamed by update.
  - `type` 'generic': Connector type covered by this reference.
  - `mode` 'test' | 'live': Defaults to test on creation. Test restricts collected card numbers but still contacts the configured processor; use a processor sandbox URL and sandbox credentials. Live removes the test-card restriction. Neither mode locks API updates.
  - `config` union, required: Configuration for a generic connector. A config update replaces the complete object, not individual keys. Unknown config keys are discarded. Authentication credentials must be nonblank strings when required by the selected auth_type.
    - object
      - `endpoint_url` string, required: HTTP or HTTPS processor URL with a host. Use HTTPS to protect payment data in transit.
      - `auth_type` 'basic': Processor authentication, separate from the Telnyx API key. If omitted, validation requires basic credentials but no Basic Authorization header is added. Explicitly set basic or bearer to send its corresponding Authorization header, or none for no processor authentication.
      - `username` string, required: Basic username.
      - `password` string, required: Basic password.
      - `token` unknown
      - `timeout` integer, nullable: Processor HTTP timeout in milliseconds. Omitted or null uses 10000; null is removed before storage. Not the IVR digit-gather timeout.
    - object
      - `endpoint_url` string, required: HTTP or HTTPS processor URL with a host. Use HTTPS to protect payment data in transit.
      - `auth_type` 'bearer', required: Processor authentication, separate from the Telnyx API key. If omitted, validation requires basic credentials but no Basic Authorization header is added. Explicitly set basic or bearer to send its corresponding Authorization header, or none for no processor authentication.
      - `username` unknown
      - `password` unknown
      - `token` string, required: Processor bearer token.
      - `timeout` integer, nullable: Processor HTTP timeout in milliseconds. Omitted or null uses 10000; null is removed before storage. Not the IVR digit-gather timeout.
    - object
      - `endpoint_url` string, required: HTTP or HTTPS processor URL with a host. Use HTTPS to protect payment data in transit.
      - `auth_type` 'none', required: Processor authentication, separate from the Telnyx API key. If omitted, validation requires basic credentials but no Basic Authorization header is added. Explicitly set basic or bearer to send its corresponding Authorization header, or none for no processor authentication.
      - `username` unknown
      - `password` unknown
      - `token` unknown
      - `timeout` integer, nullable: Processor HTTP timeout in milliseconds. Omitted or null uses 10000; null is removed before storage. Not the IVR digit-gather timeout.

## Response `201`

Connector created. Credentials are omitted.

- PayConnectorResponse
  - `data` PayConnector: Organization-owned connector. Examples and config properties here describe generic connectors; listing is not restricted to that type unless filter[type]=generic is supplied. Passwords and bearer tokens are omitted, not masked. Defaults for auth_type and timeout need not appear in stored config.
    - `id` string, uuid: Connector identifier.
    - `name` string: Connector name used for retrieval, update, deletion and Pay.
    - `record_type` 'pay_connector': Resource type.
    - `user_id` string: Creating user; assigned from authentication, not request input.
    - `organization_id` string: Owning organization; assigned from authentication, not request input.
    - `type` string: Connector type; generic is covered by this reference. Other types may appear in unfiltered lists.
    - `mode` 'test' | 'live': Configured mode.
    - `config` object: Redacted stored configuration. Generic connector fields are shown here. Unknown config keys are discarded. Password and token are never returned.
      - `endpoint_url` string: HTTP or HTTPS processor URL with a host. Use HTTPS to protect payment data in transit.
      - `auth_type` 'none' | 'basic' | 'bearer': Stored processor authentication selection. Omitted if it was not explicitly configured.
      - `username` unknown
      - `timeout` integer: Stored processor HTTP timeout in milliseconds. Omitted when no timeout was configured; the effective runtime default is 10000.
    - `created_at` string, date-time: Creation time.
    - `updated_at` string, date-time: Last update time.

## Other responses

- `422`: Invalid fields or duplicate name in the organization.

## Changes

> 152 revisions in range; 1 not diffed.

- **2026-10-23** `05f96b352898`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/changes/pay_connectors/post.md)

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api-2.md) - [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/revisions/f82938f53ff4?raw)
