Endpoint βš™οΈ

🧱 Base URL

All requests are made through the following base URLs:

πŸ’‘ Use the Sandbox environment for testing purposes before switching to Production.

πŸ”‘ Authorization

Every request to the Payment API must include an API Key for authentication.

You can find your API Key in the Merchant Dashboard after registration.

Example Header:

-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: application/json"

⚠️ Never expose your API key in client-side code or public repositories.

βš™οΈ Core Endpoints

Here are the main endpoints to get you started:

EndpointMethodDescription
/methods
GET
Retrieve payment methods and Banks Code
/create
POST
Create a new payment transaction
/status/{id}
GET
Retrieve payment status by transaction ID
/callback
POST
Receive payment notifications from the gateway

πŸš€ Create Your First Transaction

Here’s an example of how to create a new transaction:

curl --location 'https://api-sandbox.collaborator.komerce.id/user/api/v1/user/payment/create' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"order_id": (required),
"payment_type": "bank_transfer",
"channel_code": string (required, valid bank code),
"amount": integer (required, min 10.000),
"customer": {
"name": string (required),
"email": string (required, valid email),
"phone": string (required)
},
"items": [
{
  "name": string (required),
  "quantity": integer (required),
  "price": integer (required)
}
],
"expiry_duration": integer (optional, minimal 3600 seconds),
"callback_url": string (optional, valid URL),
"callback_api_key": (required if callback_url is filled, generate by user)
}'

βœ… Testing Your Integration

You can test your setup using sandbox mode. Payments in sandbox mode are simulated β€” no real charges occur.