Implementing Recurring Payments
Hyp Enterprise does not provide built-in subscription lifecycle management. It does not store the charge interval, amount, or other subscription payment settings. As the merchant, you are responsible for managing subscription lifecycles internally and using Hyp's API only to execute the transactions.
The API flow differs between the initial payment and subsequent payments.
Initial payment using the payment page
When a customer makes the initial purchase — for example, signs up for a SaaS subscription with monthly billing — you collect the first payment through Hyp's standard payment page.
When Hyp Enterprise performs a payment completion redirect, save the following URL parameters:
cardToken: the token of the customer's card created by Hyp Enterprise.cardExp: the card's expiration date.
You will need these values to initiate subsequent payments.
Implementing subsequent token payments
On the next billing date, perform a server-to-server API request without customer interaction. Send a standard Hyp Enterprise API request with the doDeal command payload in the int_in parameter:
<ashrait>
<request>
<version>2000</version>
<language>ENG</language>
<command>doDeal</command>
<doDeal>
<terminalNumber>{terminalNumber}</terminalNumber>
<cardId>{cardToken}</cardId>
<cardExpiration>{cardExp}</cardExpiration>
<total>{total}</total>
<transactionType>Debit</transactionType>
<creditType>RegularCredit</creditType>
<currency>ILS</currency>
<transactionCode>Internet</transactionCode>
<validation>AutoComm</validation>
</doDeal>
</request>
</ashrait>Variable parameters of the doDeal command in the server-to-server 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 after the first payment.cardExpiration: the card expiration date that Hyp Enterprise returned as thecardExpURL parameter in the payment completion redirect.total: the scheduled payment amount.
Here is an example of a successful response to the server-to-server API request:
Repeat the same server-to-server API request on each subsequent billing date.
Last updated
Was this helpful?