{"id":3413,"date":"2021-03-08T23:45:41","date_gmt":"2021-03-08T23:45:41","guid":{"rendered":"https:\/\/documents.openpay.mx\/?p=3413"},"modified":"2021-03-10T19:42:06","modified_gmt":"2021-03-10T19:42:06","slug":"ivr-remote","status":"publish","type":"post","link":"https:\/\/documents-mx-dev.opdevhm.com\/en\/docs\/ivr-remote.html","title":{"rendered":"IVR Remote authorizer"},"content":{"rendered":"
Interactive Voice Response or IVR is a telephony technology that allows customers to interact with the company's service system through configurable voice menus, in real time, using DTMF tones.<\/p>
In an IVR system, callers are given the ability to enter card data by pressing the keys. Pressing a digit on the telephone keypad sends a DTMF tone to the company's attention system which then selects the appropriate action \/ response according to the digit pressed.<\/p>
Now your clients can pay you with a simple phone call.<\/p>
This is a secure way for your clients to make their payments since they provide their data electronically and directly to Openpay.<\/p>
Below is the flow to create an IVR charge.<\/p>
<\/center>To generate a charge for IVR it is necessary to create a charge indicating in the field When the position is created, a json object will be returned.<\/p> Response:<\/strong><\/p> \u00a0<\/p> \u00a0<\/p> With the data of Below is the flow to make the purchase with IVR code.<\/p> The steps to authorize an IVR payment key through a service exposed by your application are the following:<\/p> For this Openpay requires that you implement a web service in your application to authorize IVR payments.<\/p> The following describes the detail of the request and response that the service exposed by your application must follow to authorize keys IVR payment (Steps 2 and 3).<\/p> The Openpay IVR will call this service using an HTTP POST method, using HTTP Basic authentication to identify itself. The content of the request will be of type application \/ json, encoded in UTF-8.<\/p> HTTP request example:<\/p> \u00a0<\/p>method<\/code> the typecard<\/code> and in the attribute confirm<\/code> the value ivr<\/code> as follows:<\/p><?php<\/span>\n$openpay<\/span> =<\/span> Openpay<\/span>::<\/span>getInstance<\/span>(<\/span>'mzdtln0bmtms6o3kck8f'<\/span>,<\/span>\n 'sk_e568c42a6c384b7ab02cd47d2e407cab'<\/span>);<\/span>\n\n$customer<\/span> =<\/span> array<\/span><\/strong>(<\/span>\n 'name'<\/span> =><\/span> $_POST<\/span>[<\/span>\"Juan\"<\/span>],<\/span>\n 'last_name'<\/span> =><\/span> $_POST<\/span>[<\/span>\"Urbina\"<\/span>],<\/span>\n 'phone_number'<\/span> =><\/span> $_POST<\/span>[<\/span>\"45155352828\"<\/span>],<\/span>\n 'email'<\/span> =><\/span> $_POST<\/span>[<\/span>\"juan.test@correo.mx\"<\/span>],);<\/span>\n\n$chargeData<\/span> =<\/span> array<\/span><\/strong>(<\/span>\n 'method'<\/span> =><\/span> $_POST<\/span>[<\/span>\"card\"<\/span>],<\/span>\n 'confirm'<\/span> =><\/span> $_POST<\/span>[<\/span>\"ivr\"<\/span>],<\/span>\n 'order_id'<\/span> =><\/span> $_POST<\/span>[<\/span>\"ord-234\"<\/span>],<\/span>\n 'amount'<\/span> =><\/span> $_POST<\/span>[<\/span>\"200\"<\/span>],<\/span> \/\/ formato n\u00famerico con hasta dos d\u00edgitos decimales. <\/span>\n 'description'<\/span> =><\/span> $_POST<\/span>[<\/span>\"CargoIVR\"<\/span>],<\/span>\n 'customer'<\/span> =><\/span> $_POST<\/span>[<\/span>$customer<\/span>]<\/span>\n );<\/span>\n\n$charge<\/span> =<\/span> $openpay<\/span>-><\/span>charges<\/span>-><\/span>create<\/span>(<\/span>$chargeData<\/span>);<\/span>\n?><\/span><\/code><\/pre><\/figure><\/div>{<\/span>\n \"id\"<\/span>:<\/span> \"trapsxzfv4rxx8dz3lan\"<\/span>,<\/span>\n \"authorization\"<\/span>:<\/span> null<\/span><\/strong>,<\/span>\n \"operation_type\"<\/span>:<\/span> \"in\"<\/span>,<\/span>\n \"transaction_type\"<\/span>:<\/span> \"charge\"<\/span>,<\/span>\n \"status\"<\/span>:<\/span> \"charge_pending\"<\/span>,<\/span>\n \"conciliated\"<\/span>:<\/span> false<\/span><\/strong>,<\/span>\n \"creation_date\"<\/span>:<\/span> \"2020-10-16T23:02:46-05:00\"<\/span>,<\/span>\n \"operation_date\"<\/span>:<\/span> \"2020-10-16T23:02:46-05:00\"<\/span>,<\/span>\n \"description\"<\/span>:<\/span> \"Cargo IVR\"<\/span>,<\/span>\n \"error_message\"<\/span>:<\/span> null<\/span><\/strong>,<\/span>\n \"order_id\"<\/span>:<\/span> \"ord-234\"<\/span>,<\/span>\n \"payment_method\"<\/span>:<\/span> {<\/span>\n \"type\"<\/span>:<\/span> \"ivr\"<\/span>,<\/span>\n \"phone_number\"<\/span>:<\/span> \"525588969143\"<\/span>,<\/span>\n \"ivr_key\"<\/span>:<\/span> 257139<\/span>,<\/span>\n \"attempts\"<\/span>:<\/span> 0<\/span>\n },<\/span>\n \"amount\"<\/span>:<\/span> 200.00<\/span>,<\/span>\n \"currency\"<\/span>:<\/span> \"MXN\"<\/span>,<\/span>\n \"customer\"<\/span>:<\/span> {<\/span>\n \"name\"<\/span>:<\/span> \"Juan\"<\/span>,<\/span>\n \"last_name\"<\/span>:<\/span> \"Urbina\"<\/span>,<\/span>\n \"email\"<\/span>:<\/span> \"juan.test@correo.mx\"<\/span>,<\/span>\n \"phone_number\"<\/span>:<\/span> \"45155352828\"<\/span>,<\/span>\n \"address\"<\/span>:<\/span> null<\/span><\/strong>,<\/span>\n \"creation_date\"<\/span>:<\/span> \"2020-10-16T23:02:46-05:00\"<\/span>,<\/span>\n \"external_id\"<\/span>:<\/span> null<\/span><\/strong>,<\/span>\n \"clabe\"<\/span>:<\/span> null<\/span><\/strong>\n },<\/span>\n \"method\"<\/span>:<\/span> \"card\"<\/span>\n}<\/span><\/code><\/pre><\/figure>payment_method<\/code>, your client can make the payment with a phone call.<\/p>Purchase Flow<\/h1>
<\/center>Authorize IVR Charge with payment key<\/h1>
Flow steps<\/h2>
<\/center>Service to authorize IVR payments<\/h2>
\u00a0Request sent by Openpay IVR<\/h3>
POST <\/span>\/openpay\/authorizer<\/span> HTTP<\/span><\/strong>\/<\/span>1.1<\/span>\nHost<\/span>