Payment

Redirect Payment

PostmanTest on Postman

Redirect Payment allows you to use iPaymu's hosted payment page.

Try it in Postman

Redirect Payment allows you to use iPaymu's hosted payment page. This is the easiest way to integrate if you don't want to handle the UI for payment selection.

Production Requirement

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

Endpoint

URL: {{baseUrl}}/api/v2/payment Method: POST

Request Headers

KeyValueDescription
Content-Typeapplication/json
signature{{signature}}Generated signature. See Signature Generation.
va{{va}}Your Virtual Account Number.
timestamp{{timestamp}}Current timestamp.

Request Body

ParameterTypeRequiredDescription
product[]arrayYesList of product names.
qty[]arrayYesList of product quantities.
price[]arrayYesList of product prices.
description[]arrayYesList of product descriptions.
imageUrl[]arrayNoOptional. Replace product image on iPaymu payment page. Ordered by index.
returnUrlstringYesURL to redirect after successful payment.
notifyUrlstringYesURL to receive webhook notifications.
cancelUrlstringYesURL to redirect after failed/cancelled payment.
referenceIdstringNoYour unique transaction ID.
buyerNamestringNoBuyer's name.
buyerEmailstringNoBuyer's email.
buyerPhonestringNoBuyer's phone.
expirednumberNoCustom expiry time in hours.
feeDirectionstringNoBUYER or MERCHANT.
paymentMethodstringNoPre-select payment method (e.g., va, cc).

Example Request

{
  "product": ["T-Shirt"],
  "qty": ["1"],
  "price": ["100000"],
  "description": ["Blue Size L"],
  "imageUrl": ["https://images.com/example.jpg"],
  "returnUrl": "https://your-website.com/thank-you",
  "notifyUrl": "https://your-website.com/callback",
  "cancelUrl": "https://your-website.com/cancel",
  "referenceId": "INV-002"
}

Example Response (Success)

{
  "Status": 200,
  "Message": "success",
  "Data": {
    "SessionID": "91538218-5158-459B-8716-DD97FFE3EDAB",
    "Url": "https://sandbox.ipaymu.com/payment/91538218-5158-459B-8716-DD97FFE3EDAB"
  }
}

You should redirect the user to the Url provided in the response.

On this page