---
# System prepended metadata

title: '[10400] Packet Payment Wallet-Card by Token'

---

[УКР](https://hackmd.io/e-zkU8N5T9CT3uNerArq8w) | ENG
![](https://i.imgur.com/ULmPUgP.jpg)
:arrow_left: [Guide](https://hackmd.io/QA2NYRliRLGviJl5P4-ZCw)

# [10400] Bulk Payment Wallet-Card by Token

*What is "XPAY Wallet", see in the section ["XPAY Wallet"](https://hackmd.io/bbv1AdS0SwiJeWqW1i1tCA).*

*What is "Token Payment" and how the cards are tokenized, see in the section ["Token Payment"](https://hackmd.io/hELnx1lqQwS9RiactYbLEA).*


## Usage

Request [10400] is used for bulk transfer of funds from the wallet to the client's linked card (by token) and other wallets transmitted in the request. This splitting of the payment is used, for example, when issuing a loan and paying for additional services.


## 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>

~~~
{
    "Purpose": "",
    "InitTransferW2T": {
        "TransferW2T": {
            "Sum": ,
            "SenderWallet": {
                "ID": "",
                "UserName": ""
                },
            "RecipientToken": ""
        },
        "Transaction": {
            "TransactionID": "",
            "TerminalID": "",
            "DateTime": ""
        }
    },
    "Bunch": [
    {
        "TransferW2W": {
            "Sum": ,
            "RecipientWallet": {
                "ID": "",
                "UserName": ""
            }
        },
        "Transaction": {
            "TransactionID": "",
            "TerminalID": "",
            "DateTime": ""
        }
    },
    …]
}
~~~
</details>
:::


|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
| `Purpose` |No| String | Payment purpose. |`Payment Bulk Order No.111`|
|`InitTransferW2T`^1^|Yes|Structure|Structure transmits operation and transaction data.|See example below.|
| `Bunch`^2^ | Yes | Array of structures | Array transmits data for service bulk payment. | See example below.|


^1^ **"InitTransferW2T"** Structure Parameters:

|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
|`TransferW2T`^3^|Yes|Structure|Structure transmits operation data.|See example below.|
|`Transaction`|Yes|Structure|Structure transmits the transaction data. See section "[Transaction Structure](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ?view#2-Data)".|See example below.|


^2^ **"Bunch"** Structure Parameters:

|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
|`TransferW2W`^4^|Yes|Structure|Structure transmits the recipient's wallet data. Each payment is described by the payment sum and the recipient's wallet data. | See example below.|
|`Transaction`|Yes|Structure|Structure transmits the transaction data. See section "[Transaction Structure](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ?view#2-Data)".|See example below.|


^3^ **"TransferW2T"** Structure Parameters:

|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
| `Sum` | Yes |Integer | Operation sum in kopecks. |1UAH=>`100`|
|`SenderWallet`^5^|Yes|Structure|Structure transmits the sender's wallet data in the Operator system.|See example below.|
|`RecipientToken`|Yes|String|Recipient's (client's) card token. In the operator system, the recipient is determined by the card tokenized and linked to the wallet.|See example below.|


^4^ **"TransferW2W"** Structure Parameters:

|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
| `Sum` | Yes |Integer | Operation sum for additional service in kopecks. |1UAH=>`100`|
|`RecipientWallet`^5^|Yes|Structure|Structure transmits the recipient's wallet data in the Operator system.|See example below.|


^5^ Parameters of **"SenderWallet"** and **"RecipientWallet"** structures are the same:

|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
|`ID`|Yes|String|Wallet identifier, that can be: </br> - phone number, </br> - email, </br> - unique client identifier in the Partner system, </br> - card number.| `267608990@email.com`|
|`UserName`|No|String|Wallet owner name.|`267608990`|


:::success
<details>
<summary>Example of "Data" structure</summary>
<br>

~~~md
{
    "Purpose": "Payment Bulk Order No.111",
    "InitTransferW2T": {
        "TransferW2T": {
            "Sum": 1000,
            "SenderWallet": {
                "ID": "",
                "UserName": "Partner 1"
            },
            "RecipientToken": "0e1394eed3d02f233ee406eb3c7566d87fbfece8067fdb28652dd0ac9b3ce6c"
        },
        "Transaction": {
            "DateTime": "20220224 053650",
            "TerminalID": "1",
            "TransactionID": "REFILL_xpay_a53cfbf7da9b436eaa2429160bd6a812"
        }
    },
    "Bunch": [
    {
        "TransferW2W": {
            "Sum": 100,
            "RecipientWallet": {
                "ID": "",
                "UserName": "Partner 2"
            }
        },
        "Transaction": {
            "DateTime": "20220224 053650",
            "TerminalID": "1",
            "TransactionID": "REFILL_xpay_a53cfbf7da9b436eaa2429160bd6a812"
        }
    },
    {
        "TransferW2W": {
            "Sum": 300,
            "RecipientWallet": {
                "ID": "",
                "UserName": "Partner 3"
            }
        },
        "Transaction": {
            "DateTime": "20220224 053650",
            "TerminalID": "1",
            "TransactionID": "REFILL_xpay_a53cfbf7da9b436eaa2429160bd6a812"
        }
    }
  ]
}
~~~
</details>
:::


### Operation Scheme According to Example

| Transaction | Sender | Recipient | Sum | Description |
|:----:|:----:|:----:|:----:|:----:|
|1|Wallet: </br> "Partner 1".|User's wallet linked to the client's card token.|Sum of all transactions in the request: `1400`.|Transfer of from the Partner's wallet to the client's wallet.|
|2|User's wallet linked to the client's card token.|Client's card.|`1000`|Transfer of funds to the client's card.|
|3|User's wallet linked to the client's card token.|Wallet: </br> "Partner 2".|`100`|Transfer of funds to the "Partner 2" wallet.|
|4|User's wallet linked to the client's card token.|Wallet: </br> "Partner 3".|`300`|Transfer of funds to the "Partner 3" wallet.| 


## Response

*See the general information on the response structure formation in the section "[General API Integration Information](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ)"*.


### Response Examples

:::success
<details>
<summary>Operation Successfully Completed</summary>
<br>

~~~md
{
   "Code": 200,
   "Message": "done",
   "Data": {
     "OperationID": 555,
     "OperationStatus": 10
   },
   "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>
:::


In the case of unsuccessful debiting of **sums for additional services** from the Partner's wallet - in response, in the "Data" structure by the parameter **"FailService"** data with sums that could not be debited are transmitted.


:::success
<details>
<summary>Error debiting the sums for additional services (successful operation)</summary>
<br>

~~~md
{
  "Code": 200,
  "Message": "Fail",
  "Data": {
    "OperationID": 11,
    "OperationStatus": 10,
    "Reason": 3,
    "FailService": {
      "UAH654654654": 12900,
      "UAH789987789": 9900
    }
  },
  "KeyAES": "",
  "Sign": ""
}
~~~
</details>
:::

:::success
<details>
<summary>Error debiting the sums for additional services (operation not completed)</summary>
<br>

~~~md
{
  "Code": 200,
  "Message": "Fail",
  "Data": {
    "OperationID": 11,
    "OperationStatus": 5,
    "Reason": 3,
    "FailService": {
      "UAH654654654": 12900,
      "UAH789987789": 9900
    }
  },
  "KeyAES": "",
  "Sign": ""
}
~~~
</details>
:::


## Related Requests

[[10301/10311/103013] Wallet-Card](https://hackmd.io/SvLoAv49QWOIsdPhCWFezA)
[[10204/10214] Wallet-Card by Token](https://hackmd.io/-8jNNh0SQeKZ-6tbwp15OQ)
[[10202] Wallet-Wallet](https://hackmd.io/dOi__3dxSYSi_3EvZh2a5Q)
[[10303] Wallet-IBAN](https://hackmd.io/7kfzI0OAQB6Nt8ZN38UxSg)
[[10304] Wallet-UUID](https://hackmd.io/-U0QJEY_TASmrNQGwGepcA)
[[10401] Bulk Payment Wallet-Card by Card Number](https://hackmd.io/v65TGa0uQPGCrKXQhvHuZg)


**Phone Top-Up**
[[10205] Wallet-Phone](https://hackmd.io/eyewES-3TCGr99R8shURgQ)
[[10305] Card-Phone](https://hackmd.io/RFSxYF85Q0WqOd8I6Xenjg)
[[10405] Token-Phone](https://hackmd.io/hRrNYs3wQYeHChpNSk0AFg)


**Get Transaction Data**
[[20003] Get Operation Status](https://hackmd.io/_eAjmoG-QPWoWWmsLOGf1g)



## 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>



















