Skip to main content
POST
POST /payment-link/{id}/cancel desativa um link active; o status passa para cancelled e a página hospedada deixa de aceitar pagamentos.
  • Cancelar um link que já está cancelled não faz nada e retorna o link.
  • Um link que já está used retorna 409: não pode ser cancelado. Pagamentos já recebidos nunca são afetados; para devolver o dinheiro, reembolse o pagamento.

Exemplo

Autorizações

Authorization
string
header
obrigatório

Your secret API key: Bearer prv_production_xxx (production) or Bearer prv_sandbox_xxx (sandbox).

Parâmetros de caminho

id
string<uuid>
obrigatório

The payment link id.

Corpo

application/json
merchantCode
string

Your merchant account identifier. Required if the key maps to more than one merchant account.

Resposta

The cancelled link (cancelling an already-cancelled link is a no-op)

id
string<uuid>
url
string<uri>

The hosted checkout URL to share with the payer.

type
enum<string>
Opções disponíveis:
one-time,
subscription
status
enum<string>

used once a single-use link takes its first successful payment, or a reusable link reaches maxUses.

Opções disponíveis:
active,
used,
expired,
cancelled
amountMode
enum<string>
Opções disponíveis:
fixed,
customer_entered
amount
object

Absent on subscription links. For customer_entered links only currency and exponent are set.

amountMin
integer<int64>

Minimum payer-entered amount, minor units.

amountMax
integer<int64>

Maximum payer-entered amount, minor units.

subscriptionPlanId
integer<int64>
checkoutConfigId
string<uuid>
title
string
description
string
reference
string
customerEmail
string
customerName
string
returnUrl
string<uri>
saveCardEnabled
boolean
reusable
boolean
maxUses
integer
usesCount
integer

Number of successful payments taken through this link.

environment
enum<string>
Opções disponíveis:
production,
sandbox
expiresAt
string<date-time>
usedAt
string<date-time>
createdAt
string<date-time>