Search docs

Search the API documentation

Quickstart

Get up and running with the Artos API in under 5 minutes.

Prerequisites

  • An Artos account — sign up here
  • Duitku merchant credentials configured in Settings
  • An API key (created in the dashboard)

1. Get an API Key

Go to Dashboard → API Keys and create a new key. Copy it — it's only shown once.

.env
ARTOS_API_KEY=art_live_your_key_here

2. Create a Payment

Make a POST request to create a payment transaction.

curl
curl -X POST https://api-artos.kasir.ai/v1/payments/create \
  -H "X-API-Key: art_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "merchantOrderId": "ORDER-001",
    "amount": 50000,
    "productDetails": "Premium Plan"
  }'
200 OK
{
  "success": true,
  "data": {
    "id": "tx_abc123",
    "status": "pending",
    "paymentUrl": "https://...",
    "qrString": "000201010212..."
  }
}

Use paymentUrl to redirect your customer, or render the qrString as a QR code.

3. Handle the Webhook

Register a webhook URL in Dashboard → Webhooks. Artos will POST to your URL when a payment is completed.

Node.js / Express
app.post('/webhooks/artos', express.raw({ type: 'application/json' }), (req, res) => {
  const { event, data } = JSON.parse(req.body.toString())

  if (event === 'payment.success') {
    // Fulfill order using data.merchantOrderId
    console.log('Payment received:', data.transactionId)
  }

  res.status(200).send('OK')
})

Always verify the webhook signature before processing.

Next Steps