How to manage the lifecycle of a link

A payment link has three possible statuses: ACTIVE, INACTIVE, and EXPIRED. This guide shows how to transition between them and how to update an existing link.

Status transitions

FromToTrigger
—ACTIVEPayment link created
ACTIVEINACTIVESeller deactivates via PATCH
ACTIVEEXPIREDExpiration date reached (automatic)
ACTIVEEXPIREDmax_orders limit reached (sold out)
INACTIVEACTIVESeller reactivates via PATCH
EXPIRED—No automatic transition out of this status (see the note below)
information icon
Reactivating an expired link: you can reactivate an EXPIRED link. Set its expiration date to a future date and its status to ACTIVE. You can do this with either a PUT or a PATCH request.

How it works

A payment link moves between three statuses. You manage it with these operations:

  • Three statuses: a link is ACTIVE when created, INACTIVE when the seller deactivates it, and EXPIRED when its expiration date is reached or it reaches its max_orders limit (sold out).
  • PATCH for status or expiration date: use PATCH /payment-links/{link_id} to deactivate, reactivate, or change the expiration date without resending the whole link.
  • PUT for full replacement: use PUT /payment-links/{link_id} to replace the entire link. The request body has the same structure as POST /payment-links.
  • GET to inspect: retrieve the current state of a link at any time. If the link doesn't exist, the API returns 404 (payment_link_not_found).
  • Reactivating an expired link: to reactivate an EXPIRED link, set its expiration date to a future date and its status to ACTIVE with PUT or PATCH.

Before you start

  • Get an access token. See Authentication.
  • Have the link_id of the link you want to manage.
Use PATCH to update the status or expiration date of a link.
Endpoint
PATCH /payment-links/{link_id}
FieldTypeRequiredDescription
statusstringNoNew status: ACTIVE or INACTIVE
expirationstringNoNew expiration date

Example request — deactivate

json
curl -X PATCH "${API_URL}/payment-links/${LINK_ID}" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "x-seller-id: ${SELLER_ID}" \ -H "country: BR" \ -H "tenant: santander" \ -H "Content-Type: application/json" \ -d '{ "status": "INACTIVE" }'

Example request — reactivate

json
curl -X PATCH "${API_URL}/payment-links/${LINK_ID}" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "x-seller-id: ${SELLER_ID}" \ -H "country: BR" \ -H "tenant: santander" \ -H "Content-Type: application/json" \ -d '{ "status": "ACTIVE" }'
If the request succeeds, the API returns 200 OK with the complete updated link.
Use PUT for a full replacement of the link.
Endpoint
PUT /payment-links/{link_id}
Required fields
FieldTypeDescriptionExample
labelstringIdentification tag (6–36 characters)black-friday-2026
paymentobjectPayment configuration---
currencystringCurrency code (ISO 4217)BRL or MXN
products.product_typestringSee valid values in the product data modelphysical_goods
products.titlestringProduct title (max. 128 characters)Camiseta Oficial Getnet
products.amountintegerAmount in cents, as an integer (for example, 150.00 → 15000)15000
Optional fields
FieldTypeDescriptionExample
statusstringLink statusACTIVE or INACTIVE
expirationstringNew expiration date2026-12-31T23:59:59

Example request

json
curl https://api-sbx.pre.globalgetnet.com/dpy/payment-link/v1/payment-links/9e5dcedc-1e5f-4e85-9b64-4d0b43d98c82 \ --request PUT \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'Content-Type: application/json' \ --data '{ "label": "black-friday-2026", "expiration": "2026-12-31T23:59:59", "max_orders": 100, "type": "custom", "request_delivery_address": false, "shipping_amount": 500, "products": [ { "product_type": "physical_goods", "title": "Camiseta Oficial Getnet", "image_id": "6697e354-ab4a-11eb-bcbc-0242ac130002", "description": "Camiseta 100% algodão, tamanho M", "quantity": 2, "order_prefix": "BF2026", "amount": 9990, "propertyName*": "anything" } ], "payment": { "credit": { "enabled": true, "brands": [ { "enabled": true, "brand": "VISA", "currencies": [ "BRL" ], "threeds": true, "supported_installments": [ { "schema": "plan_lojista", "schema_name": "Plan Lojista", "installments": [2,3,6,9,12], "installments_with_interest": [6,9,12], "installments_with_increase": [ { "installments": [3,6,12], "rate": 1.5, "propertyName*": "anything" } ], "propertyName*": "anything" } ], "propertyName*": "anything" } ], "propertyName*": "anything" }, "debit": { "enabled": true, "brands": [ { "enabled": true, "brand": "VISA", "currencies": [ "BRL" ], "threeds": true, "propertyName*": "anything" } ], "propertyName*": "anything" }, "bankslip": { "enabled": true, "propertyName*": "anything" }, "instant_payment": { "enabled": true, "propertyName*": "anything" }, "google_pay": { "enabled": true, "propertyName*": "anything" }, "apple_pay": { "enabled": true, "propertyName*": "anything" }, "c2p_master": { "enabled": false, "propertyName*": "anything" }, "propertyName*": "anything" }, "currency": "BRL", "propertyName*": "anything", "status": "ACTIVE" }'
The request body uses the same structure as POST /payment-links. All body fields are replaced.

See How to create a payment link for the field structure.

If the request succeeds, the API returns 200 OK with the complete updated link.
To view the current state of a link, send a GET request:
json
curl -X GET "${API_URL}/payment-links/${LINK_ID}" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "x-seller-id: ${SELLER_ID}" \ -H "country: BR" \ -H "tenant: santander"
The API returns 200 OK with the complete link. If the link doesn't exist, the API returns 404 (payment_link_not_found).

Next steps