[УКР](https://hackmd.io/2XGUxnOxQyW1wqxMndI_0g) | ENG ![](https://i.imgur.com/ULmPUgP.jpg) :arrow_left: [Guide](https://hackmd.io/QA2NYRliRLGviJl5P4-ZCw) # [20007] Get Client Data to Pass BankID/Diia Identification ## Usage Request [20007] is used to get personal client data for passing the ["BankID"](https://en.wikipedia.org/wiki/BankID) or ["Diia"](https://en.wikipedia.org/wiki/Diia) identification. ## 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 this operation is formed from the following parameters: :::info <details> <summary>Data structure formation (examples are below)</summary> <br> ~~~ { "UserID": "", "Phone": "", "Email": "", "Transaction": { "TransactionID": "", "TerminalID": "", "DateTime": "" } } ~~~ </details> ::: |Parameter|Required|Type|Description|Example| |:----:|:----:|:----:|----|:----:| | `UserID` | Yes | String | Unique client identifier in the Partner system. |`380932799111`| | `Phone` | No | String | Client phone number in format: "380xxxxxxxxxxxx". |`380679335544`| | `Email` | No | String | Client email. |`index@gmail.com`| |`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 [20007]</summary> <br> ~~~md { "Partner": { "PartnerToken": "72a8ddb8-9145-4a41-af1a-8c48ecaa4be1", "OperationType": 20007 }, "Data": "{\"UserID\": \"380932799111\", \"Phone\": \"380679335544\", \"Email\": \"index@gmail.com\", \"Transaction\": {\"TransactionID\": \"321643_1643975265, \"TerminalID\":\"1\", \"DateTime\": \"20220406 08:07:09\"\"}}", "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)"*. ### Data Structure Successful response to the request [20007] contains the structure `UserProfile`, that transmits the personal client data. All parameters of this structure are optional and individually configured depending on the operation type and Partner's needs. ### Response Examples :::success <details> <summary>Operation Successfully Completed</summary> <br> ~~~md { "Code": 200, "Message": "Done", "Data": { "OperationStatus": 10, "UserProfile": { "email": null, "bankid": null, "user_id": 96169, "last_name": "Masur", "cell_phone": "380688101893", "first_name": "Oleg", "middle_name": "" } }, "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 [[10015/10025/10035/10045] Get Widget Link to Pass BankID/Diia Identification](https://hackmd.io/0g4L6-zjQ-i50rtkVjJTxQ) ## 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>