# How to integrate - API reference

This chapter provides the instruction of the integration with the solution and with it's methods. By using below API you will be able to order quick money transfers to debit or credit cards in 150 major currencies. Lower the costs, save time and increase the end-user satisfaction. Functionality consists of five methods allowing to order payout, check commission and follow transfer status. All methods are secured with `Basic-Authorization` of your merchant account. The `Basic-Authorization` will be provided to you during the onboarding process. Prior using this solution is to open account in acquiring institution. To complete this steps, please contact our Sales Department. We will guide you through entire process.

<details id="bkmrk-verestro-paytool-api"><summary>Environment Test API base URL</summary>

```
http://payouts.verestro.dev/
```

</details><details id="bkmrk-verestro-paytool-api-0"><summary>Environment Production API base URL</summary>

```
NOT YET IMPLEMENTED
```

</details><details id="bkmrk-integration-method-c"><summary>Sequence diagram presenting payout process</summary>

@startuml  
skinparam ParticipantPadding 30  
skinparam BoxPadding 30  
skinparam noteFontColor #FFFFFF  
skinparam noteBackgroundColor #1C1E3F  
skinparam noteBorderColor #1C1E3F  
skinparam noteBorderThickness 1  
skinparam sequence {  
ArrowColor #1C1E3F  
ArrowFontColor #1C1E3F  
ActorBorderColor #1C1E3F  
ActorBackgroundColor #FFFFFF  
ActorFontStyle bold  
ParticipantBorderColor #1C1E3F  
ParticipantBackgroundColor #1C1E3F  
ParticipantFontColor #FFFFFF  
ParticipantFontStyle bold  
LifeLineBackgroundColor #1C1E3F  
LifeLineBorderColor #1C1E3F  
}  
actor "Payer" as p  
participant "Customer" as c  
participant "Verestro" as v  
p-&gt;c: Make payout (provide transaction data)  
note right of p: Sender chooses his balance \\nand provides receiver's card  
c-&gt;v: Calculate commission POST /client/calculate-commission/payout  
c&lt;-v: Return commission  
p&lt;-c: Show commission  
p-&gt;c: Confirm  
c-&gt;v: Order payout with transaction data POST /api/v2/client/send-money  
note left of v: We contact with acquiring institution \\nfor transaction to be processed  
v-&gt;c: Return transaction order-Id with status  
p&lt;-c: Payout ordered  
v--&gt;c: (optional) Send webhook  
c-&gt;v: (optional) Check transaction status GET /client/send-money/{order-Id}  
v-&gt;c: Return http status and proper message  
@enduml

</details><p class="callout warning">**Important:** The success of the multicurrency send-money transaction depends primarily on the correctness of your currency configuration which is done by the Acquirer. To make transactions in a currency other than the currency of the card, contact the Verestro employee.</p>

<p class="callout warning">**Important:** From January 2021, there is an internal functionality to restrict access for the Customer to specific method. The Acquirer employee can disable access to a given endpoint, then the HTTP status 403 FORBIDDEN will be returned. You will be informed about each access restriction action.</p>

<p class="callout info">**Note:** When performing authorization, remember that there are currencies with different number of decimal places. For example: VND has no pennies and KWD has three decimal places. Please take this into account in the Amout field. For more information on other currencies, see ISO 4217.</p>

### Order payout

The method allows you to order a payout transfer. The request can be made in four forms depending on the type of reference indicating the receiver of the funds. Customer by selecting <span style="font-family: Lato;">`amount`</span> = <span style="font-family: Lato;">`X` </span>defines amount of payment in given currency. This amount is transferred to receiver payment instrument (receiver reference) in selected currency. In case there's need revaluation from one currency to another, system uses <span style="font-family: Lato;">`higherRate`</span> for this situation. For more details about specific rates please refer to `<a href="https://developer.verestro.com/books/payouts/page/technical-documentation-draft#bkmrk-currency-rate">currencyRate</a>` method.

<table border="1" cellpadding="1" cellspacing="0" id="bkmrk-abbreviation-descrip" style="width: 918px;" width="712"><tbody><tr valign="TOP"><td bgcolor="#002060" style="width: 365.5px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Receiver reference**</span>

</td><td bgcolor="#002060" style="width: 443.5px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr valign="TOP"><td style="width: 365.5px;" width="353"><span style="font-family: Lato;">`CASH-PLAIN`</span>

</td><td style="width: 443.5px;" width="353"><span style="font-family: Lato;">Sender provides receiver's card number in plain text.</span>

</td></tr><tr valign="TOP"><td style="width: 365.5px;" width="353"><span style="font-family: Lato;">`CASH-PLAIN-WITH-CALCULATE-COMMISSION-RESULT`</span>

</td><td style="width: 443.5px;" width="353"><span style="font-family: Lato;">Sender provides receiver's card number in plain text along with earlier calculated commission with [`calculateCommissionPayout`](https://developer.verestro.com/books/payouts/page/technical-documentation#bkmrk-calculate-commission).</span>

</td></tr></tbody></table>

<details id="bkmrk-post-%2Fapi%2Fv2%2Fclient%2F"><summary>POST /api/v2/client/send-money</summary>

<details id="bkmrk-cash-plain-headers-k-0"><summary>CASH-PLAIN</summary>

<table border="1" style="border-collapse: collapse; width: 100%; height: 100.578px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" colspan="2" style="height: 35.3906px; width: 100.128%;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Headers**</span>

</td></tr><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="color: #ecf0f1; font-family: Lato;">**Key**</span>

</td><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Value**</span>

</td></tr><tr style="height: 29.7969px;"><td style="width: 50.0642%; height: 29.7969px;">`Content-Type`</td><td style="width: 50.0642%; height: 29.7969px;">`application/vnd.sendmoney.v2+json`</td></tr><tr><td style="width: 50.0642%;">`Basic-Authorization`</td><td style="width: 50.0642%;">`Basic dXNlcm5hbWU6cGFzc3dvcmQ=`</td></tr></tbody></table>

<p class="callout info">**Note:** The `Basic-Authorization` will be provided to you during the onboarding process.</p>

<details id="bkmrk-example-request-body"><summary>Example request body in JSON format</summary>

```json
{
  "amount" : 1000,
  "type" : "RECEIVER",
  "requestId" : "9d7cead6-3532-4028-94ef-666f426f7f74",
  "transactionId" : "TRX220132AM",
  "sender" : {
    "type" : "CASH",
    "firstName" : "Mark",
    "lastName" : "Smith",
    "street" : "Olszewskiego",
    "houseNumber" : "17A",
    "city" : "Lublin",
    "postalCode" : "20-400",
    "flatNumber" : "2",
    "email" : "senderEmail@verestro.com",
    "personalId" : "AGC688910",
    "country" : "PL"
  },
  "receiver" : {
    "type" : "PLAIN",
    "firstName" : "Rob",
    "lastName" : "Wring",
    "birthDate" : "2024-03-19",
    "cardNumber" : "5117964247989169",
    "currency" : "PLN",
    "countryOfResidence" : "PL"
  },
  "additionalData" : {
    "note" : "Restaurant. Tip for Joe Doe"
  },
  "transactionReason" : "Test document transaction"
}
```

</details><table border="1" style="border-collapse: collapse; width: 100%; height: 1177.56px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 34.713%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Parameter**</span>

</td><td bgcolor="#002060" style="width: 13.4846%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Type**</span>

</td><td bgcolor="#002060" style="width: 51.8024%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr style="height: 57.75px;"><td style="width: 34.713%; height: 57.75px;">`amount`</td><td style="width: 13.4846%; height: 57.75px;">number  
**required**</td><td style="width: 51.8024%; height: 57.75px;">The total transfer amount (in pennies).</td></tr><tr style="height: 63.3906px;"><td style="width: 34.713%; height: 63.3906px;">`type`</td><td style="width: 13.4846%; height: 63.3906px;">string  
**required**  
</td><td style="width: 51.8024%; height: 63.3906px;">Transaction in `SENDER` or `RECEIVER` currency, for specific transaction type. `CARD_CARD`: above, `CASH_CARD`: `RECEIVER` , `CASH_CARD`: `SENDER`.</td></tr><tr style="height: 63.3906px;"><td style="width: 34.713%; height: 63.3906px;">`requestId`</td><td style="width: 13.4846%; height: 63.3906px;">string  
**required**</td><td style="width: 51.8024%; height: 63.3906px;">UUID generated by the the client, used to identify single transaction. Ensures that the transaction with the given parameter is processed only once.</td></tr><tr style="height: 66.375px;"><td style="width: 34.713%; height: 66.375px;">`transactionId`

</td><td style="width: 13.4846%; height: 66.375px;">string **required**</td><td style="width: 51.8024%; height: 66.375px;">UUID generated by the the client to assign transaction identifier.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender`</td><td style="width: 13.4846%; height: 46.5938px;">object **required**</td><td style="width: 51.8024%; height: 46.5938px;">Object containing datailed payer's data.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.type`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">For this configuration the value of this field must be `CASH`, otherwise request will be declined.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.firstName`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Payers's first name.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.lastName`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Payers's last name.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.street`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Payer's address.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.houseNumber`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Payer's house number.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.city`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Payer's city.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.postalCode`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Payer's postal code.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.flatNumber`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Payer's flat number.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.personalId`</td><td style="width: 13.4846%; height: 46.5938px;">string</td><td style="width: 51.8024%; height: 46.5938px;">Payer's personal id.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`sender.country`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Country code in accordance with ISO 3166-1 Alpha-2. Is required for terminal crypto</td></tr><tr style="height: 63.375px;"><td style="width: 34.713%; height: 63.375px;">`receiver`</td><td style="width: 13.4846%; height: 63.375px;">object **required**</td><td style="width: 51.8024%; height: 63.375px;">Object containing datailed receiver's data.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`receiver.type`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">For this configuration the value of this field must be `PLAIN`, otherwise request will be declined.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`receiver.firstName`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Receiver's first name.</td></tr><tr style="height: 49.5938px;"><td style="width: 34.713%; height: 49.5938px;">`receiver.lastName`</td><td style="width: 13.4846%; height: 49.5938px;">string **required**</td><td style="width: 51.8024%; height: 49.5938px;">Receiver's last name.

</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`receiver.birthDate`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Receiver's birth day.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`receiver.cardNumber`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Receiver's card number PAN.</td></tr><tr style="height: 49.5938px;"><td style="width: 34.713%; height: 49.5938px;">`receiver.currency`</td><td style="width: 13.4846%; height: 49.5938px;">string **required**</td><td style="width: 51.8024%; height: 49.5938px;">Currency for transaction. For example: PLN.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`receiver.countryOfResidence`</td><td style="width: 13.4846%; height: 29.7969px;">string</td><td style="width: 51.8024%; height: 29.7969px;">Country code in accordance with ISO 3166-1 Alpha-2. Is required for terminal crypto</td></tr><tr><td style="width: 34.713%;">`additionalData`</td><td style="width: 13.4846%;">object</td><td style="width: 51.8024%;">Object allowing the transaction initiator to add an additional information of the transaction.</td></tr><tr><td style="width: 34.713%;">`additionalData.note`</td><td style="width: 13.4846%;">string **required**</td><td style="width: 51.8024%;">Note for the transaction.

@Length(min = 0, max = 150), @Pattern(regexp = `^(?!\s*$)(?!.*[\r\n]).+$`)

</td></tr></tbody></table>

</details><details id="bkmrk-cash-plain-with-calc"><summary>CASH-PLAIN-WITH-CALCULATE-COMMISSION-RESULT</summary>

<table border="1" style="border-collapse: collapse; width: 100%; height: 100.578px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" colspan="2" style="height: 35.3906px; width: 100.128%;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Headers**</span>

</td></tr><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="color: #ecf0f1; font-family: Lato;">**Key**</span>

</td><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Value**</span>

</td></tr><tr style="height: 29.7969px;"><td style="width: 50.0642%; height: 29.7969px;">`Content-Type`</td><td style="width: 50.0642%; height: 29.7969px;">`application/vnd.sendmoney.v2+json`</td></tr><tr><td style="width: 50.0642%;">`Basic-Authorization`</td><td style="width: 50.0642%;">`Basic dXNlcm5hbWU6cGFzc3dvcmQ=`</td></tr></tbody></table>

<p class="callout info">**Note:** The `Basic-Authorization` will be provided to you during the onboarding process.</p>

<details id="bkmrk-example-request-body-0"><summary>Example request body in JSON format</summary>

```json
{
  "calculateCommissionUuid" : "58e1fc52-dab0-46a2-9198-45eb34024c83",
  "amount" : 1000,
  "type" : "RECEIVER",
  "requestId" : "2b76bfd8-cfe5-4858-a145-eaed73b8cd9c",
  "transactionId" : "TRX220132AM",
  "sender" : {
    "type" : "CASH",
    "firstName" : "Mark",
    "lastName" : "Smith",
    "street" : "Olszewskiego",
    "houseNumber" : "17A",
    "city" : "Lublin",
    "postalCode" : "20-400",
    "flatNumber" : "2",
    "email" : "senderEmail@verestro.com",
    "personalId" : "AGC688910",
    "country" : "PL"
  },
  "receiver" : {
    "type" : "PLAIN",
    "firstName" : "Rob",
    "lastName" : "Wring",
    "birthDate" : "2024-03-19",
    "cardNumber" : "5117964247989169",
    "currency" : "PLN",
    "countryOfResidence" : "PL"
  }
}
```

</details><table border="1" style="border-collapse: collapse; width: 100%; height: 886.047px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 34.713%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Parameter**</span>

</td><td bgcolor="#002060" style="width: 13.4846%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Type**</span>

</td><td bgcolor="#002060" style="width: 51.8024%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr style="height: 57.7812px;"><td style="width: 34.713%; height: 57.7812px;">`amount`</td><td style="width: 13.4846%; height: 57.7812px;">number  
**required**</td><td style="width: 51.8024%; height: 57.7812px;">The total transfer amount (in pennies).</td></tr><tr style="height: 57.7812px;"><td style="width: 34.713%; height: 57.7812px;">`type`</td><td style="width: 13.4846%; height: 57.7812px;">string  
**required**  
</td><td style="width: 51.8024%; height: 57.7812px;">Transaction in `SENDER` or `RECEIVER` currency, for specific transaction type. `CARD_CARD`: above, `CASH_CARD`: `RECEIVER` , `CASH_CARD`: `SENDER`.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 46.5938px;">`requestId`</td><td style="width: 13.4846%; height: 46.5938px;">string  
**required**</td><td style="width: 51.8024%; height: 46.5938px;">UUID generated by the the client, used to identify single transaction. Ensures that the transaction with the given parameter is processed only once.</td></tr><tr style="height: 66.3906px;"><td style="width: 34.713%; height: 66.3906px;">`transactionId`

</td><td style="width: 13.4846%; height: 66.3906px;">string **required**</td><td style="width: 51.8024%; height: 66.3906px;">UUID generated by the the client to assign transaction identifier.</td></tr><tr><td style="width: 34.713%; height: 66.3906px;">`calculateCommissionUuid`

</td><td style="width: 13.4846%; height: 66.3906px;">string</td><td style="width: 51.8024%; height: 66.3906px;">Unique [`calculateCommission`](https://developer.verestro.com/books/payouts/page/technical-documentation-draft#bkmrk-calculate-commission) result identifier that allows to use calculated commission in transaction.</td></tr><tr style="height: 35.3906px;"><td style="width: 34.713%; height: 29.7969px;">`sender`</td><td style="width: 13.4846%; height: 29.7969px;">object **required**</td><td style="width: 51.8024%; height: 29.7969px;">Object containing datailed payer's data.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%;">`sender.type`</td><td style="width: 13.4846%;">string **required**</td><td style="width: 51.8024%;">For this configuration the value of this field must be `CASH`, otherwise request will be declined.</td></tr><tr><td style="width: 34.713%; height: 29.7969px;">`sender.firstName`</td><td style="width: 13.4846%; height: 29.7969px;">string **required**</td><td style="width: 51.8024%; height: 29.7969px;">Payers's first name.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`sender.lastName`</td><td style="width: 13.4846%; height: 29.7969px;">string **required**</td><td style="width: 51.8024%; height: 29.7969px;">Payers's last name.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`sender.street`</td><td style="width: 13.4846%; height: 29.7969px;">string **required**</td><td style="width: 51.8024%; height: 29.7969px;">Payer's address.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 46.5938px;">`sender.houseNumber`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Payer's house number.</td></tr><tr style="height: 46.5938px;"><td style="width: 34.713%; height: 29.7969px;">`sender.city`</td><td style="width: 13.4846%; height: 29.7969px;">string **required**</td><td style="width: 51.8024%; height: 29.7969px;">Payer's city.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`sender.postalCode`</td><td style="width: 13.4846%; height: 29.7969px;">string **required**</td><td style="width: 51.8024%; height: 29.7969px;">Payer's postal code.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`sender.flatNumber`</td><td style="width: 13.4846%; height: 29.7969px;">string **required**</td><td style="width: 51.8024%; height: 29.7969px;">Payer's flat number.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`sender.personalId`</td><td style="width: 13.4846%; height: 29.7969px;">string **required**</td><td style="width: 51.8024%; height: 29.7969px;">Payer's personal id.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`sender.country`</td><td style="width: 13.4846%; height: 29.7969px;">string **required**</td><td style="width: 51.8024%; height: 29.7969px;">Payer's country.</td></tr><tr style="height: 63.375px;"><td style="width: 34.713%; height: 63.375px;">`receiver`</td><td style="width: 13.4846%; height: 63.375px;">object **required**</td><td style="width: 51.8024%; height: 63.375px;">Object containing datailed receiver's data.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 46.5938px;">`receiver.type`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">For this configuration the value of this field must be `PLAIN`, otherwise request will be declined.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 46.5938px;">`receiver.firstName`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Receiver's first name.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 49.5938px;">`receiver.lastName`</td><td style="width: 13.4846%; height: 49.5938px;">string **required**</td><td style="width: 51.8024%; height: 49.5938px;">Receiver's last name.

</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 46.5938px;">`receiver.birthDate`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Receiver's birth day.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 46.5938px;">`receiver.cardNumber`</td><td style="width: 13.4846%; height: 46.5938px;">string **required**</td><td style="width: 51.8024%; height: 46.5938px;">Receiver's card number PAN.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 49.5938px;">`receiver.currency`</td><td style="width: 13.4846%; height: 49.5938px;">string **required**</td><td style="width: 51.8024%; height: 49.5938px;">Currency for transaction. For example: PLN.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`receiver.countryOfResidence`</td><td style="width: 13.4846%; height: 29.7969px;">string</td><td style="width: 51.8024%; height: 29.7969px;">Country code in accordance with ISO 3166-1 Alpha-2. Is required for terminal crypto</td></tr></tbody></table>

</details><details id="bkmrk-example-response-bod-1"><summary>Example response body in JSON format - 202 - Accepted</summary>

```json
HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 56

{
  "orderId" : "0621091f-a35a-4e91-a6bf-1f753304ae83"
}
```

<table border="1" style="border-collapse: collapse; width: 100%; height: 551.812px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 34.7705%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Parameter**</span>

</td><td bgcolor="#002060" style="width: 15.7132%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Type**</span>

</td><td bgcolor="#002060" style="width: 49.6554%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr style="height: 57.7812px;"><td style="width: 34.7705%; height: 57.7812px;">`orderId`</td><td style="width: 15.7132%; height: 57.7812px;">string($uuid)</td><td style="width: 49.6554%; height: 57.7812px;">The unique identifier of transaction.

</td></tr></tbody></table>

</details><details id="bkmrk-possible-errorserror"><summary>Possible errors</summary>

Errors that may occur when attempting to transfer performing:

<details id="bkmrk-404---not-found%7B-%22uu"><summary>400 - Bad request</summary>

```json
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 104

{
  "error" : {
    "message" : "Another transaction with the same id has already been processed."
  }
}
```

</details><details id="bkmrk-409---conflict%7B-%22uui"><summary>401 - Unauthorized</summary>

```json
HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
      "timestamp": "2021-12-22T12:39:53.168+0000",
      "status": 401,
      "error": "Unauthorized",
      "message": "ERROR_USER_NOTFOUND",
      "path": "/api/v2/client/send-money"
}
```

</details><details id="bkmrk-500---internal-serve-0"><summary>200 OK - Error validation</summary>

```JSON
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

{
	"status": "ERROR_VALIDATION",
	"error": {
		"message": "Some information is missing or incorrect.",
		"errors": [{
				"field": "requestId",
				"message": [
					"may not be null"
				]
			}
			{
				"field": "type",
				"message": [
					"may not be null"
				]
			},
			{
				"field": "amount",
				"message": [
					"may not be null"
				]
			}
		]
	}
}
```

</details><details id="bkmrk-403---forbiddenhttp%2F"><summary>403 - Forbidden</summary>

```JSON
HTTP/1.1 403 Forbidden
Content-Type: application/json

{
    "timestamp": 1610464313387,
    "status": 403,
    "error": "Forbidden",
    "message": "No message available",
    "path": "/client/send-money-3ds"
}
```

</details></details></details><p class="callout info">**Note:** If the fund are transferred by a **company,** all sender fields (including name, address, and contact details) must contain the company's information, not the personal details of an individual. The data should be provided in accordance with the requirements outlined in the table below.</p>

<table border="1" id="bkmrk-business-name-firstn" style="border-collapse: collapse; width: 100%; height: 89.3907px;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col><col style="width: 33.3731%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td bgcolor="#002060" style="width: 365.5px; height: 29.7969px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Business Name**</span>

</td><td bgcolor="#002060" style="width: 443.5px; height: 29.7969px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**firstName**</span>

</td><td bgcolor="#002060" style="width: 365.5px; height: 29.7969px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**lastName**</span>

</td></tr><tr><td>Company</td><td>Company</td><td style="width: 365.5px;">Company</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">Fine Company</td><td style="height: 29.7969px;">Fine</td><td style="width: 365.5px; height: 29.7969px;" width="353">Company</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">Big Company International</td><td style="height: 29.7969px;">Big</td><td style="height: 29.7969px;">Company Integrnational</td></tr></tbody></table>

### Calculate commission payout

This method is used to receive information about the commission that will be charged for the transaction. You have to specify in the field: type two values (<span style="font-family: Lato;">`SENDER`</span> or <span style="font-family: Lato;">`RECEIVER`</span>). For Payouts the value must be <span style="font-family: Lato;">`RECEIVER`</span>. The method allows you to calculate commissions for the currencies that have been entered. Result of this method can be used in transaction by passing `calculateCommissionUuid` from the response.

<details id="bkmrk-cash-plain-headers-k"><summary>POST /client/calculate-commission/payout</summary>

<table border="1" id="bkmrk-headers-key-value-co-0" style="border-collapse: collapse; width: 100%; height: 100.578px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" colspan="2" style="height: 35.3906px; width: 100.128%;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Headers**</span>

</td></tr><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="color: #ecf0f1; font-family: Lato;">**Key**</span>

</td><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Value**</span>

</td></tr><tr style="height: 29.7969px;"><td style="width: 50.0642%; height: 29.7969px;">`Content-Type`</td><td style="width: 50.0642%; height: 29.7969px;">`application/json`</td></tr><tr><td style="width: 50.0642%;">`Basic-Authorization`</td><td style="width: 50.0642%;">`Basic dXNlcm5hbWU6cGFzc3dvcmQ=`</td></tr></tbody></table>

<details id="bkmrk-example-response-bod"><summary>Example request body in JSON format</summary>

```json
{
  "amount" : 100,
  "type" : "RECEIVER",
  "sender" : {
    "type" : "CASH"
  },
  "receiver" : {
    "type" : "PLAIN",
    "cardNumber" : "5575167825713507",
    "currency" : "PLN"
  }
}
```

<table border="1" id="bkmrk-parameter-type-descr-3" style="border-collapse: collapse; width: 100%; height: 741.39px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 34.713%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Parameter**</span>

</td><td bgcolor="#002060" style="width: 13.4846%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Type**</span>

</td><td bgcolor="#002060" style="width: 51.8024%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr style="height: 57.7656px;"><td style="width: 34.713%; height: 57.7656px;">`amount`</td><td style="width: 13.4846%; height: 57.7656px;">number  
**required**</td><td style="width: 51.8024%; height: 57.7656px;">The total transfer amount (in pennies)

</td></tr><tr style="height: 57.7656px;"><td style="width: 34.713%; height: 57.7656px;">`type`</td><td style="width: 13.4846%; height: 57.7656px;">string  
**required**  
</td><td style="width: 51.8024%; height: 57.7656px;">Value for specific transaction type. Must be `RECEIVER`.

</td></tr><tr style="height: 35.3906px;"><td style="width: 34.713%; height: 29.7969px;">`sender`</td><td style="width: 13.4846%; height: 29.7969px;">object

**required**

</td><td style="width: 51.8024%; height: 29.7969px;">Object containing detailed payer's data.</td></tr><tr><td style="width: 34.713%; height: 29.7969px;">`sender.type`</td><td style="width: 13.4846%; height: 29.7969px;">string

**required**

</td><td style="width: 51.8024%; height: 29.7969px;">Required configuration per request. Must be `CASH` type.</td></tr><tr style="height: 63.375px;"><td style="width: 34.713%; height: 63.375px;">`receiver`</td><td style="width: 13.4846%; height: 63.375px;">object **required**</td><td style="width: 51.8024%; height: 63.375px;">Object containing detailed receiver's data.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`receiver.type`</td><td style="width: 13.4846%; height: 29.7969px;">string

**required**

</td><td style="width: 51.8024%; height: 29.7969px;">For this configuration the value of this field must be `PLAIN`, otherwise request will be declined. </td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`receiver.cardNumber`</td><td style="width: 13.4846%; height: 29.7969px;">string

**required**

</td><td style="width: 51.8024%; height: 46.5938px;">Receiver's card number PAN.</td></tr><tr style="height: 29.7969px;"><td style="width: 34.713%; height: 29.7969px;">`receiver.currency`</td><td style="width: 13.4846%; height: 29.7969px;">string

**required**

</td><td style="width: 51.8024%; height: 49.5938px;">Currency for transaction. For example: PLN.</td></tr></tbody></table>

</details><details><summary>Example response body in JSON format - 200 - OK</summary>

```json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 186

{
  "calculateCommissionUuid" : "6d43d706-570e-47bd-be48-976c0c9b23b8",
  "depositChargeAmount" : 200,
  "depositChargeCurrency" : "PLN",
  "calculateCommissionExpiration" : 1710893068
}
```

<table border="1" style="border-collapse: collapse; width: 100%; height: 551.812px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 34.713%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Parameter**</span>

</td><td bgcolor="#002060" style="width: 15.7543%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Type**</span>

</td><td bgcolor="#002060" style="width: 49.5327%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr style="height: 57.7812px;"><td class="tableblock halign-left valign-top" style="width: 34.713%;">`calculateCommissionUuid`

</td><td class="tableblock halign-left valign-top" style="width: 15.7543%;">string</td><td class="tableblock halign-left valign-top" style="width: 49.5327%;">Unique identifier that can be used in authorization to use calculate commission result.

</td></tr><tr><td class="tableblock halign-left valign-top" style="width: 34.713%;">`depositChargeAmount`

</td><td class="tableblock halign-left valign-top" style="width: 15.7543%;">number</td><td class="tableblock halign-left valign-top" style="width: 49.5327%;">Amount that will be charged from deposit in pennies

</td></tr><tr><td class="tableblock halign-left valign-top" style="width: 34.713%;">`depositChargeCurrency`

</td><td class="tableblock halign-left valign-top" style="width: 15.7543%;">string</td><td class="tableblock halign-left valign-top" style="width: 49.5327%;">Deposit currency

</td></tr><tr><td class="tableblock halign-left valign-top" style="width: 34.713%;">`calculateCommissionExpiration`

</td><td class="tableblock halign-left valign-top" style="width: 15.7543%;">number</td><td class="tableblock halign-left valign-top" style="width: 49.5327%;">Expiration date of calculate commission result in unix time

</td></tr></tbody></table>

</details><details id="bkmrk-possible-errors422--"><summary>Possible errors</summary>

<details id="bkmrk-422---unprocessable-"><summary>422 - Unprocessable entity</summary>

```json
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 184

{
  "status" : "E0152",
  "message" : "Transaction rejected, issuer card not supported",
  "httpStatus" : "UNPROCESSABLE_ENTITY",
  "traceId" : "483ba538-ff94-41eb-b54d-34d1a6336ddb"
}
```

</details><details id="bkmrk-500---internal-serve-1"><summary>500 - Internal server error</summary>

```json
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Content-Length: 150

{
  "status" : "E9000",
  "message" : "Domain error",
  "httpStatus" : "INTERNAL_SERVER_ERROR",
  "traceId" : "edeb0c72-2b63-4be4-81d3-a5a878609726"
}
```

</details></details></details>### Currency rate by provider

This method is used for determine currency rate for revaluation from funding to payment (`lowerRate`) and payment to funding (`higherRate`). Notice that `lowerRate` is used to transaction processing.

<p class="callout success">**Tip:** Payout API allows users to select the direction of revaluation by providing specify type value in [`orderPayout`](https://developer.verestro.com/books/payouts-to-cards/page/technical-documentation#bkmrk-%C2%A0-0) request. User by selecting `type` = `SENDER` defines amount of funding in given currency. This amount is collected from sender card in selected currency. In case there's need revaluation from one currency to another, system uses `lowerRate`.  
</p>

<details id="bkmrk-post-%2Fclient%2Fcalcula"><summary>POST /client/currency-rate</summary>

<table border="1" id="bkmrk-headers-key-value-co" style="border-collapse: collapse; width: 100%; height: 100.578px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" colspan="2" style="height: 35.3906px; width: 100.128%;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Headers**</span>

</td></tr><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="color: #ecf0f1; font-family: Lato;">**Key**</span>

</td><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Value**</span>

</td></tr><tr style="height: 29.7969px;"><td style="width: 50.0642%; height: 29.7969px;">`Content-Type`</td><td style="width: 50.0642%; height: 29.7969px;">`application/json`</td></tr><tr><td style="width: 50.0642%;">`Basic-Authorization`</td><td style="width: 50.0642%;">`Basic dXNlcm5hbWU6cGFzc3dvcmQ=`</td></tr></tbody></table>

<details id="bkmrk-example-request-body-3"><summary>Example request body in JSON format</summary>

```
{
  "provider" : "MASTERCARD",
  "from" : "USD",
  "to" : "PLN",
  "effectiveDate" : "2017-06-05 12:00:00"
}
```

<table border="1" id="bkmrk-parameter-type-descr" style="border-collapse: collapse; width: 100%; height: 502.9px;"><tbody><tr style="height: 36px;"><td bgcolor="#002060" style="width: 34.713%; height: 36px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Parameter**</span>

</td><td bgcolor="#002060" style="width: 13.4846%; height: 36px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Type**</span>

</td><td bgcolor="#002060" style="width: 51.8024%; height: 36px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr style="height: 63.375px;"><td style="width: 34.713%; height: 63.375px;">`provider`</td><td style="width: 13.4846%; height: 63.375px;">string **required**</td><td style="width: 51.8024%; height: 63.375px;">VISA or MASTERCARD or MAESTRO.</td></tr><tr style="height: 57.6px;"><td style="width: 34.713%; height: 57.6px;">`from`</td><td style="width: 13.4846%; height: 57.6px;">string

**required**

</td><td style="width: 51.8024%; height: 57.6px;">Source revaluation currency. </td></tr><tr style="height: 57.6px;"><td style="width: 34.713%; height: 57.6px;">`to`</td><td style="width: 13.4846%; height: 57.6px;">string

**required**

</td><td style="width: 51.8024%; height: 57.6px;">Destination revaluation currency.</td></tr><tr style="height: 57.6px;"><td style="width: 34.713%; height: 57.6px;">`effectiveDate`</td><td style="width: 13.4846%; height: 57.6px;">string

</td><td style="width: 51.8024%; height: 57.6px;">Date from which the currency rate is needed. This is optional field. When there is no effectiveDate field, then currency rate is getting from request date. (Format "yyyy-MM-ddHH:mm:ss")</td></tr></tbody></table>

</details><details><summary>Example response body in JSON format - 200 - OK</summary>

```json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 104

{
  "status" : "SUCCESS",
  "success" : {
    "lowerRate" : 3.735908,
    "higherRate" : 3.8522295
  }
}
```

<table border="1" style="border-collapse: collapse; width: 100%; height: 551.812px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 34.6667%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Parameter**</span>

</td><td bgcolor="#002060" style="width: 15.7333%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Type**</span>

</td><td bgcolor="#002060" style="width: 49.6%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr style="height: 57.7812px;"><td class="tableblock halign-left valign-top" style="width: 34.6667%;">`status`

</td><td class="tableblock halign-left valign-top" style="width: 15.7333%;">string</td><td class="tableblock halign-left valign-top" style="width: 49.6%;">Status of the revaluation.

</td></tr><tr><td class="tableblock halign-left valign-top" style="width: 34.6667%;">`success`

</td><td class="tableblock halign-left valign-top" style="width: 15.7333%;">object</td><td class="tableblock halign-left valign-top" style="width: 49.6%;">Rate for revaluation.

</td></tr><tr><td class="tableblock halign-left valign-top" style="width: 34.6667%;">`success.lowerRate`

</td><td class="tableblock halign-left valign-top" style="width: 15.7333%;">decimal

</td><td class="tableblock halign-left valign-top" style="width: 49.6%;">Rate for revaluation from funding to payment

</td></tr><tr><td class="tableblock halign-left valign-top" style="width: 34.6667%;">`success.higherRate`

</td><td class="tableblock halign-left valign-top" style="width: 15.7333%;">decimal

</td><td class="tableblock halign-left valign-top" style="width: 49.6%;">Rate for revaluation from payment to funding

</td></tr></tbody></table>

</details><details id="bkmrk-possible-errors422---0"><summary>Possible errors</summary>

<details id="bkmrk-422---unprocessable--0"><summary>200 - OK</summary>

```json
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

{
    "status": "CURRENCY_INVALID",
    "error": {
        "message": "Invalid currency."
    }
}
```

```
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

{
    "status": "CURRENCY_RATES_INVALID",
    "error": {
        "message": "Invalid currency rates."
    }
}
```

```
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

{
    "status": "ERROR_VALIDATION",
    "error": {
        "message": "Some information is missing or incorrect.",
        "errors": [
            {
                "field": "sender.currency",
                "message": [
                    "Currency is not supported"
                ]
            },
            {
                "field": "receiver.currency",
                "message": [
                    "Currency is not supported"
                ]
            }
        ]
    }
}
```

</details></details></details>### Check status

The method allows to get a status of multi-currency transfer providing transfer order id in the method's URL address. Parameter order id was returned in the response of the <span style="font-family: Lato;">[`orderPayout`](https://developer.verestro.com/books/payouts/page/technical-documentation#bkmrk-%C2%A0-0) method.</span>

<details id="bkmrk-get-%2Fclient%2Fsend-mon"><summary>GET /client/send-money/details/{orderId}</summary>

<table border="1" id="bkmrk-headers-key-value-co-1" style="border-collapse: collapse; width: 100%; height: 100.578px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" colspan="2" style="height: 35.3906px; width: 100.128%;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Headers**</span>

</td></tr><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="color: #ecf0f1; font-family: Lato;">**Key**</span>

</td><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Value**</span>

</td></tr><tr style="height: 29.7969px;"><td style="width: 50.0642%; height: 29.7969px;">`Content-Type`</td><td style="width: 50.0642%; height: 29.7969px;">`application/json`</td></tr><tr><td style="width: 50.0642%;">`Basic-Authorization`</td><td style="width: 50.0642%;">`Basic dXNlcm5hbWU6cGFzc3dvcmQ=`</td></tr></tbody></table>

<table border="1" id="bkmrk-query-parameter-valu" style="border-collapse: collapse; width: 100%; height: 100.578px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="color: #ecf0f1; font-family: Lato;">**Query parameter**</span>

</td><td bgcolor="#002060" style="width: 50.0642%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Value**</span>

</td></tr><tr style="height: 29.7969px;"><td style="width: 50.0642%; height: 29.7969px;">`orderId`</td><td style="width: 50.0642%; height: 29.7969px;">`<UUID of the ordered transfer>`</td></tr></tbody></table>

<details id="bkmrk-example-response-bod-2"><summary>Example response body in JSON format - 200 - OK</summary>

```json
{
  "transactionId" : "TRX220132AM",
  "amount" : 1000,
  "amountInUsDollar" : 268,
  "bigDecimalAmount" : 10.0,
  "commission" : 200,
  "bigDecimalCommission" : 2.0,
  "orderId" : "00549d98-08cb-45d2-8673-4dcafa81f498",
  "createdDate" : "03-04-2018, 14:01",
  "fundingRrn" : "014011103023",
  "paymentRrn" : "014011103024",
  "arn" : "05411640143500000019325",
  "3DS" : true,
  "revaluationResult" : {
    "revaluationFundingAmount" : 1000,
    "bigDecimalRevaluationFundingAmount" : 10.0,
    "fundingCurrency" : "PLN",
    "revaluationPaymentAmount" : 1000,
    "bigDecimalRevaluationPaymentAmount" : 10.0,
    "paymentCurrency" : "PLN",
    "determineCurrencyRate" : {
      "from" : "PLN",
      "to" : "PLN",
      "currencyRate" : "1"
    }
  },
  "receiver" : {
    "firstName" : "John",
    "lastName" : "Novak",
    "provider" : "MASTERCARD",
    "hiddenCardNumber" : "557455******1623",
    "bankName" : "Alior Bank SA"
  },
  "sender" : {
    "firstName" : "Caroline",
    "lastName" : "Novak",
    "provider" : "MASTERCARD",
    "hiddenCardNumber" : "511796******9169",
    "bankName" : "Alior Bank SA"
  }
}
```

<table border="1" id="bkmrk-response-parameters-" style="border-collapse: collapse; width: 100%; height: 1058.44px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" colspan="3" style="height: 35.3906px; width: 100%;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Response parameters**</span>

</td></tr><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 40.2574%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Parameter**</span>

</td><td bgcolor="#002060" style="width: 26.4092%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Type**</span>

</td><td bgcolor="#002060" style="width: 33.3333%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`amount`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Amount of the transferred cash of the currency in pennies \[1PLN = 100\].</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`amountInUsDollar`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Amount of the transferred cash in pennies in USD currency \[1PLN = 100\].</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`bigDecimalAmount`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Amount of the transferred cash with decimal precision.</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`commission`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Amount of the commission added to the ordered transfer in pennies \[1PLN = 100\]</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`bigDecimalCommission`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Amount of the commission added to the ordered transfer with decimal precision.</td></tr><tr style="height: 29.7969px;"><td style="width: 40.2574%; height: 29.7969px;">`orderId`</td><td style="width: 26.4092%; height: 29.7969px;">string</td><td style="width: 33.3333%; height: 29.7969px;">Unique transaction identifier.</td></tr><tr style="height: 80.1719px;"><td style="width: 40.2574%; height: 80.1719px;">`transactionId`</td><td style="width: 26.4092%; height: 80.1719px;">string</td><td class="tableblock halign-left valign-top" style="width: 33.3333%; height: 80.1719px;">This parameter is used to send you your own internal transaction identifier. This field is also sent by the [`webhook`](https://developer.verestro.com/books/payouts/page/technical-documentation#bkmrk-webhook) method.

</td></tr><tr style="height: 29.7969px;"><td style="width: 40.2574%; height: 29.7969px;">`createdDate`</td><td style="width: 26.4092%; height: 29.7969px;">string</td><td style="width: 33.3333%; height: 29.7969px;">Date of transaction order.</td></tr><tr style="height: 29.7969px;"><td style="width: 40.2574%; height: 29.7969px;">`fundingRrn`</td><td style="width: 26.4092%; height: 29.7969px;">string</td><td style="width: 33.3333%; height: 29.7969px;">Funding retrieval reference number.</td></tr><tr style="height: 29.7969px;"><td style="width: 40.2574%; height: 29.7969px;">`paymentRrn`</td><td style="width: 26.4092%; height: 29.7969px;">string</td><td style="width: 33.3333%; height: 29.7969px;">Payment retrieval reference number.</td></tr><tr style="height: 29.7969px;"><td style="width: 40.2574%; height: 29.7969px;">`arn`</td><td style="width: 26.4092%; height: 29.7969px;">string</td><td style="width: 33.3333%; height: 29.7969px;">Acquirering institution reference number.</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`3DS`</td><td style="width: 26.4092%; height: 46.5938px;">boolean</td><td style="width: 33.3333%; height: 46.5938px;">The value: `true`/`false` informs whether 3DS was performed or not.</td></tr><tr style="height: 63.3906px;"><td style="width: 40.2574%; height: 63.3906px;">`revaluationResult`</td><td style="width: 26.4092%; height: 63.3906px;">object</td><td style="width: 33.3333%; height: 63.3906px;">Detailed information about revaluation between sender currency and receiver currency.</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`revaluationResult.revaluationFundingAmount`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Amount of the funding transaction in `fundingCurrency` in pennies \[1PLN = 100\].</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`revaluationResult.bigDecimalRevaluationFundingAmount`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Amount of the funding transaction in decimal precision.</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`revaluationResult.fundingCurrency`</td><td style="width: 26.4092%; height: 46.5938px;">string</td><td style="width: 33.3333%; height: 46.5938px;">Currency code the same as sender’s card currency.</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`revaluationResult.revaluationPaymentAmount`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Amount of the payment transaction in `paymentCurrency` in pennies \[1PLN = 100\].</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`revaluationResult.bigDecimalRevaluationPaymentAmount`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Amount of the payment transaction in decimal precision.</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`revaluationResult.paymentCurrency`</td><td style="width: 26.4092%; height: 46.5938px;">string</td><td style="width: 33.3333%; height: 46.5938px;">Currency code the same as receivers's card currency.</td></tr><tr style="height: 29.7969px;"><td style="width: 40.2574%; height: 29.7969px;">`revaluationResult.determineCurrencyRate`</td><td style="width: 26.4092%; height: 29.7969px;">object</td><td style="width: 33.3333%; height: 29.7969px;">Details about currency conversion.</td></tr><tr style="height: 29.7969px;"><td style="width: 40.2574%; height: 29.7969px;">`revaluationResult.determineCurrencyRate.from`</td><td style="width: 26.4092%; height: 29.7969px;">number</td><td style="width: 33.3333%; height: 29.7969px;">Currency coverted "from".</td></tr><tr style="height: 29.7969px;"><td style="width: 40.2574%; height: 29.7969px;">`revaluationResult.determineCurrencyRate.to`</td><td style="width: 26.4092%; height: 29.7969px;">number</td><td style="width: 33.3333%; height: 29.7969px;">Result of the conversion.</td></tr><tr style="height: 46.5938px;"><td style="width: 40.2574%; height: 46.5938px;">`revaluationResult.determineCurrencyRate.currencyRate`</td><td style="width: 26.4092%; height: 46.5938px;">number</td><td style="width: 33.3333%; height: 46.5938px;">Currency rate.</td></tr></tbody></table>

</details><details id="bkmrk-possible-errors203---0"><summary>Possible errors</summary>

<details id="bkmrk-203---non-authoritat-0"><summary>203 - Non-authoritative information</summary>

<p class="callout warning">**Important!** After you get 203 and if you don’t get a response (200 - succeeded or 500 - declined) within 60 seconds then please contact us.</p>

```JSON
HTTP/1.1 203 Non-Authoritative Information
```

</details><details id="bkmrk-401---unauthorized%7B-"><summary>401 - Unauthorized</summary>

```JSON
{
  "timestamp": "2023-03-29T19:16:01.288+00:00",
  "status": 401,
  "error": "Unauthorized",
  "path": "/api/v1/transactions/9609a08e-cd80-4e6e-8664-f1e6b2f2dc50"
}
```

</details><details id="bkmrk-404---not-foundhttp%2F-0"><summary>404 - Not found</summary>

```JSON
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 51

{
  "errorStatus" : "ERROR_TRANSACTION_NOT_FOUND"
}
```

</details><details id="bkmrk-422---unprocessable--2"><summary>422 - Unprocessable entity</summary>

```JSON
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 1287

{
  "transactionId" : "TRX220132AM",
  "amount" : 1000,
  "amountInUsDollar" : 268,
  "bigDecimalAmount" : 10.0,
  "commission" : 200,
  "bigDecimalCommission" : 2.0,
  "orderId" : "00549d98-08cb-45d2-8673-4dcafa81f498",
  "createdDate" : "03-04-2018, 14:01",
  "fundingRrn" : "014011103023",
  "paymentRrn" : "014011103024",
  "arn" : "05411640143500000019325",
  "3DS" : true,
  "revaluationResult" : {
    "revaluationFundingAmount" : 1000,
    "bigDecimalRevaluationFundingAmount" : 10.0,
    "fundingCurrency" : "PLN",
    "revaluationPaymentAmount" : 1000,
    "bigDecimalRevaluationPaymentAmount" : 10.0,
    "paymentCurrency" : "PLN",
    "determineCurrencyRate" : {
      "from" : "PLN",
      "to" : "PLN",
      "currencyRate" : "1"
    }
  },
  "receiver" : {
    "firstName" : "John",
    "lastName" : "Novak",
    "provider" : "MASTERCARD",
    "hiddenCardNumber" : "557455******1623",
    "bankName" : "Alior Bank SA"
  },
  "sender" : {
    "firstName" : "Caroline",
    "lastName" : "Novak",
    "provider" : "MASTERCARD",
    "hiddenCardNumber" : "511796******9169",
    "bankName" : "Alior Bank SA"
  },
  "transactionStatus" : "DECLINED",
  "cardBlockType" : "TEMP",
  "cardBlockedUntil" : "2024-03-21T01:04:17.573",
  "errorStatus" : "ERROR_SENDER_CARD_IS_BLOCKED"
}
```

</details><details id="bkmrk-422---unprocessable--3"><summary>422 - Unprocessable entity CASH-CARD</summary>

```JSON
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 1358

{
  "transactionId" : "TRX220132AM",
  "amount" : 1000,
  "amountInUsDollar" : 268,
  "bigDecimalAmount" : 10.0,
  "commission" : 200,
  "bigDecimalCommission" : 2.0,
  "orderId" : "00549d98-08cb-45d2-8673-4dcafa81f498",
  "createdDate" : "03-04-2018, 14:01",
  "fundingRrn" : "014011103023",
  "paymentRrn" : "014011103024",
  "arn" : "05411640143500000019325",
  "3DS" : false,
  "revaluationResult" : {
    "revaluationFundingAmount" : 1000,
    "bigDecimalRevaluationFundingAmount" : 10.0,
    "fundingCurrency" : "PLN",
    "revaluationPaymentAmount" : 1000,
    "bigDecimalRevaluationPaymentAmount" : 10.0,
    "paymentCurrency" : "PLN",
    "determineCurrencyRate" : {
      "from" : "PLN",
      "to" : "PLN",
      "currencyRate" : "1"
    }
  },
  "receiver" : {
    "firstName" : "John",
    "lastName" : "Novak",
    "provider" : "MASTERCARD",
    "hiddenCardNumber" : "557455******1623",
    "bankName" : "Alior Bank SA"
  },
  "sender" : {
    "firstName" : "Caroline",
    "lastName" : "Novak",
    "provider" : "CASH"
  },
  "transactionStatus" : "DECLINED",
  "merchantSettlementCurrency" : "USD",
  "fenigeCommissionInMerchantSettlementCurrency" : 0.05,
  "transactionAmountInMerchantSettlementCurrency" : 2.68,
  "cardBlockType" : "TEMP",
  "cardBlockedUntil" : "2024-03-21T01:04:18.165",
  "errorStatus" : "ERROR_SENDER_CARD_IS_BLOCKED"
}
```

</details><details id="bkmrk-500---internal-serve-2"><summary>500 - Internal server error</summary>

```JSON
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain;charset=ISO-8859-1

PAYMENT_TRANSACTION_DECLINED:CODE_05
```

</details></details></details>
### Webhook

This method allow you to receive notification after the ordered transaction. After handling the request from Verestro system, you will be notified of the current status of the transaction. Then you can be sure that the transaction processing was finished and you can get the transaction details if you want to. This functionality is optional and it is not required to use Payout solution.

<p class="callout info">**Note:** To use the webhooks functionality, please notify Verestro Sales Department. After that we will configure URL address and a secret token which you will be using to communicate with webhook service. Please notice you must specify the URL - webhook will be sent to this address. The secret token will be generated by the Verestro employee and sent to the client.</p>

<details id="bkmrk-sequence-diagram-pre"><summary>Sequence diagram presenting webhook process</summary>

@startuml  
skinparam ParticipantPadding 30  
skinparam BoxPadding 30  
skinparam noteFontColor #FFFFFF  
skinparam noteBackgroundColor #1C1E3F  
skinparam noteBorderColor #1C1E3F  
skinparam noteBorderThickness 1  
skinparam sequence {  
ArrowColor #1C1E3F  
ArrowFontColor #1C1E3F  
ActorBorderColor #1C1E3F  
ActorBackgroundColor #FFFFFF  
ActorFontStyle bold  
ParticipantBorderColor #1C1E3F  
ParticipantBackgroundColor #1C1E3F  
ParticipantFontColor #FFFFFF  
ParticipantFontStyle bold  
LifeLineBackgroundColor #1C1E3F  
LifeLineBorderColor #1C1E3F  
}  
participant "Customer" as c  
participant "Verestro" as v  
c-&gt;v: Transaction request  
c&lt;-v: Response  
v-&gt;v: Transaction processing...  
v-&gt;c: Transaction processing finnished callback (webhook)  
c-&gt;v: Response HTTP Status 200 OK  
@enduml

</details>You must return HTTP status 200 OK after receiving webhook. Otherwise our server will retry the request. There are 3 attemps of requesting webhook. Every repeat is executed with 5 seconds interval excluding timeout from your server.

<p class="callout success">**Tip:** In order to protect client API by polling or other undesirable actions, the webhook service uses headers. If you want to use get webhook notification, you need to handle required headers on your side.</p>

<p class="callout success">**Tip:** To build `X-MERCHANT-SECRET` header:  
1. Concatenate secret token established by you and Verestro's employee with `orderId` of transaction  
2. Hash with SHA256 function result of above operation</p>

<details id="bkmrk-example-of-x-merchan"><summary>Example of X-MERCHANT-SECRET building</summary>

```
import hashlib

# secret token established by client with verestro's employee
secret = 'mNaU9TaK4m9myYYFBJgKu8slNH2fCKutJyzXwI'

# orderId received from webhook's request
order_id = 'c168a885-acfa-4a91-a1ad-ed7a042b7238'

# concatenate strings in correct order
concatenated = secret + order_id

# use SHA256 hashing function
hashed = hashlib.sha256(concatenated.encode('utf-8')).hexdigest()

# then compare 'hashed' variable with content of 'X-MERCHANT-SECRET' header
```

</details>There are three possible states of the webhook: `TRANSACTION_APPROVED`, `TRANSACTION_DECLINED` or `TRANSACTION_REVERSED`. Each of the webhooks is presented below:

<table border="1" id="bkmrk-headers-key-descript" style="border-collapse: collapse; width: 100%; height: 100.578px;"><tbody><tr style="height: 35.3906px;"><td bgcolor="#002060" colspan="2" style="height: 35.3906px; width: 100.124%;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Headers**</span>

</td></tr><tr style="height: 35.3906px;"><td bgcolor="#002060" style="width: 32.5309%; height: 35.3906px;" width="353"><span style="color: #ecf0f1; font-family: Lato;">**Key**</span>

</td><td bgcolor="#002060" style="width: 67.5927%; height: 35.3906px;" width="353"><span style="font-family: Lato; color: #ecf0f1;">**Description**</span>

</td></tr><tr style="height: 29.7969px;"><td style="width: 32.5309%; height: 29.7969px;">`X-MERCHANT-SECRET`</td><td style="width: 67.5927%; height: 29.7969px;">SHA256 Hash string composed from secret token and orderId placed in request body of this webhook</td></tr><tr><td style="width: 32.5309%;">`X-MERCHANT-TIMESTAMP`</td><td style="width: 67.5927%;">Timestamp of server response in UNIX format for instance: 1614023731</td></tr></tbody></table>

<details id="bkmrk-transaction_approved"><summary>TRANSACTION\_APPROVED</summary>

```
Content-Type: application/json
X-MERCHANT-SECRET: 3cbd17f561150a1394cabbe2b6031fd83f3f3081abe28c32b7fed16f32aebc4a
X-MERCHANT-TIMESTAMP: 1614800720
{
    "orderId": "c168a885-acfa-4a91-a1ad-ed7a042b7238",
    "transactionId": "TRX220132AM",
    "status": "APPROVED",
    "responseCode": "CODE_00",
    "amount": 900,
    "amountCurrency": "PLN",
    "amountInUsDollar": 248,
    "revaluationResult": {
      "revaluationFundingAmount": 900,
      "bigDecimalRevaluationFundingAmount": 9,
      "fundingCurrency": "PLN",
      "revaluationPaymentAmount": 900,
      "bigDecimalRevaluationPaymentAmount": 9,
      "paymentCurrency": "PLN",
      "determineCurrencyRate": {
        "from": "PLN",
        "to": "PLN",
        "currencyRate": "1"
      }
    },
    "commissionAmount": 46,
    "commissionCurrency": "PLN"
}
```

</details><details id="bkmrk-transaction_declined"><summary>TRANSACTION\_DECLINED</summary>

```
Content-Type: application/json
X-MERCHANT-SECRET: 3cbd17f561150a1394cabbe2b6031fd83f3f3081abe28c32b7fed16f32aebc4a
X-MERCHANT-TIMESTAMP: 1614800720

{
    "orderId": "42e8a03a-eb2e-4208-b99b-ac2ad6308498",
    "transactionId": "TRX220132AM",
    "status": "DECLINED",
    "responseCode": "CODE_05",
    "errorMessage": "FUNDING_TRANSACTION_DECLINED:CODE_05",
    "amount": 900,
    "amountCurrency": "PLN",
    "amountInUsDollar": 248,
    "revaluationResult": {
      "revaluationFundingAmount": 900,
      "bigDecimalRevaluationFundingAmount": 9,
      "fundingCurrency": "PLN",
      "revaluationPaymentAmount": 900,
      "bigDecimalRevaluationPaymentAmount": 9,
      "paymentCurrency": "PLN",
      "determineCurrencyRate": {
        "from": "PLN",
        "to": "PLN",
        "currencyRate": "1"
      }
    },
    "commissionAmount": 46,
    "commissionCurrency": "PLN",
    "merchantAdviceCode": "03 - Do not try again"
}
```

</details><details id="bkmrk-transaction_reversed"><summary>TRANSACTION\_REVERSED</summary>

```
Content-Type: application/json
X-MERCHANT-SECRET: 3cbd17f561150a1394cabbe2b6031fd83f3f3081abe28c32b7fed16f32aebc4a
X-MERCHANT-TIMESTAMP: 1614800720

{
    "orderId": "1b498361-f8db-406e-943b-ca2b12b7aa38",
    "transactionId": "TRX220132AM",
    "status": "REVERSED",
    "responseCode": "CODE_00",
    "amount": 1000,
    "amountCurrency": "PLN",
    "amountInUsDollar": 273,
    "revaluationResult": {
      "revaluationFundingAmount": 1000,
      "bigDecimalRevaluationFundingAmount": 10,
      "fundingCurrency": "PLN",
      "revaluationPaymentAmount": 262,
      "bigDecimalRevaluationPaymentAmount": 2.62,
      "paymentCurrency": "USD",
      "determineCurrencyRate": {
        "from": "PLN",
        "to": "USD",
        "currencyRate": "0.2616157"
      }
    },
    "commissionAmount": 1,
    "commissionCurrency": "PLN"
}
```

</details>