Payment

Direct Payment

PostmanTest on Postman

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

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

Endpoint: POST https://my.ipaymu.com/api/v2/payment/direct

Headers

KeyValueDescription
Content-Typeapplication/json
signaturestringGenerated Signature
vastringVirtual Account Number
timestampstringRequest timestamp

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://my.ipaymu.com/payment/12345"
  }
}

On this page