AI-ready docs

Integrate in hours, not weeks

One checkout API, three calls and a webhook. You never touch card data, so your server stays out of PCI scope. PCI DSS v4.0.1 certified (SAQ D Service Provider, August 2026).

What you can integrate today

Hosted Checkout API

Create a payment session from your server, redirect the buyer to our page and confirm the result by API or webhook.

Webpay Plus and Vita Wallet

Credit, debit and prepaid cards through Transbank, plus bank transfers and multi-currency LATAM payments through Vita Wallet, with a single integration.

No-code payment links and QR

Charge without writing code: reusable or single-use links and QR codes with real-time confirmation from the dashboard.

Signed webhooks with retries

HMAC-SHA256 signed events, retries with backoff for 8 hours and a panel to review and resend every delivery.

What it looks like

One call creates the session and returns the URL you send the buyer to.

Request
curl -X POST https://api-dev.txncompany.com/api/v1/checkout-sessions \
  -H "Authorization: Bearer sk_test_YOUR_SECRET" \
  -H "Idempotency-Key: order-4821" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 19990,
    "currency": "CLP",
    "external_reference": "order-4821",
    "success_url": "https://yourstore.cl/order/4821/ok",
    "cancel_url": "https://yourstore.cl/order/4821/cancelled"
  }'
Response 201
{
  "id": "cs_65f1a2b3c4d5e6f7a8b9c0d1",
  "status": "pending",
  "amount": 19990,
  "currency": "CLP",
  "checkout_url": "https://api-dev.txncompany.com/checkout/65f1a2b3c4d5e6f7a8b9c0d1",
  "expires_at": "2026-09-29T15:45:00.000Z",
  "livemode": false
}

Integrate with AI in 3 steps

The documentation you read also exists in a machine-readable format. Your coding assistant can build the whole integration from it.

01

Copy the prompt

Paste it into Claude Code, Cursor, Copilot or whichever assistant you use.

02

The assistant reads the docs

It consumes llms-full.txt and the OpenAPI spec and builds the integration in your stack.

03

Test in sandbox

With your sk_test_ key and Transbank's test cards. When you are done, only the base URL and the key change.

Prompt
Integrate the TX Pay payments API (Hosted Checkout) into this project.

1. First read the full documentation at https://app.txncompany.com/llms-full.txt
   and the OpenAPI spec at https://api.txncompany.com/api/v1/openapi.json.
2. Use the SANDBOX environment: base URL https://api-dev.txncompany.com and a test
   secret key with the sk_test_ prefix (read it from the TXPAY_SECRET_KEY environment
   variable; never hardcode it or expose it in the frontend).
3. Implement on the server:
   a) POST /api/v1/checkout-sessions with amount (CLP, integer), currency "CLP",
      external_reference (my order ID), success_url and cancel_url, sending a unique
      Idempotency-Key header per order.
   b) Redirect the buyer to the checkout_url returned by the API.
   c) A return endpoint that reads ?session_id= and confirms the real state with
      GET /api/v1/checkout-sessions/:id (never trust the redirect alone).
   d) A public HTTPS endpoint receiving webhooks: verify the X-TXPay-Signature header
      (t=<timestamp>,v1=<hmac>) by computing HMAC-SHA256 of "<t>.<rawBody>" with the
      webhook secret (TXPAY_WEBHOOK_SECRET variable), compare in constant time, reject
      timestamps outside ±300 s and answer 2xx in under 10 seconds.
4. When done, verify this checklist and tell me what you did for each item:
   - Unique Idempotency-Key per order and handling of 409 idempotency_key_reused.
   - Webhook signature verified over the raw body (no re-serialization).
   - Event deduplication by id (resends reuse the same id).
   - A checkout_session.completed can arrive AFTER a checkout_session.failed for the
     same session: the final state is whatever the GET confirms last.
   - Handle failed (rejected/voided/refunded) and expired besides approved.
   - Going to production only changes the base URL (https://api.txncompany.com)
     and the key (sk_live_...): keep both configurable per environment.

What you need to go live

Typical development time: 2 to 4 hours with the guide. Less with AI.

  1. 1

    Account and merchant

    We onboard you through your TX Pay Partner or directly. We configure your payment methods and fees.

  2. 2

    Sandbox keys

    From the portal you get your sk_test_ key and webhook secret, and set your webhook URL.

  3. 3

    Create session, return and webhook

    Create the session with an Idempotency-Key, receive the buyer on success_url or cancel_url and verify the webhook signature.

  4. 4

    Tests with integration cards

    Approved, rejected and aborted payments with Transbank's test cards and Vita's test flow.

  5. 5

    Production checklist

    Webhook over https, completed-after-failed handling, deduplication by event id and X-Request-Id logging.

  6. 6

    Activation

    We activate your merchant and hand you the sk_live_ keys. Only the base URL and the key change: the code stays the same.

Request your sandbox keys

Tell us what you want to integrate and we give you access to the test environment and the full guide.

We respond within 24 hours