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.

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

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).
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