IVR Remote authorizer
Now your customers can pay you with a simple phone call.
This is a secure way for your customers to do their payments, they provide their data electronically and directly to Openpay.
When receiving payments by IVR, we provide you with an option so the payment key can be approved by a service exposed in your application.
Workflow steps
The following workflow shows the steps taken in order to approve a payment key by IVR, using a service exposed by your application.
- The customer dials your IVR phone number and introduces the payment key you have already provided to him.
- Our IVR calls the service exposed by your application to request the approval for the payment key.
- Your application then executes in order to validate the payment key. If the key is valid, your application must return the payment details such as the amount, the order id and description. If the key fails the validation, your application must return the corresponding error code.
- Our IVR receives the response from your application, and if success, it will provide the payment amount to the customer, and will request for confirmation.
- The customer can accept or reject the charge. If the customer accepts it, our IVR will request the card information. Each piece of data is requested in its own step.
- Our IVR then processes the payment using OpenPay API.
- Openpay's API will process and provide response to our IVR.
- Our IVR notifies the customer the results of doing the charge to his card.
OpenPay needs your company to implement own code in your application to approve a IVR payment.
Service to approve IVR payments
The following describes the details of the request and response that the service exposed by your application must follow to approve IVR payments (steps 2 and 3).
Request sent by OpenPay's IVR
OpenPay's IVR calls your service doing a HTTP POST request, using basic HTTP authentication. The POST request content is application/json UTF-8 coded.
The request content is a JSON object as described next:
Name | Type | Length | Description |
---|---|---|---|
ivr_key | Numeric | 3 - 10 | IVR key provided by the customer |
Example HTTP request:
{ "ivr_key": 123456 }
Service Response
Your service must provide a 200 (OK) HTTP response. The contents of the response must be application/json, with an object as described next:
Name | Type | Length | Description |
---|---|---|---|
response_code | Numeric | 1 | Response code indicating the result of the approval: 0 for valid key (required) |
amount | Numeric | 1 - 15 | Amount corresponding to the payment to be made. Until 13 digits for integers and 2 digits for decimal (required) |
order_id | Alfanumeric | 50 | Order number (optional) |
description | Alfanumeric | 250 | Description of the sale (optional) |
Successful response example:
When the IVR key is invalid, the service must return an object as described next:
Nombre | Tipo | Longitud | Descripcion |
---|---|---|---|
response_code | Numeric | 1 | Response code indicating the result of the approval: 1 for invalid key (required) |
error_description | Alfanumeric | 250 | Description of error. This is only for Openpay to review posible errors. (optional) |
Failed response example:
When an security or internal error occurs in your application, your service must provide a HTTP 4xx or 5xx response.
Main Considerations
Communication time between OpenPay and your service
For security reasons, OpenPay IVR will wait until 5 seconds for a response from your server once a request has been done. If no response is gotten after that time, OpenPay cancels the transaction.
HTTPS Communication
Requests in Sandbox environment services are done using HTTP, for testing and integration purposes. Requests in production environment must be done using HTTPS.
Notes:
- You can simulate different results using the test cards
- Implement Notifications to know the status of payments in real time