How to hit the Xendit API

Xendit's API at https://api.xendit.co handles payments in Indonesia, the Philippines, and across Southeast Asia.

Authentication

Create a secret key under Settings → API Keys. Xendit uses Basic auth with the secret key as the username and an empty password — curl's -u key:, PostTaco's Auth tab. Development keys start with xnd_development_.

Full reference: https://docs.xendit.co/apidocs

Get your balance

curl https://api.xendit.co/balance \
  -u {{XENDIT_SECRET_KEY}}:
Run in PostTaco

Create an invoice

Returns an invoice_url to send the payer to.

curl -X POST https://api.xendit.co/v2/invoices \
  -u {{XENDIT_SECRET_KEY}}: \
  -H "Content-Type: application/json" \
  -d '{"external_id": "posttaco-invoice-1", "amount": 100000, "currency": "IDR"}'
Run in PostTaco