Chiwa Pay

Get Started

Chiwa Pay API Overview

Chiwa Pay integration overview for creating transactions, accepting payments, and tracking payment status.

View as Markdown

Chiwa Pay helps merchants create payment transactions, show payment instructions to customers, and track status changes through webhooks or the API. Use this page as a quick map before opening the endpoint-level guides.

What You Can Build

Before You Start

RequirementDescription
Active merchantThe merchant application must be approved before its API key can create transactions.
API keyThe secret key is available in the merchant dashboard and sent with the Authorization header.
Payment methodMake sure the payment method you want to use is enabled for the merchant.
Webhook URLRecommended for automatic payment status updates from Chiwa Pay.

API URL

Every endpoint example uses the following base URL.

https://api.chiwapay.com

Quick Start

The shortest path to create a QRIS transaction:

cURL
curl -X POST "https://api.chiwapay.com/payments" \  -H "Authorization: Bearer sk_xxx" \  -H "Content-Type: application/json" \  -H "Idempotency-Key: ORDER-1024" \  -d '{  "amount": 150000,  "payment_method": "qris",  "merchant_reference_id": "ORDER-1024",  "customer": {    "name": "Nara",    "email": "nara@example.com"  }}'

The create payment response includes payment.id, reference_id, status, qris_payload, qris_image_url, and expires_at. Show the QRIS to the customer, then fulfill the order after the status changes to paid.

Integration Flow

StepDescription
1Store the API key on your server and never expose the secret key to the frontend.
2Merchant creates a transaction with POST /payments.
3Chiwa Pay returns payment instructions such as a QRIS payload or QR image URL.
4Customer pays using the payment instruction before expires_at.
5Chiwa Pay sends a webhook when status changes, for example payment.paid or payment.expired.
6Merchant verifies the webhook, updates the order, and reconciles with the dashboard or transaction detail API.

Transaction Status

StatusDescription
createdTransaction was created.
pendingWaiting for payment.
paidCustomer has paid.
expiredPayment deadline has passed.
settledFunds are in settlement and the transaction cannot be cancelled.
failedPayment failed.
cancelledTransaction was cancelled.
refund_processingRefund is being processed.
refund_failedRefund failed and needs retry or manual handling.
refundedRefund succeeded.

Webhook or Polling

MechanismUse WhenNotes
WebhookYour system can receive requests from Chiwa Pay.This is the primary way to process status changes in real time.
Transaction detail pollingYour system cannot receive webhooks yet or needs a fallback check.Use as a fallback and add delay between requests to avoid rate limits.
DashboardOperations teams need to inspect transactions manually.Useful for investigation, support, and reconciliation.

Key Concepts

ConceptSummary
merchant_reference_idThe order ID from the merchant system. Use a value that is easy to reconcile.
reference_idChiwa Pay transaction ID that can be used to look up a payment.
Idempotency-KeyPrevents duplicate transaction creation when a create payment request is retried.
total_amountThe amount the customer must pay. It can differ from amount when the buyer pays the fee.
net_amountThe amount recorded for the merchant after fee rules are applied.

Continue From Here

On this page