# Payout to xPay # Introduction The Payout to xPay product was created to allow you and your users to send funds from existing balance to the chosen recipient in the form of payment link. The recipient chooses a card from Google Pay or Apple Pay wallet (instead of typing it in manually) to receive these funds. The possibility to order payout will be created by our system after your company pass the KYB process. Thus you will be able to create a balance for your company, for your end users and to order payout transfers for the declared amount to the recipient of your choice. After ordering such a transfer, we will generate a payment link, which we will then return to you. Such payment link can be sent to the selected recipient. Additionally, you will be able to manage and track your payouts history using Admin Panel we provide to our Customers. From the recipient's side after clicking the received link he will be redirected to our Payout to xPay view. From this view recipient can see the amount of funds he will receive. The recipient can select a card (which will be top upped by amount you declared) using his Google Pay and Apple Pay wallet.

**Important!** Implementation of the solution is work in progress...

#### How to connect with us? Integration with Payout to xPay can be divided into two parts. The first stage is [business onboarding](https://developer.verestro.com/books/payout-to-xpay/page/onboarding), where the terms of the contract are defined and all documents are confirmed (including KYB verification). The second stage is technical integration, in which your instance and balance are created in our system. Such configuration allows us to recognize transactions ordered by your company or your end users. Once we have completed these steps, you can integrate your application with our API following [Technical documentation](https://developer.verestro.com/books/payout-to-xpay/chapter/technical-documentation). Once integrated, you will be able to open a payment session by calling proper [API method](https://developer.verestro.com/books/payout-to-xpay/chapter/technical-documentation). Verestro will return a payment link as a response, which then you can forward to money recipient. By opening this link the recipient will see the transaction metadata and will be able to choose a proper xPay option he wish to receive money. Verestro will be fully responsible for the execution of transactions.

**Note:** It is required that you have an account in Acquirer's system which will settle your transactions. For more informations please contact our Sale Department. We are suggesting to use [Fenige](https://www.fenige.com/) as this is our partner acquiring institution and we are fully integrated with this Acquirer

# Overview The chapter focuses on the description of each of the components involved in the xPay payout process and what each component is responsible for. All mentioned components and their responsibilities are made and managed by Verestro. ## Terminology
**Name** **Description**
Customer/Merchant Institution which uses Verestro products. This institution decides which payment method should be available in the solution and how transaction should be processed.
xPayAn external institution that holds cards in a mobile wallet - Apple Pay and Google Pay wallet.
AcquirerAn external institution that communicates with the card issuer, protects against fraud and taking responsible for executing the transaction and checking the correctness of 3D Secure authentication.
BalanceThis is the current balance of funds for a given user stored in the Antaca service.
CardIt is a payment instrument issued by the issuer to a given user. You can send and receive funds using the card.
Issuer Bank, card issuer. It determines whether a given transaction can be performed and whether 3D Secure authentication is needed.
Payout A method that allows you to order a transfer from your balance to provided payment card.
User End user, e.g. the entity to which the card was issued.
Component An application service that is a part of the entire technical solution, for example Payout API.
## Application components This chapter is describing all components involved in the processes included in the Payout to xPay product. Each of the sections below describes each of the components. Internal services are the key elements of the solution implemented on the Verestro side. Each of them has a separate responsibility in the entire payout to xPay process. Below table describes every internal components in our Payout to xPay application. [xPay Payout](https://developer.verestro.com/books/payout-to-xpay/page/overview#bkmrk-admin-panel-1) which is our internal service integrated with Google Pay and Apple Pay, thus enabling getting the card tokens from these wallets, generating pay me link allowing to order payouts and connecting with acquirer to perform ordered transfer and handling 3D Secure process.
**Component** **Description**
[xPay Payout API](https://developer.verestro.com/books/payout-to-xpay/page/overview#bkmrk-admin-panel-1) The backend component of the Payout to xPay application. It is responsible for opening a payment session, generating a payment link and ordering the transaction to an acquiring institution.
[xPay Payout frontend app](https://developer.verestro.com/books/payout-to-xpay/page/overview#bkmrk-admin-panel-1) The frontend component of the Payout to xPay application. It contains a frontend view to which the recipient of the payment link is redirected. In addition, it gets recipient's card from xPay Wallet and passes it to the Payout to xPay API.
[Antaca API](https://developer.verestro.com/books/payout-to-xpay/page/overview#bkmrk-antaca) Backend component which manages balances and allows certain operations related to them. Such operations include creating a new balance, debiting and crediting a balance or deactivating a balance. This component is not part of the Payout to xPay application, but it is crucial to this service as the funds of the payout sender are taken from his balance in Antaca.
@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 "Sender" as sender participant "Customer App" as customer participant "Verestro Backend" as verestrobackend participant "Verestro Frontend" as verestrofront participant "Google/Apple Pay" as xpay actor "Money Recipient" as user == Customer's part of the process == sender->customer: Order payment link (trx data) customer->verestrobackend: Create payment link(trxData, balanceId) customer<-verestrobackend: Return payment link sender<-customer: Return payment link ==== sender-->user: Send payment link note left of user: Clicks on link == Verestro's part of the process == user->verestrofront: Redirect recipient to payment link webview note right of verestrofront: Recipient sees that he can claim money from sender note right of verestrofront: Recipient choosed xPay verestrofront->xpay: Open recipient xPay wallet note left of xpay: Recipient chooses card verestrofront<-xpay: Return card verestrobackend<-verestrofront: Provide recipient's card verestrobackend<-verestrobackend: Make payout to recipient card customer<-verestrobackend: Notify customer about payout status user<--verestrobackend: Top up card if status success ==== @enduml

**Note**: Block "Verestro" contains all Verestro's internal services: Antaca, xPay connector and Acquirer connector.

### Antaca This is the initial component in the payout process. Antaca is responsible for creating balances for you company and it's users, or allowing to credit/debit your balance depending on the direction of the funds. Antaca also monitors the balance of each entity, ensuring that the requested action on the balance is performed after meeting specific conditions, for example, it is not possible to debit the balance for more funds than are currently in the balance (you cannot send 100 EUR if you have only 99 EUR on your balance). It is also not possible to top up a balance that has been deactivated. The table below shows Antaca's methods for creating, crediting and debiting a balance.
**Method** **Description**
[Create balance](https://developer.verestro.com/books/money-transfer-via-card/page/use-cases#bkmrk-credit-balance) Method that allows you to create a balance for your company.
[Credit balance](https://developer.verestro.com/books/money-transfer-via-card/page/use-cases#bkmrk-credit-balance) Method that allows you to top up the created balance.
[Debit balance](https://developer.verestro.com/books/money-transfer-via-card/page/use-cases#bkmrk-debit-balance) Method that allows you to debit the created balance.

**Tip:** In the Payout to xPay product, Verestro is responsible for appropriately calling the Antaca methods that credit or debit the balance. You, as a Customer, only need to send us information on which balance and of what amount we should call a given operation.

### xPay Payout A component that supports all key payout to xpay processes. Each of the processes will be described below, maintaining the sequence of steps that take place from the initiation of the payout by the sender to the recipient of the payment using the xPay card token. The xPay payout component is responsible for the following actions: 1. Initiation of payment shipment, i.e. the moment when the option to order a transfer to a given recipient was selected and completion of transfer information such as amount or currency was provided by money sender. 2. Initiation of the payment link creation and thus opening a payment session in our system (storing information about the planned transaction, such as amount, currency and recipient data). The generated payment link is returned to the sender so that the sender can send it to the potential recipient as a SMS message or via other communicators. 3. The above payment link performs redirect to the Verestro Payout to xPay frontend app where the recipient of the link is able to select the card from the Apple Pay or Google Pay wallet to which he wants the funds transferred. 4. After selecting one of the two xPay wallets, our mechanism communicates through the appropriate lib with the Apple Pay / Google Pay server, which returns a list of the recipient's cards in response. The selected card is returned in the form of an encrypted token to which the amount declared by the sender will be transferred. 5. Payout to xPay API will perform the order to top up the recipient's card by contacting the acquiring institution and debit the sender's balance by communicating with Antaca. # Use cases This chapter describes the business functions that can be performed by having a company balance in the Verestro system and using Payout via xPay card token. We also present end user default views presented during using the application. Know your business The first step to starting integration is to complete the KYB process. This process is required to identify and verify business clients. Automatic registration process ensures that all the information and documents provided by the clients gone properly through AML verification. Business client registration process may take around 10-15 minutes. [At this link you can find out what exactly the KYB process is and what it looks like](https://developer.verestro.com/books/know-your-business-kyb). KYB in Verestro is performed with the help of an external verification provider - Mobiltek.

**Note:** AML (Anti-Money Laundering) is a set of policies, procedures, and technologies that prevents money laundering.

## Customer balance management Description of methods in Antaca service to create and manage the balance.
**Method** **Description**
[Create balance](https://developer.verestro.com/books/money-transfer-via-card/page/use-cases#bkmrk-credit-balance) Method that allows you to create a balance for your company.
[Credit balance](https://developer.verestro.com/books/money-transfer-via-card/page/use-cases#bkmrk-credit-balance) Method that allows you to top up the created balance.
[Debit balance](https://developer.verestro.com/books/money-transfer-via-card/page/use-cases#bkmrk-debit-balance) Method that allows you to debit the created balance.

**Note:** The balance for your corporation is created during its registration in our system. You can create end-user balances from the Administration Panel created for your corporation or use the [Create balance](https://developer.verestro.com/books/money-transfer-via-card/page/use-cases#bkmrk-credit-balance) method mentioned above.

## Initialize payment link The card top-up process begins when the payment link is initialized. As a customer, you must provide transaction metadata such as the currency in which the payout will be made and the amount you want to top up the recipient's card. After confirming the data you have entered, a link is generated that you can send to the recipient.
UML presenting initialize payment link step by step @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 "Money Receiver" as user participant "Customer" as cust participant "Orovera" as oro note right of cust: Customer has a balance in Antaca Verestro cust->oro: Initialize payment link (provide transaction metadata) oro->cust: Return generated payment link cust->user: Send generated payment link user->oro: Choose xPay card @enduml
[![1_partner_app_sender_view.png](https://developer.verestro.com/uploads/images/gallery/2024-12/scaled-1680-/1-partner-app-sender-view.png)](https://developer.verestro.com/uploads/images/gallery/2024-12/1-partner-app-sender-view.png) [![2_partner_app_sender_view.png](https://developer.verestro.com/uploads/images/gallery/2024-12/scaled-1680-/2-partner-app-sender-view.png)](https://developer.verestro.com/uploads/images/gallery/2024-12/2-partner-app-sender-view.png)
1. Sender provides transaction metadata and order payment link (this step takes place in Customer's application).2. Sender gets payment link and sends it to the recipient (this step takes place in Customer's application).
## Top-up card by xPay card token The recipient receives the link you sent. It is valid for a specified period of time - you can choose the link's lifetime yourself and provide us this information during the onboarding process. After opening the link, a payment template with transaction data is displayed to the recipient. Basicly, the recipient will see how much money they will receive and in what currency. [![image-1685428002241.png](https://developer.verestro.com/uploads/images/gallery/2023-05/scaled-1680-/image-1685428002241.png)](https://developer.verestro.com/uploads/images/gallery/2023-05/image-1685428002241.png) [![image-1699524383207.png](https://developer.verestro.com/uploads/images/gallery/2023-11/scaled-1680-/image-1699524383207.png)](https://developer.verestro.com/uploads/images/gallery/2023-11/image-1699524383207.png) However, to receive the money, the recipient must select the card to which the funds should to be transferred. Depending on the browser the recipient uses, the template will display the option to use the Google Pay wallet (for most browsers) or the Apple Pay wallet (for the Safari browser). From the mentioned xPay wallet, the selected card will be topped up with the funds you declared step before. After making a Payout to the selected card from the xPay wallet, your company's balance is debited for this amount.
UML presenting top up card from xPay step by step @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 "Money Receiver" as user participant "Orovera" as oro participant "Verestro xPay connector" as payt participant "Antaca API" as ant participant "Google/Apple Pay" as xpay participant "Acquirer" as acq user->user: Open payment link note right of user: Link redirects Money Receiver to the web browser user->oro: Choose xPay card oro->payt: Get xPay card token payt->xpay: Get xPay card token xpay->payt: Return xPay card token payt->oro: Return xPay card token oro->ant: Debit Customer balance (declared transaction amount) oro->acq: Payout to card acq->user: Top up card from xPay card token @enduml
[![3_receiver_phone_msg_from_sender.png](https://developer.verestro.com/uploads/images/gallery/2024-12/scaled-1680-/3-receiver-phone-msg-from-sender.png)](https://developer.verestro.com/uploads/images/gallery/2024-12/3-receiver-phone-msg-from-sender.png) [![4_xpay_app_receiver_view.png](https://developer.verestro.com/uploads/images/gallery/2024-12/scaled-1680-/4-xpay-app-receiver-view.png)](https://developer.verestro.com/uploads/images/gallery/2024-12/4-xpay-app-receiver-view.png)
3. Recipient gets message with payment link from the Sender. Recipient clicks that link.4. Recipient is redirected to Payout to xPay view (this step takes place in Verestro Payout to xPay application).
### Get xPay card token The xPay card token is returned automatically from xPay wallet after the recipient selects the proper card. Verestro is a registered Payment Service Provider in Google Pay and Apple Pay, which frees you from the need to integrate with these entities. We call one of the xPays asking for a card token of the card that recipient choosed.
[![5_xpay_app_apple_wallet_opened_receiver_view.png](https://developer.verestro.com/uploads/images/gallery/2024-12/scaled-1680-/GP55-xpay-app-apple-wallet-opened-receiver-view.png)](https://developer.verestro.com/uploads/images/gallery/2024-12/GP55-xpay-app-apple-wallet-opened-receiver-view.png) [![5_1_xpay_app_apple_wallet_opened_receiver_view.png](https://developer.verestro.com/uploads/images/gallery/2024-12/scaled-1680-/Btt5-1-xpay-app-apple-wallet-opened-receiver-view.png)](https://developer.verestro.com/uploads/images/gallery/2024-12/Btt5-1-xpay-app-apple-wallet-opened-receiver-view.png) [![6_xpay_success_topup_receiver_view.png](https://developer.verestro.com/uploads/images/gallery/2024-12/scaled-1680-/6-xpay-success-topup-receiver-view.png)](https://developer.verestro.com/uploads/images/gallery/2024-12/6-xpay-success-topup-receiver-view.png)
5. Recipient chooses to get money on card from xPay wallet (at this step Verestro Payout to xPay opens xPay wallet).6. Recipient chooses proper card from xPay wallet (at this step xPay wallet returns card token to Verestro Payout to xPay).7. Payout to xPay application tops up Receiver's card (this step takes place in Verestro Payout to xPay application).

**Tip:** After the transaction is completed, a notification will be sent to you informing you of the completion of the transaction and whether it was a success or failure.

# Onboarding This chapter is intended to present you the requirements that will allow you to use the Money Transfer via Card solution in your Company. We have presented here what information is necessary to provide so that you can join the Money Transfer program and so that we can properly create the required corporate balance account for you thus allowing you to funds management and card issuing. ### Business onboarding
**To start using Money Transfers via Card you need to go through a few on-boarding steps:**
1\. Please contact our sales - *salesteam@verestro.com*
2\. Please respond to some introduction question that will let us prepare proposal for you.
3\. You will receive offer for card issuing and payouts processes.
4\. If you accept the offer you will be asked to provide some company documents required for the AML verification process.
5\. You need to perform KYB process to pass verification of your company.
6\. And finally you will enable you your own balance in Verestro Money Transfer program.
### Technical onboarding

**Tip:** Please remember to inform us on which environment you want us to configure an account for you. Verestro xPay Payout offers two environments: `TEST` and `PROD`.

**Important!** Implementation of the solution is work in progress...

# Technical documentation

**Important!** Implementation is work in progress...