Hosted pages
Hosted checkout
POST /pgui/jsp/paymentrequest — browser form (application/x-www-form-urlencoded or multipart). The customer types the card on this host. Shoppers never enter a card in WooCommerce or Shopify.
Required fields
| Field | Notes |
|---|---|
| APP_ID | Your APP_ID. Seeded demo merchant: 1000221129001154 |
| ORDER_ID | Your reference. Duplicate sale for the same APP_ID returns 018 |
| TXNTYPE | Must be SALE |
| CUST_FIRST_NAME, CUST_LAST_NAME | Required |
| CUST_CITY, CUST_STATE, CUST_COUNTRY, CUST_ZIP | Required. Country is ISO-2 (AE, US) |
| CUST_PHONE, CUST_EMAIL | Required |
| AMOUNT | Minor units, integer string |
| CURRENCY_CODE | ISO numeric. Unknown → 130 |
| RETURN_URL | Where the browser is auto-POSTed after the sale |
| HASH | See HASH. Hash the fields you actually post |
Optional: CUST_STREET_ADDRESS1, PRODUCT_DESC, CUST_NAME, PAYMENT_TYPE. Card fields are not required on this call — the hosted page collects them.
What happens
- If HASH / merchant / required fields fail, you get an HTML error page (
RESPONSE_CODEin the body). - Without PAN: the server stores a session and returns the hosted card form. The form posts to
/pgui/jsp/hostedPaywithSESSION_ID,CARD_NUMBER,CARD_EXP_DT(MMYYYY),CVV. - Mastercard test card → captured, then an auto-POST to
RETURN_URLwith signed result fields. - Visa 3DS test card → a sandbox challenge page (one button, no OTP). Completing it posts to
/pgui/jsp/hostedChallenge, then toRETURN_URL. - Decline PAN → declined, then the same auto-POST with
STATUS=Declined.
Return fields
The return POST includes ORDER_ID, TXN_ID, AMOUNT, CURRENCY_CODE, RESPONSE_CODE, STATUS, CARD_MASK, MOP_TYPE, AUTH_CODE, RRN, ECI, HASH, and the customer echoes. Treat fulfilment as pending until you call transactionStatus.
Iframe
You may post the same form with target pointing at an iframe and load /pgui/checkoutlibrary/checkout.min.js. The helper only submits into that iframe.
Which processor runs the sale
The merchant’s assigned acquirerId (My Profile → Processor management) is what hosted checkout calls. Paste that processor’s keys on the same screen. Then enable methods on Payment methods — hosted checkout only collects enabled, wired methods (card eCom today). See Payment methods. Cart plugins post to this hosted path — see store plugins. Details: Processors.
<form method="post" action="/pgui/jsp/paymentrequest">
<input type="hidden" name="APP_ID" value="1000221129001154">
<input type="hidden" name="ORDER_ID" value="ORD-SANDBOX-1">
<input type="hidden" name="TXNTYPE" value="SALE">
<!-- customer + amount + HASH -->
<button type="submit">Pay</button>
</form>