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

# Adicionar bump ao link

> Adiciona uma oferta adicional (order bump) ao link de pagamento

Permissão: `payment_link.write` (chave secreta).

## Endpoint

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.upag.dev/v1/payment-links/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70/bumps \
    -H "Authorization: Bearer sk_test_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "price": "6a3e8b01-4c2d-4f9b-9a7e-2d0f5c8b3e44",
      "amount": 1990,
      "title": "Adicione o guia de boas práticas",
      "description": "Oferta única, só neste checkout"
    }'
  ```

  ```javascript Node.js SDK theme={null}
  import { Upag } from 'upag';

  const upag = new Upag('sk_test_your_api_key');

  // upag.paymentLinks.createBump(paymentLinkId, params)
  const bump = await upag.paymentLinks.createBump('d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70', {
    price: '6a3e8b01-4c2d-4f9b-9a7e-2d0f5c8b3e44',
    amount: 1990,
    title: 'Adicione o guia de boas práticas',
    description: 'Oferta única, só neste checkout',
  });
  ```
</CodeGroup>

<Note>
  Em produção use `https://api.upag.io/v1` com `sk_live_...`.
</Note>

## Parâmetros

<ParamField path="paymentLinkId" type="string (uuid)" required>
  ID do link de pagamento.
</ParamField>

<ParamField body="price" type="string (uuid)" required>
  ID do preço oferecido no bump.
</ParamField>

<ParamField body="quantity" type="integer" default="1">
  Quantidade (≥ 1).
</ParamField>

<ParamField body="amount" type="integer">
  Valor do bump em centavos (≥ 0). Padrão: valor do preço × `quantity`.
</ParamField>

<ParamField body="title" type="string | null">
  Título exibido no checkout (até 255 caracteres).
</ParamField>

<ParamField body="description" type="string | null">
  Descrição exibida no checkout.
</ParamField>

## Resposta

`201 Created`

```json Response theme={null}
{
  "id": "f6a7b8c9-d0e1-4f2a-9b3c-4d5e6f7a8b92",
  "product": "1c0d2e4f-7b5e-4d2f-8e66-4a2a7b8d3f21",
  "price": "6a3e8b01-4c2d-4f9b-9a7e-2d0f5c8b3e44",
  "quantity": 1,
  "amount": 1990,
  "title": "Adicione o guia de boas práticas",
  "description": "Oferta única, só neste checkout"
}
```

* `404` — `PAYMENT_LINK_NOT_FOUND`, `PRICE_NOT_FOUND` ou `PRODUCT_NOT_FOUND`.
* `400` — `PAYMENT_LINK_CURRENCY_MISMATCH` (o bump deve ter a mesma moeda dos itens).


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