[УКР](https://hackmd.io/EimWFyvOSxSEqZiABDIUtg) | ENG ![](https://i.imgur.com/ULmPUgP.jpg) :arrow_left: [Guide](https://hackmd.io/QA2NYRliRLGviJl5P4-ZCw) # [10015/10025/10035/10045] Get Widget Link to Pass BankID/Diia Identification ## Usage Requests [10015/10025/10035/10045] are used to get the link of the widget for passing the ["BankID"](https://en.wikipedia.org/wiki/BankID) or ["Diia"](https://en.wikipedia.org/wiki/Diia) identification. |OperationType | Usage | |:----:|----| |`10015`|Get widget link for passing identification with the option of choosing "BankID" or "Diia".| |`10025`|Get widget link for passing “BankID” identification.| |`10035`|Get widget link for passing "Diia" identification.| |`10045`|Get widget link for the banking product registration. | ![](https://i.imgur.com/OheSPu4.png) ## Request *See the description of the "Partner", "KeyAES" and "Sign" attributes in the section "[General API Integration Information](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ)".* ### Data Structure The Data structure for requests [10015/10025/10035/10045] is the same and formed from the following parameters: :::info <details> <summary>Data structure formation (examples are below)</summary> <br> ~~~ { "Phone": "", "Email": "", "ClientIP": "", "FirstName": "", "LastName": "", "MiddleName": "", "BrowserFingerprint": "", "RedirectURL": "", "Transaction": { "TransactionID": "", "TerminalID": "", "DateTime": "" } } ~~~ </details> ::: |Parameter|Required|Type|Description|Example| |:----:|:----:|:----:|----|:----:| | `Phone` | Yes | String | Client phone number in format: "380xxxxxxxxxxxx". |`380679335544`| | `Email` | No | String | Client email. |`index@gmail.com`| | `ClientIP` | No | String | IP address from which the client initiates the operation. |`127.0.0.1`| | `FirstName` | No | String | Client name. |`Oleg`| | `MiddleName` | No | String | Client middle name. |`Mykhaylovich`| | `LastName` | No | String | Client last name. |`Podilskyi`| | `RedirectURL` | No | String | URL to which the client will be redirected after passing the identification procedure.| `https://partner.com/callback/xpay1`| | `BrowserFingerprint` | No | String |[Browser Fingerprint](https://en.wikipedia.org/wiki/Device_fingerprint): [https://m.habr.com/ru/company/oleg-bunin/blog/321294/](https://m.habr.com/ru/company/oleg-bunin/blog/321294/); [https://github.com/valve](https://github.com/valve) |`86a190af26de3a920c62ea19ba0df3a8`| |`Transaction`|Yes|Structure|Structure transmits transaction data. See section "[Transaction Structure](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ?view#2-Data)".|See example below.| :::success <details> <summary>Example of the request [10015]</summary> <br> ~~~md { "Partner": { "PartnerToken": "72a8ddb8-9145-4a41-af1a-8c48ecaa4be1", "OperationType": 10015 }, "Data": "{\"Email\": \"mail@ukr.net\", \"Phone\": \"380979011321\", \"LastName\": \"Podilskyi\", \"FirstName\ ": \"Oleg\", \"MiddleName\": \"Mykhaylovich\", \"RedirectURL\": \"https://xpay.com.ua?t=RedirectURL\", \"Transaction\": {\"TransactionID\": \"identity.e9e6e67e-7ddb-11ec-a42c-926b407ba61b\"}}", "KeyAES": "", "Sign": "" } ~~~ </details> ::: ## Response *See the general information on the response structure formation in the section "[General API Integration Information](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ?view#Response-Structure)"*. ### Data Structure Successful response to requests [10015/10025/10035/10045] contains a link in the form of a string with the name `URI` in the "Data" structure: |Parameter|Required|Type|Description|Example| |:----:|:----:|:----:|----|:----:| | `URI` |Yes| String | Link to the "BankID/Diia" widget. |`https://stage-mapi.xpaydirect.com/uk/frame/widget/banner-payment`| |`uuid`|Yes|String|Unique identifier linking widget requests. |`f3cd72b6-e1ea-406f-9b44-a9b93b401b7f`| ### Response Examples :::success <details> <summary>Operation Successfully Completed</summary> <br> ~~~md { "Code": 200, "Message": "done!", "Data": { "OperationDate": "2022-01-17T16:32:04.673105+02:00", "OperationID": 8122388, "OperationStatus": 10, "URI": "https://stage-mapi.xpaydirect.com/uk/frame/widget/banner-payment", "uuid": "691fafc9-5d64-46b5-22ba-85ce61cc26be" }, "KeyAES": "", "Sign": "" } ~~~ </details> ::: :::success <details> <summary>Operation Failed</summary> <br> ~~~md { "Code": 200, "Message": "done", "Data": { "OperationID": 111, "OperationStatus": 21, "Reason": 3 }, "KeyAES": "", "Sign": "" } ~~~ </details> ::: ## Related Requests [[20007] Get Client Data to Pass BankID/Diia Identification](https://hackmd.io/mNtJ1eUfTcaZjJFXUlGR-Q) ## Reference Materials General parameters of the XPAY system are given in the section ["Reference Materials"](https://hackmd.io/16yLv895Qo-FWTvrWWQwbg):  operation types, payment types, response codes, operation status, reasons of operation rejection, etc. ![](https://i.imgur.com/17gAyWb.png) :arrow_left: [Guide](https://hackmd.io/QA2NYRliRLGviJl5P4-ZCw) :arrow_left: [General API Integration Information](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ) <details> <summary>XPAY Support</summary> </br> Phone: +38 093 891 92 00 Email: info@xpay.com.ua Telegram: @xpaysupportbot </details>