API reference

Charging as a Service

Monetize your app with frictionless micro-payments. Charge an amount directly to a subscriber's Banglalink bill, approved by an OTP they enter. No cards, no wallets.

Base URL
https://api.applink.com.bd
Content type
application/json;charset=utf-8
Endpoints
3
POST

OTP Generation

https://api.applink.com.bd/caas/direct/debit

This service is used by the developer to initiate a one time charging for the subscriber on his/her mobile account. Upon the request, Applink will generate and send an OTP to the subscriber's MSISDN. This OTP must be entered by the subscriber into the mobile/web application to authorize the one time charge.

Request body

application/json;charset=utf-8

applicationId
stringRequired
Used to identify the application. This is a unique identifier generated while provisioning an application. Only a single value can be sent per request.
ExampleAPP_999999
password
stringRequired
This API key will be sent to your registered email address on the platform upon application approval.
Examplea07118cda5215fc6d01db5b2ab848edd
externalTrxId
stringRequired
This is the transaction ID generated by the application to map the request with the response. This is needed to provide information when there are inquiries related to a transaction. Only a single value can be sent per request.
Example256091232
amount
stringRequired
Amount to be reserved for charging. Only a single value can be sent per request.
Example5.00
paymentInstrumentName
stringRequired
The name of the payment instrument. Only a single value can be sent per request.
ExampleMobile Account
subscriberId
stringRequired
This is the MSISDN of the subscriber to be charged. This is a unique identifier. Eg: tel: 8801959979376 Note: This can be a masked number depending on the type of the application. Only a single value can be sent per request.
Exampletel:8801973579363
Currency
stringRequired
Currency unit of the amount. Only a single value can be sent per request. Only ‘BDT’ is allowed.
ExampleBDT
curl -X POST https://api.applink.com.bd/caas/direct/debit \
  -H "Content-Type: application/json;charset=utf-8" \
  -d '{
    "applicationId": "APP_999999",
    "password": "a07118cda5215fc6d01db5b2ab848edd",
    "externalTrxId": "256091232",
    "amount": "5.00",
    "paymentInstrumentName": "Mobile Account",
    "subscriberId": "tel:8801973579363",
    "Currency": "BDT"
  }'

Response

timeStamp
stringRequired
The time that the request was sent
Example2023-11-08T08:02:16.913Z
externalTrxId
stringRequired
This is the transaction ID generated by the application to map the request with the response. Only a single value can be sent per request.
Example256091232
statusDetail
stringRequired
Human-readable description of the status. See the status code table.
ExampleRequest successfully proceed. OTP will send to user.
requestCorrelator
stringRequired
The unique identifier used internally within the system to identify the transaction
Example8801442233146169943053700500040
internalTrxId
stringRequired
The transaction ID generated by the service provider which can be used to track the transaction
Example9110808020001876
statusCode
stringRequired
Status code for the request. S = success, E = error, P = partial. See the status code table.
ExampleP1003
JSON
{
  "timeStamp": "2023-11-08T08:02:16.913Z",
  "externalTrxId": "256091232",
  "statusDetail": "Request successfully proceed. OTP will send to user.",
  "requestCorrelator": "8801442233146169943053700500040",
  "internalTrxId": "9110808020001876",
  "statusCode": "P1003"
}
POST

OTP Verification

https://api.applink.com.bd/caas/otp/verify

This service is used by the developer to verify an OTP entered by a subscriber into the application. Upon a successful verification, one time charging will be deducted from the subscriber's mobile account.

Request body

application/json;charset=utf-8

applicationId
stringRequired
Used to identify the application. This is a unique identifier generated while provisioning an application. Only a single value can be sent per request.
ExampleAPP_999999
password
stringRequired
This API key will be sent to your registered email address on the platform upon application approval.
ExampleYour API Key
referenceNo
stringRequired
The value returned for parameter 'requestCorrelator' in the response of the CaaS OTP generation request must be used here as the reference of the transaction
Example8801442233146169943053700500040
otp
stringRequired
Specify the OTP entered by the subscriber on the developer application.
Example123456
sourceAddress
stringRequired
Source Address shows the MSISDN that requested the OTP
Exampletel:8801973579363
curl -X POST https://api.applink.com.bd/caas/otp/verify \
  -H "Content-Type: application/json;charset=utf-8" \
  -d '{
    "applicationId": "APP_999999",
    "password": "Your API Key",
    "referenceNo": "8801442233146169943053700500040",
    "otp": "123456",
    "sourceAddress": "tel:8801973579363"
  }'

Response

The published specification does not define a response body for this endpoint: it repeats the request fields in its place. Read statusCode and statusDetail in the reply, as with the other CaaS calls.

POSTAppLink calls you

Charging Notification

your endpoint · /caas/chargingNotification

Charging notification is returned to the developer application upon a charging attempt. It will denote whether the charging is successful or not. Charging notification is returned to the endpoint you have configured under the 'charging notification URL' section in CaaS API when creating the application

Request

application/json;charset=utf-8

There is no request to be triggered in order to obtain this charging notification. It will be automatically returned as a callback to the initial charging request once the transaction is completed within the system.

Notification AppLink sends you

timeStamp
stringRequired
The time which the request was sent
Example15-Nov-2023 11:55
TotalAmount
stringRequired
Amount deducted from the subscriber as the one time charge
Example5.00
externalTrxId
stringRequired
This is the transaction ID generated by the application to map the request with the response. This is needed to provide information when there are inquiries related to a transaction. Only a single value can be sent per request.
Example256091234
balanceDue
stringRequired
The amount that is due will be displayed if there is any, if not it will show 0
Example0
statusDetail
stringRequired
Human-readable description of the status. See the status code table.
ExampleRequest was Successfully processed, Due amount fully paid.
currency
stringRequired
Currency unit of the amount. Only a single value can be sent per request. Only ‘BDT’ is allowed.
ExampleBDT
version
stringRequired
API version shall be numbered as 1.0, 2.0 etc. If version is specified in the request, same version must be sent in the response. If version is not specified in the request, the latest version will be specified in the response.
Example1.0
internalTrxId
stringRequired
The unique identifier used to track the request at the developer application end
Example9111511550014764
paidAmount
stringRequired
The amount that is paid by the subscriber.
Example5.00
referenceId
stringRequired
The unique reference used to identify the transaction within the system
Example8801422222550170004932307900016
statusCode
stringRequired
Status code for the request. S = success, E = error, P = partial. See the status code table.
ExampleS1000
{
  "timeStamp": "15-Nov-2023 11:55",
  "TotalAmount": "5.00",
  "externalTrxId": "256091234",
  "balanceDue": "0",
  "statusDetail": "Request was Successfully processed, Due amount fully paid.",
  "currency": "BDT",
  "version": "1.0",
  "internalTrxId": "9111511550014764",
  "paidAmount": "5.00",
  "referenceId": "8801422222550170004932307900016",
  "statusCode": "S1000"
}