Available Endpoints
Available Endpoints
Environment Modes
Komerce Payment API supports two environments:
- Production:
https://api.collaborator.komerce.id/user - Sandbox:
https://api-sandbox.collaborator.komerce.id/user
Use sandbox mode for testing payment flows without actual transactions. You can simulate payment status updates in sandbox environment.
Payment Page URLs:
- Production:
https://pay.komerce.id/{token} - Sandbox:
https://pay-sandbox.komerce.id/{token}
1. Get Payment Methods
GET /api/v1/user/methods
Retrieve a list of available payment methods including Virtual Account banks and QRIS.
Use Case: Display payment options to customers during checkout.
Authentication: Required (API Key in header)
Features:
- Lists all supported VA banks (BNI, BCA, Mandiri, BRI, Permata, CIMB, BSI, BJB, etc.)
- QRIS availability information
- Bank logos and display names
- Cached responses (1 hour TTL) for optimal performance
- Response time < 500ms
2. Create Payment - Virtual Account
POST /api/v1/user/payment/create
Create a payment transaction using Virtual Account (bank transfer).
Use Case: Generate VA number for customers to complete payment via bank transfer.
Authentication: Required (API Key in header)
Validation Rules:
order_id: Required, max 100 characterschannel_code: Must be from available banks listamount: Required, minimum Rp 10,000expiry_duration: Minimum 3600 seconds (1 hour)callback_API_KEY: Required if callback_url is provided
Response Time: < 2-5 seconds
3. Create Payment - QRIS
POST /api/v1/user/payment/create
Create a payment transaction using QRIS (Quick Response Code Indonesian Standard).
Use Case: Generate QR code for customers to scan and pay via e-wallet apps.
Authentication: Required (API Key in header)
Key Differences from VA:
- No
channel_coderequired - Fixed expiration: 5 minutes (QRIS standard)
- Returns
qr_stringto generate QR code image - Minimum amount: Rp 10,000
Response Time: < 2-5 seconds
4. Get Payment Status
GET /api/v1/user/payment/status/{payment_id}
Check the current status of a payment transaction.
Use Case: Verify if customer has completed payment, useful for order confirmation.
Authentication: Required (API Key in header)
Payment Status Values:
PENDING: Waiting for customer paymentPAID: Payment completed successfullyEXPIRED: Payment period has endedCANCELED: Payment was canceled
Features:
- Real-time status checking
- Settlement amount calculation included
- Payment method details (when paid)
- Response time < 300ms
- Rate limiting: 1 request per 3 seconds per payment_id
5. Cancel Payment
POST /api/v1/user/payment/cancel
Cancel a pending payment transaction.
Use Case: Prevent customer from paying after order cancellation.
Authentication: Required (API Key in header)
Validation Rules:
- Only
PENDINGpayments can be canceled PAIDorEXPIREDpayments cannot be canceledpayment_idmust be valid and exist in database
Behavior:
- For VA: Deactivates virtual account
- For QRIS: No action needed (expires automatically)
- Logs cancellation reason and timestamp
Response Time: < 2 seconds
Authentication
All endpoints require authentication using your API Key. Include it in the request header:
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request (invalid parameters) |
401 | Unauthorized (invalid API key) |
404 | Not Found (payment_id doesn't exist) |
500 | Internal Server Error |
Best Practices
Secure Your API Key
- Never share your key publicly or include it in client-side code
- Use environment variables to store your API key securely
Payment Flow Recommendations
- Checkout Page: Call
GET /api/v1/user/methodsto display payment options - Create Payment: Call
POST /api/v1/user/payment/createwhen customer selects payment method - Status Monitoring: Use
GET /api/v1/user/payment/status/to check payment completion - Order Cancellation: Call
POST /api/v1/user/payment/cancelif order is canceled before payment
Callback Implementation
- Always provide
callback_urlfor real-time payment notifications - Secure your callback endpoint with
callback_API_KEY - Verify the authenticity of callback requests
Environment Usage
Development/Testing: Use sandbox environment
- Simulate payment status updates
- No real transactions
Production: Use production environment
- Real payment processing
- Actual money transfer
Rate Limiting
- Status check: Maximum 1 request per 3 seconds per payment_id
- Implement proper retry mechanisms with exponential backoff
Payment Method Comparison
| Feature | Virtual Account | QRIS |
|---|---|---|
Expiry Time | Customizable (min 1 hour) | Fixed 5 minutes |
Bank Selection | Required | Not needed |
Payment Method | Bank Transfer | E-wallet Scan |
Best For | Large amounts, B2B | Quick payments, retail |
Unique Identifier | VA Number | QR Code |
More Information
Need Help?
For questions about integration or the API, hit the live chat. Our team's on standby.

