Skip to main content

Pay-In · Philippines

TOPPAY TeamAbout 3 min

Overview

The Pay-In API initiates collection transactions from customers. This page covers the Philippines (country code ph) with two ordering modes:

ModePathDescription
Cashier mode/pay/prePayDefault. Returns cashierUrl for the platform H5 cashier
API mode/pay/transOrderRequires method in the request; returns payData / payDataType (payment redirect URL, etc.)

method (Philippines Pay-In codes) is listed in Regional Payment Guide — Philippines.

Integration note

Cashier mode is enabled by default. Contact support to whitelist your merchant account before integrating API mode.

Request Header

Shared by both modes:

FieldRequiredTypeDescription
Content-TypeMStringFixed value: application/json

Cashier Mode (prePay)

Pre-order and redirect the customer to the platform cashier via cashierUrl.

Request URL

Domain: Prefer unified host openapi.toppayment.com (path unchanged); legacy country domain (e.g. global-ph-openapi.toppayment.com) remains available.

EnvironmentURL
Sandboxhttps://openapi.toppayment.com/sandbox/ph/pay/prePay
Productionhttps://openapi.toppayment.com/ph/pay/prePay

Request Body

FieldRequiredTypeDescription
mchNoMString(32)Merchant number
orderNumMString(64)Merchant order number
amountMNumber(32,8)Transaction amount
Philippines: at most 2 decimal places
Example: 100, 100.50
productDetailMString(100)Product detail
methodOString(16)Payment method (Philippines)
Optional; omit to let the user choose on the cashier. Examples: GCASH, MAYA, QRPH, GCASH_WEB — full list: Regional Payment Guide — Philippines
timestampMString(13)Timestamp in milliseconds
customerNameMString(64)Customer name
customerEmailMString(64)Customer email
customerPhoneMString(32)Customer phone
expiryPeriodONumber(1–9999)Validity in minutes
downNotifyUrlMString(255)Async callback URL
redirectUrlOString(512)Redirect after payment
signMStringSignature — see Signature

Request Body Example

Content-type: application/json

Response Body Parameters

FieldRequiredTypeDescription
successMBooleanSuccess flag
codeMString9999 = success
msgOStringMessage
timeStampMNumberServer time (ms)
dataMObjectPayload
orderNumMStringMerchant order number
platOrderNumMStringPlatform order number
amountMNumberTransaction amount
feeMNumberFee
methodMStringPayment method — Regional Payment Guide — Philippines
productDetailMStringProduct detail
customerNameMStringCustomer name
customerEmailMStringCustomer email
customerPhoneMStringCustomer phone
validTimeMNumberExpiry timestamp (ms)
cashierUrlMStringCashier URL

Response note

Cashier mode does not return payData or payDataType. Those fields appear only in API mode responses.

Content-type: application/json

API Mode (transOrder)

Specify the payment method in the request, place the order directly with the channel, and receive payData / payDataType without the platform H5 cashier.

Request URL

EnvironmentURL
Sandboxhttps://openapi.toppayment.com/sandbox/ph/pay/transOrder
Productionhttps://openapi.toppayment.com/ph/pay/transOrder

Request Body

Differences from cashier mode:

FieldRequiredTypeDescription
methodMString(16)Payment method (Philippines)
Required in API mode. Examples: GCASH, MAYA, QRPH, GCASH_WEB, MAYA_WEB, GRABPAY_WEB, GCASH_WAP, MAYA_WAP — full list: Regional Payment Guide — Philippines

All other fields match cashier mode.

Request Body Example

Content-type: application/json

Response Body Parameters

Common fields (success, code, msg, timeStamp, and data.orderNum, platOrderNum, amount, fee, method, productDetail, customerName, customerEmail, customerPhone, validTime) match cashier mode. API mode focuses on:

FieldRequiredTypeDescription
payDataMStringPayment payload — usually an upstream payment page URL; meaning depends on payDataType
payDataTypeMStringPayment data type
Philippines e-wallet flows commonly use CASHIER_URL

payDataType Reference

payDataTypeDescriptionTypical methods
CASHIER_URLUpstream payment page URLGCASH, MAYA, GCASH_WAP, GCASH_WEB, MAYA_WAP, MAYA_WEB, GRABPAY_WEB
QR_CODERaw QRPH QR code payloadQRPH
Content-type: application/json

Notification

Both ordering modes use the same async callback. The Philippines market uses v1 onlynotifyVersion / v2 payer fields are not supported.

HTTP Request (callback)

FieldRequiredTypeDescription
Content-TypeMStringapplication/json

Notification Body

FieldRequiredTypeDescription
platOrderNumMStringPlatform order number
versionMStringFixed value: v1
orderNumMStringMerchant order number
amountMNumberAmount
feeMNumberFee
customerNameMStringCustomer name
customerEmailMStringCustomer email
customerPhoneMStringCustomer phone
statusMStringStatus — see Transaction Status Codes
signMStringCallback signature

Response

Info

Return only the string SUCCESS to acknowledge the notification.

{
    "platOrderNum": "PRE2009165141186183168",
    "version": "v1",
    "orderNum": "PH12324521",
    "amount": 100,
    "fee": 2,
    "customerName": "AMY",
    "customerEmail": "[email protected]",
    "customerPhone": "0817773255",
    "status": "SUCCESS",
    "sign": "m5++HHEOfaVL3opFSuihVE4kkdLaCyhpFVSSLJld8WeEhlH93Ido5MQQ6peWrf+8eCkQd127jesL9esQDdFAiGKkem5BwvqTAvZGQm9v7M33Sy+W58OkGkb3/8BxQwCLTIUouhwpj1TwIeqP3JWo3AFMm5qezH3JbVfOd1IZ9Gw="
}