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 performs a payment completion redirect, save the values of the following URL parameters:

  1. cardToken

  2. cardExp

  3. cgUid

Take any steps you need before you're ready to charge the customer. Normally, credit card providers allow up to 5 days between authorization and capture requests, although you may want to check the exact limit with your credit card provider.

When you're ready, perform a capture request. This is a standard Hyp 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 returned as the cardToken URL parameter in the payment completion redirect following the authorization request.

  • cardExpiration: the card expiration date that Hyp returned as the cardExp URL parameter in the payment completion redirect.

  • cgUid: the ID that Hyp returned as the cgUid URL parameter in the payment completion redirect.

  • total: the total amount to charge, which can be equal to or less than the authorized amount.

Here's a sample response for a successful capture request:

Show response

Last updated

Was this helpful?