Initiate Payment

Request AOC Token for Charging

To initiate a charging via AOC Gateway, Service Provider will need to request for AOC Token from AOC Gateway.

  1. The service Provider will need to request for AOC Token for each individual charging request as AOC Token is unique for each transaction.

  2. Once Service Provider gets the unique AOC Token, they will redirect the user to AOC Page by passing over the AOC Token.

The subscriptionDuration value is as below,

  1. For daily subscriptions, the value should be 2.

  2. For weekly subscriptions, the value should be 8.

  3. For monthly subscriptions, the value should be 31.

Request

HTTP Method
POST
POST <AOC_SERVER>/api/getAOCToken
HTTP/1.1
Content type: application/x-www-form-urlencoded


{
  "apiKey":"Ofa3M7zS2c3",
  "username":"test",
  "spTransID":"201903192030-test1",
  "description":"Testing123456789",
  "currency":"MYR",
  "amount":"0.01",
  "onBehalfOf":"TestSP",
  "channel":"WEB",
  "operator":"operator1",
  "taxAmount":"0",
  "callbackURL":"https%3A%2F%2Fwww.test.com",
  "isSubscription":"True",
  "contactInfo":"6019123456789",
  "purchaseCategoryCode":"Game",
  "referenceCode":"Game",
  "subscriptionName":"testing",
  "subscriptionID":"WeeklyGame1",
  "subscriptionDuration":"8",
  "unSubURL":"https%3A%2F%2Fwww.google.com%2F"
}

Request Parameter

Parameter NameDescriptionUsage
apiKeyThis will be API Key to access AOC. Will be provided by BOOSTCONNECT.(STRING) Mandatory
usernameThis will be the username provided to the Service Provider by BOOSTCONNECT.(STRING) Mandatory
spTransIDThis is a unique transaction id per API call event generated by Service Provider. It is your reference for troubleshooting purposes.(STRING) Mandatory
descriptionThis is the text to appear on the user's bill to allow them to easily identify what they have bought.(STRING) Mandatory
currencyThis is the 3-figure code as per ISO 4217.(STRING) Mandatory
amountThis is the actual amount being charged. It needs to be two-digit decimals such as 3.00, 6.50 and etc.(DECIMAL) Mandatory
onBehalfOfThe actual Payee Company Name.(STRING) Mandatory
purchaseCategoryCodeA purchase category code provided by BOOSTCONNECT.(STRING) Mandatory
refundPurchaseCategoryCodeThis is the purchaseCategoryCode for refund transactions. This field is optional, if it’s not passed over, the default value during onboarding will be used during the Refund.

This value will be provided by BOOSTCONNECT if applicable.
(STRING) OPTIONAL
referenceCodeSame as the purchase category code. This id will be used for any future reconciliation purposes.(STRING) Optional
channelIndicates the source of user interaction.(STRING) Mandatory
operatorThe operator code provided by BOOSTCONNECT.

BOOSTCONNECT team will provide the information about the operator. If the Operator belongs to BNPL (Buy Now Pay Later) flow, then it doesn’t support subscription services.
(STRING) Mandatory
taxAmountThe tax is already charged by the merchant.(DECIMAL) Mandatory
callbackURLThe URL to which the Service Provider would like AOC Gateway to redirect users once the charging transaction is completed. AOC will pass over the aocTransID to this URL.(URL STRING) Mandatory
contactInfoThis is the contact information (contact number or email) that will be included in the Success Charge SMS, Renewal SMS, and Unsubscribe Success SMS.(STRING) Mandatory
contentURLThis is the content page URL that will be included in the Success Charge SMS and Renewal SMS. Just leave it empty if not required.(URL STRING) Optional
isSubscriptionThis is a boolean flag (true/false) to define if the transaction is on a subscription basis or on demand. If it's a subscription basis, the flag needs to be set to true.(BOOLEAN) Mandatory
subscriptionIDThis is a unique subscription id for each different subscription package/service. This field is mandatory if isSubscription is true. (STRING) Optional
subscriptionNameThis is the subscription name for the subscription package/services. This field is mandatory if isSubscription is true. (STRING) Optional
subscriptionDurationThis is the subscription duration for the subscription package/services. (in day) This field is mandatory if isSubscription is true. (INT) Optional
unSubURLThis is the unsubscribe URL that will be included in the Renewal SMS.
This field is mandatory if isSubscription is true.
(STRING) Optional
isWalletThis is a boolean flag (true/false) to define if the transaction is using e-Wallet. If it’s an e-Wallet transaction, the flag needs to be set to true. A default will be set to false.
[IMPORTANT]: e-Wallet transaction doesn’t support subscription services.
(BOOLEAN) Optional
isWebDeepLinkThis is a boolean flag (true/false) to define if the handling of Mobile Wallet App Deep Link is handled by the AOC Page or not. If the flag is set to true, AOC Page will try to open the Mobile Wallet App Deep Link (if available). If the flag is set to false, then the AOC page will redirect users to the Web payment page. If the flag is set to false, AOC will return paymentDeepLink, and Service Provider can try to open the deep link via their Mobile App.(BOOLEAN) Optional
callbackAppDeepLinkIf a Service Provider has implemented a deep link on their own Mobile App, they can pass the deep link here so Mobile Wallet App will callback to this deep link once payment is completed.(STRING) Optional
msisdnThis parameter is required for;

1. Subscription Service via Wallet Payment. (This is the MSISDN of the end-user that has registered with Wallet Provider that is required for Subscription Service. Please advise the BOOSTCONNECT Team on which Wallet Provider requires this parameter.)
2. IOD/Subscription for Direct Charging enabled Service Provider.
(STRING) Optional
emailThis is the email of the end-user that has registered with Wallet Provider that is required for Subscription Service. Please advise APIGATE Team on which Wallet.(STRING) Optional
isMobileAppAPIThis is a boolean flag (true/false) to define if the transaction is performed via Mobile API. The default value is false. If the flag is true, AOC will send a TAC to the user MSISDN via SMS. This feature is only available for Service Providers that have been provisioned for Mobile App API. [IMPORTANT]: Doesn’t support e-Wallet transactions. (BOOLEAN) Optional
tacMSISDNThe MSISDN of the subscriber. The user’s MSISDN includes the country code, e.g. 60191234567. This field is mandatory if isMobileAppAPI is true. (STRING) Optional
productIdThis is an optional field for IOD transactions for certain Operators (such as Telkomsel). This ID needs to be configured in AOC during onboarding. Please consult the onboarding team for more information.(STRING) Optional
renewalChargeThis is the amount that will be charged for subscription renewal if the initial charge amount is different compared to the renewal charge. It needs to be two-digit decimals such as 3.00, 6.50 and etc.

This field is optional and only applicable if the initial charge amount is different compared to the renewal charge.
(STRING) Optional
requireOTPThis is only applicable for Direct Charge transactions. This is a boolean flag (true/false) to define if the transaction required OTP or not. Please check with the BOOSTCONNECT team if your account is enabled for this feature or not.(STRING) Optional

Response

HTTP/1.1 200 OK 
Content-Type: application/json 
Date: Tue, 01 Nov 2016 12:00:00 GMT


{ "data" : 
{ 
	"aocToken":"SVpzSWk2SERiQjVlOFZLZFpBblVp", 
	"aocTransID":"12345678",
	"errorCode":"00", 
	"errorMessage":""
} 
}

Response Parameter

Parameter NameDescriptionUsage
aocTokenThis is a unique token generated by AOC Gateway to identify each AOC transaction. Service Providers need to pass this aocToken during the redirection to AOC Page.

Note: This response parameter will not be applicable for Direct Charging transactions.
(STRING)
aocTransIDThis is the unique transaction id generated by AOC Gateway. This id will be used for any future reconciliation purposes. The same id will be passed back to the Service Provider’s callback URL once the transaction is completed.(STRING)
entitledForFreeTrialThis is a flag to indicate if the user entitles to Subscription Free Trial. The flag doesn’t guarantee the user is able to get a Free trial as it still depends on a free trial quota when the user proceeds with charging. This flag will only be returned when isMobileAppAPI is true.(STRING)
paymentDeepLinkThis is the Mobile Wallet App deep link. This value will only be returned if the “isWebDeepLink” parameter is set to false and if the Mobile Wallet supports a deep link.(STRING)
errorCodePlease check the error code list.(STRING)
errorMessageExplanation of the error.(STRING)