Create a Pay connector
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.
curl --request POST \
--url https://api.telnyx.com/v2/pay_connectors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-payment-connector",
"type": "generic",
"mode": "test",
"config": {
"endpoint_url": "https://processor.example.com/pay",
"auth_type": "none"
}
}
'{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"record_type": "pay_connector",
"name": "my-payment-connector",
"type": "generic",
"mode": "test",
"user_id": "user-example",
"organization_id": "organization-example",
"config": {
"endpoint_url": "https://processor.example.com/pay",
"auth_type": "bearer"
},
"created_at": "2026-10-01T12:00:00.000000Z",
"updated_at": "2026-10-01T12:00:00.000000Z"
}
}{
"errors": [
{
"code": "10000",
"title": "Invalid request",
"detail": "The 'config' parameter is invalid. Please consult the documentation.",
"source": {
"pointer": "/config"
}
}
]
}Authorizations
Telnyx API key, not the processor bearer token.
Body
Unique within the authenticated organization. Used in resource paths and as connector_name in the Call Control Pay request. Cannot be renamed by update.
1 - 255\S"my-payment-connector"
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.
- Basic authentication (also the validation default)
- Bearer authentication
- No processor authentication
Show child attributes
Show child attributes
Connector type covered by this reference.
generic 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.
test, live Response
Connector created. Credentials are omitted.
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.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.telnyx.com/v2/pay_connectors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-payment-connector",
"type": "generic",
"mode": "test",
"config": {
"endpoint_url": "https://processor.example.com/pay",
"auth_type": "none"
}
}
'{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"record_type": "pay_connector",
"name": "my-payment-connector",
"type": "generic",
"mode": "test",
"user_id": "user-example",
"organization_id": "organization-example",
"config": {
"endpoint_url": "https://processor.example.com/pay",
"auth_type": "bearer"
},
"created_at": "2026-10-01T12:00:00.000000Z",
"updated_at": "2026-10-01T12:00:00.000000Z"
}
}{
"errors": [
{
"code": "10000",
"title": "Invalid request",
"detail": "The 'config' parameter is invalid. Please consult the documentation.",
"source": {
"pointer": "/config"
}
}
]
}