---
title: "Create User Payment Provider"
method: POST
path: "/v1/user_integrations/user_payments/provider"
tags: ["user_payments"]
---

# Create User Payment Provider

`POST /v1/user_integrations/user_payments/provider`

## Request

- Base URL: `https://api.linktodm.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.linktodm.com/v1/user_integrations/user_payments/provider`
- Auth: HTTP bearer

Connect a creator's own Stripe/Razorpay account to one of their channels.

## Request body

- UserPaymentProviderPayload: Connect a creator's own gateway to one of their channels. Everything here is identity or credentials, so there is no edit path: changing any of it means a different connection. Rotating keys or moving to another channel is a revoke followed by a create — which is also what keeps the endpoint registered at the gateway in step with the row.
  - `channel_id` string, required
  - `provider` 'STRIPE' | 'RAZORPAY', required: A creator's gateway. Deliberately NOT app.constants.PaymentGateway — that enum is LinktoDM's own gateways, and its RAZORPAY member is annotated "legacy, no new checkouts" because of the Dodo migration. That annotation is false for a creator's Razorpay account, which is fully supported here.
  - `provider_key_id` string, nullable
  - `provider_key_secret` string, required

## Response `200`

Successful Response

- UserPaymentProviderResponse: A connection as the client sees it — credentials reduced to booleans.
  - `id` integer, required
  - `provider` 'STRIPE' | 'RAZORPAY', required: A creator's gateway. Deliberately NOT app.constants.PaymentGateway — that enum is LinktoDM's own gateways, and its RAZORPAY member is annotated "legacy, no new checkouts" because of the Dodo migration. That annotation is false for a creator's Razorpay account, which is fully supported here.
  - `provider_key_id` string, required
  - `webhook_registered` boolean, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/linktodm/apis/salesmorph.md) - [All operations](https://skmtc.dev/linktodm/apis/salesmorph/llms.txt) - [OpenAPI document](https://skmtc.dev/linktodm/apis/salesmorph/revisions/4af0ad5dbe92?raw)
