Payment

Direct Payment

PostmanTest on Postman

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

KeyValueDescription
Content-Typeapplication/json
signaturestringGenerated signature
vastringVirtual Account number
timestampstringTimestamp of the request

Body Parameters

ParameterTypeRequiredDescription
namestringYesBuyer name.
phonestringYesBuyer phone.
emailstringYesBuyer email.
amountnumberYesTotal price.
notifyUrlstringYesNotify URL for receiving webhooks from iPaymu. (iPaymu will send POST params to this URL when a buyer makes a payment).
referenceIdstringYesReference/transaction ID from merchant.
paymentMethodstringYesPayment method. Value: va, cstore, cod, qris, cc, paylater,ewallet.
paymentChannelstringYesPayment channel of the payment method. See details below the 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)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