Redirect Payment
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
Request Redirect Payment
Merchant uploads order details to /api/v2/payment along with returnUrl, notifyUrl & cancelUrl.
Receive SessionID & Checkout Url
iPaymu returns SessionID & hosted checkout payment Url.
Redirect Customer to iPaymu
Merchant system redirects customer to iPaymu Hosted Payment Page.
Select Channel & Pay
Customer selects preferred payment channel (VA / e-Wallet / QRIS / CC) on iPaymu UI & completes transaction.
Webhook Callback Notification
iPaymu sends HTTP POST callback notification to Merchant notifyUrl.
Redirect Back to Merchant
iPaymu redirects customer back to Merchant returnUrl (Success Page).
Endpoint
URL: {{baseUrl}}/api/v2/payment
Method: POST
Request Headers
| Key | Value | Description |
|---|---|---|
Content-Type | application/json | |
signature | {{signature}} | Generated signature. See Signature Generation. |
va | {{va}} | Your Virtual Account Number. |
timestamp | {{timestamp}} | Current timestamp. |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
product[] | array | Yes | List of product names. |
qty[] | array | Yes | List of product quantities. |
price[] | array | Yes | List of product prices. |
description[] | array | Yes | List of product descriptions. |
imageUrl[] | array | No | Optional. Replace product image on iPaymu payment page. Ordered by index. |
returnUrl | string | Yes | URL to redirect after successful payment. |
notifyUrl | string | Yes | URL to receive webhook notifications. |
cancelUrl | string | Yes | URL to redirect after failed/cancelled payment. |
referenceId | string | No | Your unique transaction ID. |
buyerName | string | No | Buyer's name. |
buyerEmail | string | No | Buyer's email. |
buyerPhone | string | No | Buyer's phone. |
expired | number | No | Custom expiry time in hours. |
feeDirection | string | No | BUYER or MERCHANT. |
paymentMethod | string | No | Pre-select payment method (e.g., va, cc). |
account | string | No | VA 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.