Direct Payment
This endpoint is used to process direct payments.
Try it in Postman
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
Request Direct Payment
Merchant sends HTTP POST to /api/v2/payment/direct with transaction details, paymentMethod & paymentChannel.
iPaymu Processing
iPaymu server verifies signature header & generates payment number / QR / e-Wallet URL.
Receive Payment Response
iPaymu returns PaymentNo (VA) or Url/QR (e-Wallet/QRIS) to the Merchant.
Customer Completes Payment
Customer pays via M-Banking / convenience store / scan QRIS / open e-Wallet app.
Webhook Callback Notification
iPaymu automatically sends HTTP POST callback notification to Merchant notifyUrl.
Order Status Updated
Merchant updates order status to PAID in database & delivers product/service.
Endpoint: POST https://my.ipaymu.com/api/v2/payment/direct
Headers
| Key | Value | Description |
|---|---|---|
Content-Type | application/json | |
signature | string | Generated Signature |
va | string | Virtual Account Number |
timestamp | string | Request timestamp |
Body Parameters
| Key | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Buyer name |
phone | string | Yes | Buyer phone number |
email | string | Yes | Buyer email |
amount | number | Yes | Total payment amount |
notifyUrl | string | Yes | Webhook URL for callback payment notifications |
referenceId | string | Yes | Transaction reference ID |
paymentMethod | string | Yes | Payment method. Value: va, cstore, cod, qris, cc, paylater,ewallet. |
paymentChannel | string | Yes | Payment channel of the payment method. See details below table. |
expired | number | No | Custom 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) |
comments | string | No | Transaction notes. |
feeDirection | string | No | Custom fee direction: MERCHANT (fee charged to merchant) or BUYER (fee charged to buyer). |
escrow | string | No | Activation escrow (true or false). |
product[] | array | Conditional | Product details (for COD payment). |
qty[] | array | Conditional | Quantity of product (for COD payment). |
price[] | array | Conditional | Price of product (for COD payment). |
weight[] | array | Conditional | Weight in kg (for COD payment). |
width[] | array | Conditional | Width in cm (for COD payment). |
height[] | array | Conditional | Height in cm (for COD payment) (optional). |
length[] | array | Conditional | Length in cm (for COD payment). |
deliveryArea | string | Conditional | Delivery postal code (for COD payment). |
deliveryAddress | string | Conditional | Delivery address (for COD payment). |
shipping | string | Conditional | Shipping name from API Shipping Calculate (for COD payment). |
shippingService | string | Conditional | Service name from API Shipping Calculate (for COD payment). |
pickupArea | string | Conditional | Pickup area postal code (for COD payment). |
account | string | No | VA child account ID. |
successUrl | string | No | Success URL after payment (for cases of redirect payment like Akulaku & Credit Card). |
cancelUrl | string | No | Cancel 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://my.ipaymu.com/payment/12345"
}
}