Charging as a Service (CAAS) API

1. INTRODUCTION
 
CAAS (Charging As A Service). Before providing a requested service to a customer, the developer have to check the customer’s credit balance. If the customer’s credit balance is sufficient to receive the service, the developer can provide the service and charge the payment from the customer. 
 
 
 
 
1.1 ACCESS CREDENTIALS OF CHANGE REQUEST
 
 
Following URL should be used to access the ‘charge request’ method.
 
URL of Get Change Request Method
 
 
 
1.1.1 REFERENCE REQUEST
 
Token access URL
 
Headers
header 'accept: application/json'
header 'content-type: application/json'
header 'x-ibm-client-id: REPLACE_THIS_KEY'
 
Form parameters
Parameter Sample Value
data '{"amount":"5.00","customer":"071XXXXXXX"}'
 
 
Parameter Description
 
x-ibm-client-id = Assign the client’s ID
 
body contains a json object
 
1.1.2 RESPONSE
 
 
 
Sample Response
{
  "reference": "1234235656556",
  "message": "succeess",
  "status": "1000"
}
 
 
 
 
 
 
1.1.3 RESPONSE STAUS
 
1000 Succeeded with a reference number according to the transaction  
1001 Not enough balance
1002 Invalid connection type
1003 Operation not supported
1004 Invalid account
1005 Operation failed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1.2 ACCESS CREDENTIALS OF CONFIRM
 
 
Following URL should be used to access the ‘confirm’ method.
 
 
URL of Get CONFIRM Method
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1.2.1 CONFIRM REQUEST
 
 
 
Confirm access URL
 
 
Headers
header 'accept: application/json'
header 'content-type: application/json'
header 'x-ibm-client-id: REPLACE_THIS_KEY'
 
Form parameters
Parameter Sample Value
data '{"ref":86167507}'
 
 
Parameter Description
 
x-ibm-client-id = Assign the client’s ID
 
Body contains a json object
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1.2.2 RESPONSE
 
 
Sample Response
{
  "reference": "1234135245667",
  "message": "fadklj",
  "status": "1000"
}
 
 
 
 
 
1.2.3 RESPONSE STAUS
 
 
1000 Succeeded with a reference number according to the transaction  
1001 Not enough balance
1002 Invalid connection type
1003 Operation not supported
1004 Invalid account
1005 Operation failed