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

NameTypeMandatoryDescriptionComment
traceIdstring(100)yesThis 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
languagestringnoen for English
es for Spanish
zh for Chinese
defaults to en if blank
productIdstringyesThis 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.
paymentPaymentyesPayment detailseg

0 521729**6358

* N

Payment

NameTypeMandatoryDescriptionComment
SCCnumberyes0 or 1 flag to use a stored payment token
cardNumberstring numericyes if SCC 0payment card numbereg: 5353****87897776
cardSecurityCodestring numericyes if SCC 0payment card security code printed on back of cardeg:063
STCstringyes if SCC 0Y or N flag as to whether the caller wishes to store their card details for future useeg:Y

Request headers

ParameterMandatoryDescription
Content-Typeyesapplication/xml
AuthorizationyesBearer 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

NameTypeMandatoryDescriptionComment
traceIdstring(100)yesThis 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
errorGroupnumericyesThis 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
receiptNumberintegernoThe receipt number does not always represent a successful payment. It can be also be used as a reference number to a failed payment.
callflowxmlyesthe conclusion call-flow for the callmay 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>
Language
Click Try It! to start a request and see the response here!