Zain Iraq
Two Click Integration with your Landing or Payment Page
Two Click flow for Zain Iraq is only available using Checkout.
Normally if Two Click fails, it will redirect to the Pin Flow hosted on Checkout. However if you would like to host the Pin Flow then this is still possible.
All HTTP request parameters should be passed in URL Query String - query_params.
Subscription
Redirect the customer to http://msisdn.sla-alacrity.com/purchase
Info
Please ensure you use http
Include the following parameters in the query string:
Name | Description | Type | Usage |
---|---|---|---|
merchant | The merchant URI that identifies your merchant and can be obtained via the Alacrity portal. | string | mandatory |
service | The unique URI for your service which can be obtained via the Alacrity portal. | string | mandatory |
redirect_url | Your URL that we will automatically redirect the customer back to after checkout. | string | mandatory |
locale | The language code as defined in ISO639-1. The chosen language will be used to display the UI. | string | optional |
correlator | A unique string for this transaction. | string | optional (mandatory only for Telenor, Axiata, UK) |
two_click_only | Set to true if you only want to use Checkout for Two Click flow | Boolean | optional |
If any of the above parameters are missing you will be returned to your redirect url (except if redirect_url is missing).
Example Request
http://msisdn.sla-alacrity.com/purchase?merchant={merchant_uri}&service={service_uri}&correlator={correlator}&redirect_url={url}&two_click_only=true
http://msisdn.sla-alacrity.com/purchase?
merchant=partner:4e3f654ed86dbb113bb472be07630b3cb6ad0859&
service=campaign:940d351138df895e8dedf51e5d7b90788cdc23d0
&correlator=123XYZ
&redirect_url=http://test.com/api/callback/123?transaction_id=XXXXXXXX
&two_click_only=true
http://test.com/api/callback/123?
transaction_id=XXXXXXXX&
status=success&
msisdn=9641234567890&`
Once Checkout redirects back to you with status success, no further API calls are required, we will try to subscribe the MSISDN and you will receive a call-back notification if the subscription was successful or not. For more information on HTTP call back notifications please read here. https://docs.sla-alacrity.com/http-notifications
If Two click fails, at which point we redirect to you depends on if you have set two_click_only. If it is set to true, then we will always redirect back to your redirect URL. The response may look like this:
http://test.com/api/callback/123?
status=error&
message=NoHe
transaction_id=XXXXXXXX`
In this example, Two Click failed because retrieving the MSISDN via header enrichment was unsuccessful. It is then your responsibility to host the PIN SMS flow. Information on PIN SMS flow can be found here: https://docs.sla-alacrity.com/docs/pin-flow-otp
However if two_click_only is not set to true, SLA will handle the PIN SMS flow via Checkout. In this case, if the pin flow is successful on checkout, we will redirect back to your redirect url:
http://your-redirect-url?status=success&token={token}
http://test.com/api/callback/123?
transaction_id=XXXXXXXX&
status=success&
token=TOKEN:1c86724f-b09b-4bed-be8f-4683se8efs34&
auth_method=sms_pin
You will then need to call the subscription/create API using the returned token in place of the MSISDN. More information can be found here: https://docs.sla-alacrity.com/docs/checkout-1
Two Click related Errors
Errors will be returned to your redirect url and will have the following format:
http://your-redirect-url/?status=error&message={reason_for_the_error}&transaction_id={transaction_id}
Errors specific to Two click hosted on checkout include the following:
- Subscriptions Exceeded - Can only subscribe to the same service once in a 24 hour period.
- NoHe - Header enrichment failed.
- Block - Fraud detector blocked the subscription attempt.
Examples:
http://your-redirect-url?status=error&message=Block&transaction_id=c12bc5d2-3ae4-4cee-ba36-e4ce9ac5349b
http://your-redirect-url?status=error&message=NoHe&transaction_id=c12bc5d2-3ae4-4cee-ba36-e4ce9ac5349b