# configurePaymentCredentials

Source: <https://telegafirst.com/docs/api-op-configurepaymentcredentials>
Locale: ru
releaseGitSha: ea133cd4ad87fe549ef000b139be145be9bd1717
sourceContentDigest: 8deb80ee93da8fcb469c4918589263121cd504249e652b881bc83b9a1cd4450d
Version: 2

# configurePaymentCredentials

`POST /api/v1/tools/payments`

Configure one credentialed payment provider

## Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

| Поле | Значение |
| - | - |
| security.0.hubApiKey | \[] |
| security.1.hubBearer | \[] |
| securitySchemes.hubApiKey.in | "header" |
| securitySchemes.hubApiKey.name | "X-Api-Key" |
| securitySchemes.hubApiKey.type | "apiKey" |
| securitySchemes.hubBearer.scheme | "bearer" |
| securitySchemes.hubBearer.type | "http" |
| x-required-scopes | \["payments:config"] |

## Параметры запроса

| Поле | Значение |
| - | - |
| 0.in | "header" |
| 0.name | "Idempotency-Key" |
| 0.required | true |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-9ac136edb99a2063b3091602181c8d2022fdccb5b514991319d58544c2e57e95) |

## Тело запроса

| Поле | Значение |
| - | - |
| content.application/json.schema | [PaymentCredentialsConfigureRequest](https://telegafirst.com/docs/schema-427e1b358bb404b34141d824a8ddba12932c96c10f08e0b144979b69468886e0) |
| required | true |

## Ответы

| Поле | Значение |
| - | - |
| 201.content.application/json.schema | [PaymentProviderView](https://telegafirst.com/docs/schema-3c68cab7bc290fb57e51abd17a837e4a42a34a16427dd30865c1b506ca94fcb3) |
| 201.description | "Saved provider availability and display currency, with no credential values" |
| 201.headers.X-Bot-Username.description | "Active tenant public bot username, when available" |
| 201.headers.X-Bot-Username.schema | [201.headers.X-Bot-Username.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 201.headers.X-Client-Slug.description | "Active tenant public slug, when available" |
| 201.headers.X-Client-Slug.schema | [201.headers.X-Client-Slug.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 201.headers.X-RateLimit-Limit.description | "Computed request budget" |
| 201.headers.X-RateLimit-Limit.schema | [201.headers.X-RateLimit-Limit.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 201.headers.X-RateLimit-Remaining.description | "Remaining budget or unknown" |
| 201.headers.X-RateLimit-Remaining.schema | [201.headers.X-RateLimit-Remaining.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 201.headers.X-RateLimit-Reset.description | "Budget reset Unix timestamp" |
| 201.headers.X-RateLimit-Reset.schema | [201.headers.X-RateLimit-Reset.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 400.description | "Strict body validation failed, or a POST body has no Idempotency-Key" |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 401.description | "Missing, invalid or conflicting API-key transports; a surface-session JWT is not an alternative" |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 403.description | "Owner-only payments:config scope or effective credential access refused" |
| 409.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 409.description | "The idempotent command is already processing" |
| 413.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 413.description | "Per-tool payload or item-count cap exceeded" |
| 422.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 422.description | "Idempotency-Key reused with a different body, or provider enablement rejected by fiscal/credential prerequisites" |
| 429.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 429.description | "Per-tool rate limit exceeded or unavailable; fail closed" |
| 429.headers.Retry-After.description | "Seconds before retry when supplied by the limiter" |
| 429.headers.Retry-After.schema | [429.headers.Retry-After.schema](https://telegafirst.com/docs/schema-f0765dbf409c74f001806c446f2cf171d8c46b5b15779d54423dde921a4b0670) |

## Дополнительные условия

| Поле | Значение |
| - | - |
| description | "Owner-only. Strict snake\_case credential union has eight providers; Stars uses enable instead. enabled defaults to true in the shared writer, not in the request validator. Secrets are accepted as input and never returned. POST body requires Idempotency-Key; tenant/credential/handler replay preserves status and body for 86400 seconds." |
| operationId | "configurePaymentCredentials" |
| summary | "Configure one credentialed payment provider" |
| tags | \["payments-config"] |
