Payment
Direct Payment
This endpoint is used to process direct payments.
Try it in Postman
This endpoint is used to process direct payments.
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 | Timestamp of the request |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Buyer name. |
phone | string | Yes | Buyer phone. |
email | string | Yes | Buyer email. |
amount | number | Yes | Total price. |
notifyUrl | string | Yes | Notify URL for receiving webhooks from iPaymu. (iPaymu will send POST params to this URL when a buyer makes a payment). |
referenceId | string | Yes | Reference/transaction ID from merchant. |
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 the 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) | 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"
}
}