Integration Journey
The Subscription Module allows SmartPay integrators to create and manage complex subscriptions, plans, monitor charges and automated payments.
Authentication
Subscription solution supports strong API authentication. Thus, in order to authenticate within the APIs, basic authorisation header is to be provided, using:
- Username: being your
merchantKey
- Password: key provided
(merchantKey
& Passwords shall be provided by your dedicated Product Solutions Specialist).
Additionally, the merchantKey
must be provided in the HEADER of the request in the property X-API-KEY (merchantKey
should be previously provided by your dedicated Product Solutions Specialist Sandbox vs. Production).
This must be done for every request to the Subscription APIs. If not provided, the API will return HTTP 403 - Forbidden.
Subscription Process Flow
- Subscription Plans are created by calling the Subscription Module API
Create Subscription Plan
. Theplan ID
returned in the response could be then used for creating underlying subscription(s). - Your server creates a new subscription by calling the API method
Create subscription
. Alongside your secret Merchant Key which authenticates your request, you shall provide also theCustomer Account ID
for an existing or a new customer. You would receive a response including the TheSubscription ID
, which is a unique identifier of the subscription. - Your server forwards the
Subscription ID
to your client for the initialization of the Subscription Widget. - The customer securely submits their payment information via the initialized Subscription Widget. It directly communicates to the acquirer for the authentication of the payment instrument. Once finished, it provides the storing of the payment option status via a JavaScript callback.
- The stored payment option would then be used by our system to trigger MIT payments as per the Subscription details (amount, recurrence, ect). Depending on the details of the created subscription, our backend would create a billing cycle for each due charge. Each billing cycle would be linked to at least one transaction.
For the full details of the available features and APIs please refer to this section.
Payment Serie Process Flow
- A Payment Serie is created by calling the Subscription Module API
Create Payment Serie
. You would receive a response including the ThePayment Serie ID
, which is a unique identifier of the payment serie. - Your server forwards the
Payment Serie ID
to your client for the initialization of the Subscription Widget. - The customer securely submits their payment information via the initialized Subscription Widget. It directly communicates to the acquirer for the authentication of the payment instrument. Once finished, it provides the storing of the payment option status via a JavaScript callback.
- At this point, whenever you want to trigger an MIT transaction under the created Payment Serie, you can call the Create PS Transaction API.
For the full details of the available features and APIs please refer to this section.