> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doglytdc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Crear link de pago

> Solicita un link de pago para uno de tus productos.

#### Alcance

```bash theme={null}
write payments
```

## Qué hace

Solicita un link de pago para uno de tus productos. Responde `202`; el link estará listo después de tu aprobación.

## Casos de uso

* Generar links por campaña
* Vender por chat o mediante una IA

**product\_id** `string\<uuid\>` *required*

ID de un producto activo de tu cuenta.

## Respuesta

**status** `string`

Siempre `approval_required`.

**approval\_id** `string\<uuid\>`

ID de la aprobación pendiente.

**expires\_at** `string\<date-time\>`

Plazo para aprobar.

## Errores

| Estado | Descripción |
| - | - |
| `400` | `invalid_product`. |
| `404` | El producto no existe en esta cuenta. |
| `401` | Clave inválida o revocada. |
| `403` | Faltan alcances (`insufficient_scope`). |
| `429` | Límite de solicitudes (`rate_limited`). |

```bash cURL theme={null}
curl --request POST \
  --url https://ucsyxzpdbnuyehizezvb.supabase.co/functions/v1/doglytdc-pay/v1/payment-links \
  -u "$DPAY_CLIENT_ID:$DPAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"8f0c2a8e-1b7d-4a55-9a3e-1c2d3e4f5a6b"}'
```

```json 202 theme={null}
{
  "status": "approval_required",
  "approval_id": "0e9d8c7b-6a5f-4e3d-9c2b-1a0f9e8d7c6b",
  "expires_at": "2026-11-06T18:40:00Z",
  "message": "Autorize no DoglyTdc Pay › Integrações › MCP."
}
```

```json 401 theme={null}
{ "error": "unauthorized", "message": "Chave de API inválida." }
```

```json 403 theme={null}
{ "error": "insufficient_scope", "message": "Esta chave precisa dos escopos: write, payments." }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.