SelectwinDOCS
Checkouts payment links

Checkouts - Create payment links

Cria um payment link hospedado (`type` static/dynamic) para os `items` informados; a resposta traz a URL assinada (`accessFullUrl`).

POST
/v1/checkouts/payment-links

Cria um payment link hospedado (type static/dynamic) para os items informados; a resposta traz a URL assinada (accessFullUrl).

Authorization

SelectKeyAuth
selectkey<token>

API key for all authenticated requests. Send your key in the selectkey header (e.g. sandbox sl_test_…, production sl_live_…).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/checkouts/payment-links" \  -H "Content-Type: application/json" \  -d '{    "type": "static",    "items": [      {        "id": "prd_abc",        "quantity": 2      }    ],    "domainId": "dmn_abc123",    "integrationId": "app_xyz789",    "domain": "https://checkout.example.com",    "name": "Black Friday PIX link",    "expiresAt": "2026-12-31T23:59:59Z",    "availableAt": "2026-01-01T00:00:00Z",    "customInputs": [      {        "key": "company_name",        "label": "Company",        "type": "text"      }    ],    "discounts": [],    "editable": true,    "templateId": "tmpl_abc123",    "metadata": {      "campaign": "spring2026"    }  }'
{
  "id": "link_01hqzvabc",
  "name": "Black Friday PIX",
  "accessId": "acc_01hqzvabc",
  "signature": "f62a0cb72d7a5d55052c96301013e64627133231f90c4614b10d0f50b9887f8d",
  "accessFullUrl": "https://pay.example.com/p/link_01hqzvabc?sign=f62a0cb7",
  "type": "static",
  "sessionId": "ses_01hqzvabc",
  "editable": false,
  "customInputs": [
    {
      "key": "company_name",
      "label": "Company",
      "type": "text"
    }
  ],
  "discounts": [
    {
      "id": "dis_abc123"
    }
  ],
  "items": [
    {
      "id": "var_01hqzvabc",
      "quantity": 1
    }
  ],
  "expiresAt": "2026-12-31T23:59:59.000Z",
  "availableAt": "2026-01-01T00:00:00.000Z",
  "templateId": "tmpl_abc123",
  "integrationId": "app_xyz789",
  "domainId": "dmn_abc123",
  "metadata": {},
  "updatedAt": "2026-04-12T17:56:33.000Z",
  "createdAt": "2026-04-12T17:56:33.000Z"
}
{
  "error": {
    "status": "Bad Request",
    "statusCode": 400,
    "category": "validation",
    "message": "Validation errors occurred",
    "details": "One or more parameters are invalid or out of range. Please check the parameters and try again.",
    "params": [
      {
        "payment[currency]": "currency must be one of [BRL]"
      },
      {
        "amount": "amount is required"
      }
    ],
    "code": "invalidParameters",
    "resource": "client"
  }
}
{
  "error": {
    "status": "Unauthorized",
    "statusCode": 401,
    "category": "authentication",
    "message": "Unauthorized",
    "details": "Authentication failed. The provided API key is invalid or does not have permission to operate.",
    "code": "unauthorized"
  }
}
{
  "error": {
    "status": "Forbidden",
    "statusCode": 403,
    "category": "authorization",
    "message": "Forbidden",
    "details": "Access denied. This may be due to IP blocks, domain restrictions, or insufficient permissions.",
    "code": "forbidden"
  }
}
{
  "error": {
    "status": "Not Found",
    "statusCode": 404,
    "category": "client",
    "message": "Not Found",
    "details": "The requested resource was not found on the server.",
    "code": "notFound"
  }
}
{
  "error": {
    "status": "Unprocessable Entity",
    "statusCode": 422,
    "category": "validation",
    "message": "Unprocessable Entity",
    "details": "The request was understood, but contains invalid data that could not be processed.",
    "code": "unprocessableEntity"
  }
}
{
  "error": {
    "status": "Too Many Requests",
    "statusCode": 429,
    "category": "rate_limit",
    "message": "Too Many Requests",
    "details": "The number of requests exceeded the limit allowed for the IP or user.",
    "retryAfterMinutes": 60,
    "code": "tooManyRequests"
  }
}
{
  "error": {
    "status": "Internal Server Error",
    "statusCode": 500,
    "category": "server",
    "message": "Server error.",
    "details": "An internal server error occurred. Please try again later.",
    "code": "serverError",
    "resource": "server"
  }
}