Implementing Recurring Payments
Hyp does not provide built-in subscription lifecycle management. It does not store the charge interval, amount, or other recurring 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 performs a payment completion redirect, save the following URL parameters:
cardToken: the token of the customer's card created by Hyp.cardExp: the card's expiration date.
You will need these values to initiate subsequent payments.
Second and subsequent payments
On the next billing date, perform a server-to-server payment request without customer interaction. Send a standard Hyp 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 returned as thecardTokenURL parameter in the payment completion redirect after the first payment.cardExpiration: the card expiration date that Hyp 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 payment request:
Repeat the same server-to-server payment request on each subsequent billing date.
Last updated
Was this helpful?