Build the merchant’s receipt page

View as MarkdownOpen in Claude

Create a receipt page on the merchant’s website to display the transaction response to customers.

After the customer submits their payment details, the Hosted Payment Page redirects them to the merchant’s receipt page and appends the transaction response as query parameters. The receipt page must parse these parameters and display a success or decline message.

Note: If a pre-authorization is declined, the Hosted Payment Page still redirects the customer to the receipt page and returns the response in the query parameters.

Before you begin

If you’ve already integrated with run a sale, you’ve completed the following steps:

  • You’ve provided us with the URL of the merchant’s receipt page.
  • You’ve handled the response parameters to run a sale, which are the same for running pre-authorizations. We’ve included them below.

However, you must store the UNIQUEREF from the response so you can capture the pre-authorization later.

Handle the transaction response

The Hosted Payment Page returns the transaction response as query parameters appended to the receipt page URL.

Card details

ParameterTypeSizeDescription
TERMINALIDString1-50 charactersUnique identifier that we assigned to the terminal.
ORDERIDString1-24 charactersUnique identifier that the merchant assigned to the transaction.
APPROVALCODEString0-48 charactersAuthorization code that the processor assigned to the transaction.
AMOUNTDoubleSubtotal of the transaction including taxes. This value doesn’t include surcharges or convenience fees.
RESPONSECODEEnumResponse code for the transaction from the processor. The value is one of the following:
- A - Processor approved the transaction.
- E - Processor authorized the transaction. This enum applies to only China UnionPay cards.
- D - Processor declined the transaction.
- R - Processor declined the transaction, and the customer should contact their bank.
- C - Processor declined the transaction because the payment card was reported lost or stolen.
RESPONSETEXTString0-48 charactersResponse description from the processor.
DATETIMEStringDate and time that the processor received the request and returned a response to our gateway. We return this value in YYYY-MM-DDTHH:MM:SS format, for example, 2026-02-10T14:51:40.
AVSRESPONSEString1 characterIndicates if the address that the customer entered on the Hosted Payment Page matches the address linked to the card. The value is one of the following:
- A - First five numerical characters in the address match, but the ZIP code or postal code doesn’t match.
- E - Transaction isn’t eligible for an AVS check.
- N - Address doesn’t match.
- R - AVS check temporarily unavailable.
- S - Card type not supported by AVS.
- U - Address information unavailable from the card issuer.
- G - Address information unavailable from the card issuer. This value applies to only Visa cards.
- W - ZIP code or postal code matches, but the street address doesn’t.
- X - Address matches.
- Y - Address matches.
- Z - ZIP code or postal code matches, but the street address doesn’t.
CVVRESPONSEString1 characterIndicates if the card verification value (CVV) that the customer entered on the Hosted Payment Page matches the CVV on the card. The value is one of the following:
- M - CVV matches.
- N - CVV doesn’t match.
- P - CVV not processed.
- U - CVV isn’t registered.

Note: Our gateway doesn’t automatically decline transactions when the CVV doesn’t match, unless the merchant has asked us to decline transactions where the CVV doesn’t match.
UNIQUEREFString10 charactersUnique identifier that our gateway assigned to the transaction.

Note: Store the UNIQUEREF if you use our API for follow-on transactions, for example, to refund the transaction.
CARDREFERENCEString12-19 charactersSecure token that represents the customer’s payment details.
EMAILString1-128 charactersCustomer’s email address.
PHONEString5-20 charactersCustomer’s phone number.
REGIONString0-128 charactersRegion of the customer’s billing address.
CITYString0-40 charactersCity of the customer’s billing address.
POSTCODEString0-128 charactersZip code or postal code of the customer’s address.
STATEString0-128 charactersName of the state or state abbreviation of the customer’s billing address.
COUNTRYString2 charactersTwo-letter code for the country of the customer’s card. The format follows the ISO 3166-1 standard.
CARDNUMBERString12-19 charactersMasked card number. Our gateway returns only the first six digits and the last four digits of the card number, for example, 548010******5929.
CARDHOLDERNAMEString0-50 charactersCustomer’s name.
CARDTYPEStringCard brand of the card.
HASHString1-128 charactersSHA-512 hash value that we generate with values from the response parameters and the terminal secret. You can use this hash to verify that the response is legitimate.

We return the hash in the following order:
- [TERMINALID]:[ORDERID]:[AMOUNT]:[DATETIME]:[RESPONSECODE]:[RESPONSETEXT]:[SECRET]
CUSTOMFIELDStringCustom field that you sent in the request.
OTHERFIELDString0-2000 charactersOther field that you sent in the request.
BRANDTXIDENTIFIERString1-50 charactersUnique identifier that the card brand assigns to the transaction. If you use a third-party vault for tokenization, include this value when you use a secure token in follow-on transactions with our API, for example, to refund the transaction.
SECURECARDMERCHANTREFString1-200 charactersUnique identifier that the merchant assigned to the secure token.
STOREDCREDENTIALUSEEnumIndicates how the merchant can use the card details, as agreed by the customer:
- UNSCHEDULED - Transactions for a fixed or variable amount that are run at a certain predefined event.
- RECURRING - Transactions for a fixed amount that are run at regular intervals, for example, monthly. Recurring transactions don’t have a fixed duration and run until the customer cancels the agreement.
- INSTALLMENT - Transactions for a fixed amount that are run at regular intervals, for example, monthly. Installment transactions have a fixed duration.

Note: We return this field only if the merchant has tokenized the card details as part of the transaction.
STOREDCREDENTIALTXTYPEEnumIndicates if a payment with stored card details is the first in a series of payments, or if it is a follow-on payment. The value is one of the following:
- FIRST_TXN - First payment in a series of payments.
- SUBSEQUENT_CARDHOLDER_INITIATED_TXN - Payment that the customer initiates after the first payment in the series.
- SUBSEQUENT_MERCHANT_INITIATED_TXN - Payment that the merchant initiates after the first payment in the series.

Note: We return this field only if the customer used saved payment details for the transaction.
BYPASS_SURCHARGEBooleanIndicates if the merchant has bypassed surcharges for the transaction. The value is one of the following:
- true - Surcharges don’t apply to the transaction.
- false - Surcharges apply to the transaction.

Note: You can’t apply surcharges to pre-authorizations.
ACCEPTTERMSANDCONDITIONSEnumIndicates if the customer accepted the terms and conditions for convenience fees. We return a value of ON because the customer can’t complete the transaction without accepting the terms and conditions.

Note: You can’t apply convenience fees to pre-authorizations.
CONVENIENCE_FEEDoubleConvenience fee that the merchant applied to the transaction.

Note: You can’t apply convenience fees to pre-authorizations.
SURCHARGE_FEEDoubleSurcharge fee that the merchant applied to the transaction.

Note: You can’t apply surcharges to pre-authorizations.
SURCHARGE_PERCENTDoubleSurcharge percentage that the merchant applied to the transaction.

Note: You can’t apply surcharges to pre-authorizations.
DL_NUMBERString0-30 charactersLicense number of the customer’s driver’s license.
DL_STATEString2 charactersTwo-character abbreviation of the state that issued the customer’s driver’s license, for example, IL.
POSDEVICEString0-30 charactersName of the POS device that captured the customer’s payment details.

Example response

https://[receipt_page_url].com/receipt?DL_NUMBER=&DL_STATE=&CARDREFERENCE=&POSDEVICE=&STATE=&OTHERFIELD_1=Other+Field1&ORDERID=HPP967631811&AMOUNT=10.17&BYPASS_SURCHARGE=&ACCEPTTERMSANDCONDITIONS=ON&SECURECARDMERCHANTREF=&REGION=&TERMINALID=3204004&CITY=&CONVENIENCE_FEE=2.00&RESPONSETEXT=OK8835&RESPONSECODE=A&APPROVALCODE=OK8835&CVVRESPONSE=M&DATETIME=2026-02-10T09:16:23&UNIQUEREF=JH1TY9LL4S&EMAIL=vvd%40worldnettps.it&PHONE=8000005555&CARDTYPE=VISA%20DEBIT&CARDNUMBER=411111******1111&HASH=70a28ef2f11f3b415ba0aac52631cb2755a56641bfebaa33dd581f59b9cf3a48e264e5710886987bf5cd54967a67716b2b256ed92ce33ca529547c024b5e9398