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 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-aiThe 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 |
|---|---|---|
| Install for specific agents only |
|
| Install for your user, across all projects |
|
| Skip prompts (for scripts and CI) |
|
Step 2: Check the install
npx skills listYou 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
Set your webhook URL and copy the webhook verification token into your app's environment.
Simulate a payment and check that your webhook handler updates the order.
Use test cards and error scenarios to check failure paths.
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 updateWhat 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. | |
Payments API | Low-level payments: one-time payments, tokenization, pay with a saved token, capture, refund. | |
Components | Embedded payment UI for web, iOS and Android. Uses an SDK key from Payment Sessions. | |
Subscriptions | Change, pause or cancel existing subscriptions; start one from an existing customer and token. | |
Customers | Create and update customer records. | |
Payouts | Send money out to banks and e-wallets. | |
FX | Currency quotes for payouts and balance conversions. | |
Disputes | Fetch disputes, submit text or image evidence, or accept them. | |
xenPlatform | Sub-accounts, transfers, split payments, acting on behalf of a sub-account. | |
Transactions | Account transaction history. | |
Balance | Account balances, including sub-account balances. |
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 |
|---|---|---|
| Payments API ( | |
Payment API v2 | Payments API | |
Invoices ( | Payment Sessions in payment link mode | |
Subscriptions v1 ( | Subscriptions | |
| Xendit Components | |
xenPlatform | Accounts API v3 |
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
.envfile 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.