Use this API to complete the payment and recharge the mobile phone
The IVR Action Confirm Web Service is called to complete the payment and recharge the mobile phone.
The same Trace id must be provided as was used in the IVR Action Start Web Service.
The IVR Action Confirm Web Service will return the result of the payment transaction, and a call flow to conclude the call.
This interface could only be accessed by the IVR host. All other access will be blocked. IP whitelisting will ensure only traffic from the merchant backend could access this endpoint.
The interface provided is an HTTP POST request containing XML content and XML response.
The access_token obtained via the Authentication Token api will need to be supplied in the header as an Authorization key value, preceded by the word Bearer.
HTTP Request
POST https:///ivr/v1/actionConfirm
Request body
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
traceId | string(100) | yes | This will be the ZCC PABX Reference number associated with the call. The Trace id must be globally unique across all transactions contain only alphanumeric characters, hyphens and underscores, and have a length less than 100 characters | |
language | string | no | en for English es for Spanish zh for Chinese | defaults to en if blank |
productId | string | yes | This represents the product that the user selected in the IVR Menu for certain menu selections which have products associated with them. It takes the form of a json object. These are set in the menu options in the Dynamic IVR. | |
payment | Payment | yes | Payment details | eg 0 521729**6358 * N |
Payment
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
SCC | number | yes | 0 or 1 flag to use a stored payment token | |
cardNumber | string numeric | yes if SCC 0 | payment card number | eg: 5353****87897776 |
cardSecurityCode | string numeric | yes if SCC 0 | payment card security code printed on back of card | eg:063 |
STC | string | yes if SCC 0 | Y or N flag as to whether the caller wishes to store their card details for future use | eg:Y |
Request headers
Parameter | Mandatory | Description |
---|---|---|
Content-Type | yes | application/xml |
Authorization | yes | Bearer Access-web-ivr-oauth-token (Refer Authentication) |
Sample Example
curl -v -X POST 'https://<ivr-host-env>/ivr/v1/actionConfirm' \
-H 'Content-Type: application/xml' \
-H "Authorization: Bearer lkgheflkjjdafkjfkjfkhgdddjhdljgkjlfljkkjasdlkjdffkj" \
-d '<IVRActionConfirmRequest>
<traceId>Testflexplus12</traceId>
<productId>{'rechargeAmount':'4500','payment':'4500'}</productId>
<language/>
<payment>
<SCC>0</SCC>
<cardNumber>4111111111111111</cardNumber>
<cardExpiryDate>0823</cardExpiryDate>
<cardSecurityCode>123</cardSecurityCode>
<STC>Y</STC>
</payment>
</IVRActionConfirmRequest>'
Response body
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
traceId | string(100) | yes | This will be the ZCC PABX Reference number associated with the call. The Trace id must be globally unique across all transactions contain only alphanumeric characters, and have a length less than 100 characters | |
errorGroup | numeric | yes | This number indicates occurrence of an error and the type of error that has occurred. 0 = Success 1 = Transient gateway error - Try again 5 = Transaction breached velocity/fraud rules 99 = Other unspecified error | |
receiptNumber | integer | no | The receipt number does not always represent a successful payment. It can be also be used as a reference number to a failed payment. | |
callflow | xml | yes | the conclusion call-flow for the call | may contain empty on error |
Sample Example
Status: 200 OK
<?xml version='1.0' encoding='UTF-8'?>
<IVRActionConfirmResponse>
<traceId>Testflexplus12</traceId>
<errorGroup>0</errorGroup>
<receiptNumber>1818835</receiptNumber>
<callflow>
<callflowConclusion language="en">
<message>
<prompt>P_Approved</prompt>
<prompt>%S1818835</prompt>
<prompt>P_Confirmation</prompt>
</message>
</callflowConclusion>
</callflow>
</IVRActionConfirmResponse>