Payment

Redirect Payment

Test on Postman

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

API ENVIRONMENT

Endpoint

POST
https://sandbox.ipaymu.com/api/v2/payment

Use credentials from the selected environment. Sandbox and Production credentials are separate.

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.

Redirect Payment Integration Flow

6 sequential steps using iPaymu hosted checkout page

Step 1POST /payment

Request Redirect Payment

Merchant uploads order details to /api/v2/payment along with returnUrl, notifyUrl & cancelUrl.

1 of 6
Step 2Checkout Url

Receive SessionID & Checkout Url

iPaymu returns SessionID & hosted checkout payment Url.

2 of 6
Step 3Browser Redirect

Redirect Customer to iPaymu

Merchant system redirects customer to iPaymu Hosted Payment Page.

3 of 6
Step 4Hosted Checkout UI

Select Channel & Pay

Customer selects preferred payment channel (VA / e-Wallet / QRIS / CC) on iPaymu UI & completes transaction.

4 of 6
Step 5HTTP Callback

Webhook Callback Notification

iPaymu sends HTTP POST callback notification to Merchant notifyUrl.

5 of 6
Step 6returnUrl Complete

Redirect Back to Merchant

iPaymu redirects customer back to Merchant returnUrl (Success Page).

6 of 6
DONE

Request Headers

Content-Type

string
Example / value
application/json
Description
MIME type of the JSON request body.

va

string
Example / value
YOUR_VA
Description
Merchant Virtual Account number. Get it from the Integration menu in your iPaymu dashboard: Production / Sandbox. Use the VA for the selected environment.

signature

string · 64 hex
Example / value
GENERATED_SIGNATURE
Description
Generate an HMAC-SHA256 signature for this request using the API Key from Production / Sandbox. Do not copy the API Key into this header. See Signature Generation.

timestamp

string · 14 digits
Example / value
20260102153045
Description
Request creation time in YYYYMMDDHHmmss format (example: 2 Jan 2026, 15:30:45). Check the endpoint guide if it specifies ISO 8601 instead.

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).
accountstringNoVA child account ID (optional).

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