Axiata
- Integration to Axiata One Off/Subscription services should be done through Checkout.
- The One Off/Subscription response will be async
- Axiata does use our Pin API.
- Axiata subscriptions do not support free/trial periods.
- Merchants required to provide notification_url for both One Off/Subscription services.
- The response states if the One Off charge/Subscription created is asynchronous (which means we will send an HTTP notification for One Off/Subscription if it is success/fail).
For details of request and response parameters please consult the API Reference.
Subscription
Subscription will be done through Checkout but the differences described here.
Redirect the customer to https://checkout.sla-alacrity.com/purchase/axiata
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 |
transaction_id | A unique ID generated by you that identifies this transaction. | string | mandatory |
If any of the above parameters are missing you will be returned to your redirect URL as below, except for redirect_url.
Example Request
https://checkout.sla-alacrity.com/purchase/axiata?merchant={merchant_uri}&service={service_uri}&transaction_id={transaction_id}&redirect_url={url}
HTTP/1.1 200 OK
Content-Type: application/json
{
"success":
{
"type": "subscription",
"uuid": "c537bf6a-8603-466c-9eaa-bf6d3faed28c",
"bill_id": "6ab07c272683N",
"operator": "axiata-lk",
"merchant": "partner:02c76113-0ca7-4aed-88e2-75267bf85e82",
"campaign": "campaign:940d351138df895e8dedf51e5d7b90788cdc23d0",
"environment": "test",
"msisdn": "94770000000",
"currency": "LKR",
"amount": "0.5",
"mode": "API",
"frequency": "daily",
"next_payment_timestamp": "2015-08-27T10:58:12.026Z",
"transaction":
{
"status": "CHARGED",
"bill_id": "6ab07c272683N",
"timestamp": "2015-08-26T10:58:12.026+00:00",
"transaction_id": "1910173"
}
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"error":
{
"type": "subscription",
"operator": "axiata-lk",
"merchant": "partner:02c76113-0ca7-4aed-88e2-75267bf85e82",
"campaign": "campaign:940d351138df895e8dedf51e5d7b90788cdc23d0",
"environment": "test",
"msisdn": "94770000000",
"currency": "LKR",
"amount": "0.5",
"mode": "API",
"frequency": "daily",
"transaction":
{
"status": "ACCOUNT_NOT_FOUND",
"message": "Account could not be found",
"timestamp": "2015-08-26T10:58:12.026+00:00",
"transaction_id": "1910173"
}
}
}
Name | Description | Type | Usage |
---|---|---|---|
type | An indication of the transaction type. Below is a list of the possible values: | string | mandatory |
uuid | The universally unique identifier for the subscription. | string | mandatory |
bill_id | The unique identifier representing all renewal attempts for one bill period. | string | mandatory |
operator | The mobile operator code. | string | mandatory |
merchant | The Alacrity merchant URI that identifies which merchant this transaction belongs to. | string | mandatory |
campaign | The Alacrity service URI that identifies the service that this transaction belongs to. | string | mandatory |
environment | The environment that your API credential belong to. Below is a list of the possible values: | string | mandatory |
msisdn | The subscriber MSISDN that the subscription has been created for. | string | mandatory |
currency | Currency code as defined in ISO4217. | string | mandatory |
amount | The decimal amount that has been charged. | numeric | mandatory |
mode | An indication of the transaction mode. Below is a list of the possible values: | string | mandatory |
frequency | The frequency of subscription renewal. Below is a list of the possible values: | ||
next_payment_timestamp | The timestamp for the next scheduled renewal in UTC time standard. | string | optional |
status | The transaction status. A list of the possible values found here | string | mandatory |
message | The error description if any. | string | optional |
timestamp | The transaction timestamp in UTC time standard. | string | mandatory |
transaction_id | The API generated and unique transaction's identifier. | integer | mandatory |
Subscription Status
You may refer to Subscription Status
Subscription Delete
You may refer to Subscription API Usage
One Off Charge
Redirect the customer to https://checkout.sla-alacrity.com/purchase/axiata
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 |
transaction_id | A unique ID generated by you that identifies this transaction. | string | mandatory |
price | The decimal amount that you want to charge | numeric | mandatory |
If any of the above parameters are missing you will be returned to your redirect URL as below, except for redirect_url.
Example Request
https://checkout.sla-alacrity.com/purchase/axiata?merchant={merchant_uri}&service={service_uri}&transaction_id={transaction_id}&price={price}&redirect_url={url}
Success
If the process is successfully finished you will receive the following via http redirect callback:
http://your-redirect-url?status=success&transaction_id={transaction_id}&uuid={uuid}
Errors
Other errors will be returned to your redirect URL and will have the following format:
http://your-redirect-url/?status=error&transaction_id={transaction_id}&message={reason_for_the_error}
HTTP/1.1 200 OK
Content-Type: application/json
{
"success":
{
"type": "charge",
"uuid": "c537bf6a-8603-466c-9eaa-bf6d3faed28c",
"operator": "axiata-lk",
"merchant": "partner:02c76113-0ca7-4aed-88e2-75267bf85e82",
"campaign": "campaign:940d351138df895e8dedf51e5d7b90788cdc23d0",
"environment": "test",
"msisdn": "94770000000",
"currency": "LKR",
"amount": "0.5",
"transaction":
{
"status": "CHARGED",
"timestamp": "2015-08-26T10:58:12.026+08:00",
"transaction_id": "1910173"
}
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"error":
{
"type": "charge",
"operator": "axiata-lk",
"uuid": "c537bf6a-8603-466c-9eaa-bf6d3faed28c",
"merchant": "partner:02c76113-0ca7-4aed-88e2-75267bf85e82",
"campaign": "campaign:940d351138df895e8dedf51e5d7b90788cdc23d0",
"environment": "test",
"msisdn": "94770000000",
"currency": "LKR",
"amount": "0.5",
"transaction":
{
"status": "ACCOUNT_NOT_FOUND",
"timestamp": "2015-08-26T10:59:10.000+08:00",
"transaction_id": "1910174"
}
}
}
Name | Description | Type | Usage |
---|---|---|---|
type | An indication of the transaction type. Below is a list of possible values: | string | mandatory |
uuid | The universally unique identifier for the charge. | string | optional |
operator | The mobile operator code. | string | mandatory |
merchant | The Alacrity merchant URI that identifies which merchant this transaction belongs to. | string | mandatory |
campaign | The Alacrity service URI that identifies the service that this transaction belongs to. | string | mandatory |
environment | The environment that your API credential belong to. Below is a list of possible values: | string | mandatory |
msisdn | The subscribers MSISDN that has been refunded. | string | mandatory |
currency | Currency code as defined in ISO4217. | string | mandatory |
amount | The decimal amount that has been refunded. | numeric | mandatory |
status | The transaction status. A list of possible values found here | string | mandatory |
message | The error description if any. | string | optional |
timestamp | The transaction timestamp in UTC time standard. | string | mandatory |
transaction_id | The API generated and unique transactions identifier. | integer | mandatory |
HTTP Notifications
You may refer to HTTP Notifications
Updated about 3 years ago