Payment Page Authorization
If you want to collect card data through a payment page, send an authorization request and then, once you've checked your inventory, send a follow-up capture request, here's what you need to do.
First, send a payment page request where, inside the doDeal command, mpiValidation is set to Verify:
<ashrait>
<request>
<version>2000</version>
<language>ENG</language>
<command>doDeal</command>
<doDeal>
<terminalNumber>{terminalNumber}</terminalNumber>
<cardNo>CGMPI</cardNo>
<total>{totalAmount}</total>
<transactionType>Debit</transactionType>
<creditType>RegularCredit</creditType>
<currency>ILS</currency>
<transactionCode>Internet</transactionCode>
<validation>TxnSetup</validation>
<mid>{mid}</mid>
<uniqueid>{uniqueId}</uniqueid>
<mpiValidation>Verify</mpiValidation>
<successUrl>{successUrl}</successUrl>
<errorUrl>{errorUrl}</errorUrl>
</doDeal>
</request>
</ashrait>Extract and handle the returned payment page URL as usual.
When Hyp Enterprise performs a payment completion redirect, save the values of the following URL parameters:
cardTokencardExpcgUid
If your authorization request allowed installments, save the following values as well:
numberOfPaymentsperiodicalPaymentfirstPayment
Take any steps you need before you're ready to charge the customer. Normally, acquirers allow up to 5 days between authorization and capture requests, although you may want to check the exact limit with your acquirer.
When you're ready, perform a capture request. This is a standard Hyp Enterprise API request with the doDeal command payload in the int_in parameter:
Variable parameters of the doDeal command in a capture request are:
terminalNumber: a unique number assigned to you as a merchant during registration.cardId: the card token that Hyp Enterprise returned as thecardTokenURL parameter in the payment completion redirect following the authorization request.cardExpiration: the card expiration date that Hyp Enterprise returned as thecardExpURL parameter in the payment completion redirect.cgUid: the ID that Hyp Enterprise returned as thecgUidURL parameter in the payment completion redirect.total: the total amount to charge, which can be equal to or less than the authorized amount.If your authorization request allowed installments, make sure to also include
numberOfPayments,periodicalPaymentandfirstPaymentas saved from the payment completion redirect. If the amount you charge is less than the authorized amount, you need to recalculate the values of these three parameters. For more details, see Installments in Direct Charge and Two-Phase Commit.
Here's a sample response for a successful capture request:
Last updated
Was this helpful?