Build with AI

Prev Next

Build Xendit integrations with your AI coding agent

Xendit AI Skills teach your AI coding agent how to integrate with Xendit correctly. Install the skill once, then ask your agent to build a checkout, send payouts or migrate an old integration. The agent picks the right Xendit API, follows our current integration patterns and writes the code in your project.

What is an agent skill?

A skill is a folder of instructions and reference files that a coding agent loads when a task needs it. The Xendit skill, xendit-integrate, holds a decision guide for choosing the right API, reference notes for each API, and the rules every Xendit integration should follow — test mode first, webhook verification, idempotent event handling and error handling.

The skill does not call Xendit on its own, hold your API keys or move money. Your agent writes code; you review it, test it and deploy it.

What you can build

You want to…

Your agent will use

Accept payments with Xendit hosted page

Payment Sessions API

Build your own hosted page and payment flow, save payment methods, capture or refund

Payments API

Embed a checkout in your website, iOS or Android app

Xendit Components

Start or manage recurring billing

Subscriptions API

Store and update customer records

Customers API

Send money to bank accounts or e-wallets, including cross-currency

Payouts API + FX API

Review and respond to chargebacks

Disputes API

Run a platform with sub-accounts, transfers and split payments

xenPlatform API

Read balances and transaction history

Balance + Transactions APIs

Move off a legacy API (per-channel APIs, Invoices, Payment API v2, xendit.js, Subscriptions v1)

Migration guide built into the skill

Supported coding agents

The skill follows the open Agent Skills format and installs with the skills CLI. It works with agents that support skills, including Claude Code, Cursor, OpenAI Codex, GitHub Copilot, Gemini CLI and OpenCode.

Try it

After you install the skill, open your project in your agent and try prompts like:

  • "Add a Xendit payment link to my checkout page for orders in IDR."

  • "Embed Xendit Components card payments in my React app and handle the payment webhook."

  • "Set up a monthly subscription for new users with Xendit."

  • "Send a payout to a BCA bank account when a seller withdraws their balance."

  • "Find the legacy Xendit endpoints in this codebase and plan a migration to the Payments API."

Install Xendit AI Skills

Install the Xendit skill into your coding agent with one command, then build and test against Xendit test mode.

Before you begin

  • A Xendit account.

  • A development secret API key (starts with xnd_development_). See API keys.

  • Node.js 18 or later, so you can run npx.

  • A coding agent that supports skills, such as Claude Code, Cursor, Codex or GitHub Copilot.

Step 1: Install the skill

From your project's root folder, run:

npx skills add xendit/xendit-ai

The CLI detects the coding agents on your machine and asks which ones should get the skill. It installs into your project by default, so you can commit it and share it with your team.

Useful options:

Option

What it does

Example

-a, --agent

Install for specific agents only

npx skills add xendit/xendit-ai -a claude-code -a cursor

-g, --global

Install for your user, across all projects

npx skills add xendit/xendit-ai -g

-y, --yes

Skip prompts (for scripts and CI)

npx skills add xendit/xendit-ai -a claude-code -y

Step 2: Check the install

npx skills list

You should see xendit-integrate. In a project install, the files sit in your agent's skills folder, for example .claude/skills/xendit-integrate/ for Claude Code or .cursor/skills/xendit-integrate/ for Cursor.

Step 3: Give your app a development API key

Store your development key in an environment variable, not in code. For example, in a .env file that is listed in .gitignore:

XENDIT_SECRET_KEY=xnd_development_...

The skill tells your agent to use development keys only. Never paste a production key (xnd_production_) into an agent chat.

Step 4: Ask your agent to build

Open your project in your agent and describe what you want in plain language. The skill loads on its own when you mention Xendit or payments. For example:

Use Xendit to add a payment link to my checkout. Orders are in IDR. When the payment succeeds, mark the order as paid using the webhook.

If you are not sure which Xendit product you need, say what you want to achieve. The agent will ask a few questions and suggest Payment Sessions, the Payments API or another API.

Step 5: Test in test mode

Step 6: Go live

Review the generated code yourself before release. Then follow the pre-integration checklist, activate your payment methods, and set your production key in your production environment. Test-mode resources do not carry over to live mode.

Keep the skill up to date

We update the skill as APIs and best practices change. Run:

npx skills update

What the skill covers

The xendit-integrate skill covers current Xendit APIs and a migration guide for legacy integrations. This page lists what your agent knows and the rules it follows, so you know what to expect in the code it writes.

APIs in the skill

API

What it's for

Product docs

Payment Sessions

High-level payments: payment links, embedded Components checkout. Handles payment method selection, retries and UI.

How payment sessions work

Payments API

Low-level payments: one-time payments, tokenization, pay with a saved token, capture, refund.

How Payments API works

Components

Embedded payment UI for web, iOS and Android. Uses an SDK key from Payment Sessions.

Components overview

Subscriptions

Change, pause or cancel existing subscriptions; start one from an existing customer and token.

Subscriptions docs

Customers

Create and update customer records.

Register your customer

Payouts

Send money out to banks and e-wallets.

Payout docs

FX

Currency quotes for payouts and balance conversions.

FX integration

Disputes

Fetch disputes, submit text or image evidence, or accept them.

Disputes docs

xenPlatform

Sub-accounts, transfers, split payments, acting on behalf of a sub-account.

xenPlatform docs

Transactions

Account transaction history.

Transaction report docs

Balance

Account balances, including sub-account balances.

Understanding balance

The skill also reads the matching page on docs.xendit.co when it needs full field details, so it stays aligned with these docs.

Migrating from legacy APIs

If your codebase already uses older Xendit APIs, the agent can find them and plan a migration. It only changes legacy code when you ask or agree.

If your code uses

Your agent moves it to

Guide

/ewallets, /qr_codes, /callback_virtual_accounts, /direct_debits, /credit_card_charges and other per-channel APIs

Payments API (/v3/payment_requests)

Per-channel APIs → Payments API

Payment API v2

Payments API

Payment API v2 → Payments API

Invoices (/v2/invoices)

Payment Sessions in payment link mode

Invoices → Payment Sessions

Subscriptions v1 (api-version: 2022-04-10)

Subscriptions api-version: 2026-01-01

Subscriptions v1 → v2

xendit.js

Xendit Components

Components overview

xenPlatform POST /v2/accounts

Accounts API v3

Accounts API v3 migration

During a migration the agent keeps your old webhook handlers running until in-flight payments settle, and migrates in test mode first.

Keep your keys and your money safe

AI agents write and run code on your machine. Treat them like a new developer on your team: give them only what they need, and review what they ship.

  • Give agents development keys only. Development keys start with xnd_development_ and cannot move real money. Keep production keys (xnd_production_) in your production secrets manager.

  • Don't paste keys into chat/public platforms. Put them in environment variables or a .env file that is in .gitignore.

  • Use least-privilege keys. When you create an API key, grant only the permissions your integration needs (for example, read-only for reporting).

  • Review before you go live. Check webhook verification, amount handling, and anything that sends payouts or refunds.

  • Protect production further with IP allowlisting and 2FA. See Integration security.