Payment

Direct Payment

Test on Postman

This endpoint is used to process direct payments.

API ENVIRONMENT

Endpoint

POST
https://sandbox.ipaymu.com/api/v2/payment/direct

Use credentials from the selected environment. Sandbox and Production credentials are separate.

Production Requirement

In Production mode, ensure your server uses a Static IP and your domain is registered. See IP & Domain Validation.

This endpoint is used to process direct payments.

Direct Payment Integration Flow

6 sequential steps from API request to payment completion

Step 1POST Direct

Request Direct Payment

Merchant sends HTTP POST to /api/v2/payment/direct with transaction details, paymentMethod & paymentChannel.

1 of 6
Step 2API Validation

iPaymu Processing

iPaymu server verifies signature header & generates payment number / QR / e-Wallet URL.

2 of 6
Step 3200 OK Response

Receive Payment Response

iPaymu returns PaymentNo (VA) or Url/QR (e-Wallet/QRIS) to the Merchant.

3 of 6
Step 4Payment Action

Customer Completes Payment

Customer pays via M-Banking / convenience store / scan QRIS / open e-Wallet app.

4 of 6
Step 5HTTP POST Callback

Webhook Callback Notification

iPaymu automatically sends HTTP POST callback notification to Merchant notifyUrl.

5 of 6
Step 6PAID Completed

Order Status Updated

Merchant updates order status to PAID in database & delivers product/service.

6 of 6
DONE

Headers

Content-Type

string
Example / value
application/json
Description
MIME type of the JSON request body.

va

string
Example / value
YOUR_VA
Description
Merchant Virtual Account number. Get it from the Integration menu in your iPaymu dashboard: Production / Sandbox. Use the VA for the selected environment.

signature

string · 64 hex
Example / value
GENERATED_SIGNATURE
Description
Generate an HMAC-SHA256 signature for this request using the API Key from Production / Sandbox. Do not copy the API Key into this header. See Signature Generation.

timestamp

string · 14 digits
Example / value
20260102153045
Description
Request creation time in YYYYMMDDHHmmss format (example: 2 Jan 2026, 15:30:45). Check the endpoint guide if it specifies ISO 8601 instead.

Body Parameters

KeyTypeRequiredDescription
namestringYesBuyer name
phonestringYesBuyer phone number
emailstringYesBuyer email
amountnumberYesTotal payment amount
notifyUrlstringYesWebhook URL for callback payment notifications
referenceIdstringYesTransaction reference ID
paymentMethodstringYesPayment method. Value: va, cstore, cod, qris, cc, paylater,ewallet.
paymentChannelstringYesPayment channel of the payment method. See details below table.
expirednumberNoCustom expired payment code in hours. Note:
- BSI VA max 3 hours
- BRI VA max 2 hours
- BCA VA can't be customized (default 12 hours)
- Alfamart can't be customized (default 24 hours)
- QRIS can't be customized (default 5 minutes)
commentsstringNoTransaction notes.
feeDirectionstringNoCustom fee direction: MERCHANT (fee charged to merchant) or BUYER (fee charged to buyer).
escrowstringNoActivation escrow (true or false).
product[]arrayConditionalProduct details (for COD payment).
qty[]arrayConditionalQuantity of product (for COD payment).
price[]arrayConditionalPrice of product (for COD payment).
weight[]arrayConditionalWeight in kg (for COD payment).
width[]arrayConditionalWidth in cm (for COD payment).
height[]arrayConditionalHeight in cm (for COD payment) (optional).
length[]arrayConditionalLength in cm (for COD payment).
deliveryAreastringConditionalDelivery postal code (for COD payment).
deliveryAddressstringConditionalDelivery address (for COD payment).
shippingstringConditionalShipping name from API Shipping Calculate (for COD payment).
shippingServicestringConditionalService name from API Shipping Calculate (for COD payment).
pickupAreastringConditionalPickup area postal code (for COD payment).
accountstringNoVA child account ID.
successUrlstringNoSuccess URL after payment (for cases of redirect payment like Akulaku & Credit Card).
cancelUrlstringNoCancel URL for failed payment (for cases of redirect payment like Akulaku & Credit Card).
Available paymentChannel lists by paymentMethod
Payment Method (paymentMethod)Payment Channels (paymentChannel)
Virtual Account (va)bag, bca, bpd_bali, bni, cimb, mandiri, bmi, bri, bsi, permata, danamon,btn
Convenience Store (cstore)alfamart, indomaret
Cash On Delivery (cod)rpx (RPX Courier)
QRIS (qris)mpm
Credit Card (cc)cc
Pay Later (paylater)akulaku
e-Wallet (ewallet)dana, shopeepay

Example Request

{
  "name": "Buyer",
  "phone": "08123456789",
  "email": "buyer@mail.com",
  "amount": 10000,
  "notifyUrl": "https://mywebsite.com/callback",
  "expired": 24,
  "expiredType": "hours",
  "comments": "Payment for Order #123",
  "referenceId": "REF123456",
  "paymentMethod": "va",
  "paymentChannel": "bca",
  "product": ["Product A"],
  "qty": [1],
  "price": [10000],
  "weight": [1],
  "width": [1],
  "height": [1],
  "length": [1],
  "deliveryArea": "76111",
  "deliveryAddress": "Jalan Raya No. 1"
}

Example Response

{
  "Status": 200,
  "Success": true,
  "Message": "Success",
  "Data": {
    "TransactionId": 12345,
    "ReferenceId": "REF123456",
    "Via": "va",
    "Channel": "bca",
    "PaymentNo": "1234567890",
    "PaymentName": "BCA Virtual Account",
    "Total": 10000,
    "Fee": 0,
    "Expired": "2023-12-31 23:59:59",
    "Note": null,
    "Url": "https://sandbox.ipaymu.com/payment/12345"
  }
}

On this page