diff --git a/DESCRIPTION.md b/DESCRIPTION.md index 572bec6..d7502f1 100644 --- a/DESCRIPTION.md +++ b/DESCRIPTION.md @@ -1189,3 +1189,58 @@ To decide how you are going to make your tab visible, pass a visibility object i Setting `cash_register_qr_code` to true will connect this tab to the QR code from the cash register. If this cash register does not have a QR code yet, one will be created. Only one Tab can be connected to the cash register’s QR code at any given time. Setting `tab_qr_code` to true will create a QR code specifically for this tab. This QR code can not be linked to anything else. + +# Quickstart: Create a TransferWise payment + +## Before you start + +Make sure that you have opened a session and that for any call you make after that, you pass the session’s token in the `X-Bunq-Client-Authentication` header. + +ℹ️ *bunq relies on TransferWise for international, so you need to create a TransferWise account linked to a bunq account to be able to create international transfers. You can do it either from the bunq app or using our API as described below.* + +## Create a TransferWise account + +You need a TransferWise account linked to your bunq account to make TransferWise payments via the bunq API. Create one via `POST /user/{userID}/transferwise-user`, and save its ID. + +ℹ️ *You cannot use an existing TransferWise account.* + +## Create a quote + +1. Create a quote via POST /user/{userID}/transferwise-quote and save its ID. + +ℹ️ *Use amount_target to indicate the sum the recipient must get. Amount_source, on the other hand, will indicate the sum you want to send, but it will not necessarily be the final sum the recipient gets.* + +ℹ️ *Quotes are valid for 30 minutes so if you do not manage to create a transfer within this time, you will need to create another quote.* + +2. Get the exchange rate by reading the quote via GET /user/{userID}/transferwise-quote/(transferwise-quoteID). + +## Create a recipient + +If you have sent money via the TransferWise account linked to your bunq account, you can reuse the recipients. You can list their IDs via `GET /user/{userID}/transferwise-quote/{transferwise-quoteID}/transferwise-recipient`. + +To create a new, previously unused recipient, follow these steps: +1. Retrieve the fields required for creating the recipient as the requirements vary for the type of recipient in each country. Iterate sending the following request pair till there are no more required fields: +- `GET /user/{userID}/transferwise-quote/{transferwise-quoteID}/transferwise-recipient-requirement` +- `POST /user/{userID}/transferwise-quote/{transferwise-quoteID}/transferwise-recipient-requirement` +2. Create a recipient account using the final request body from the previous step with `POST /user/{userID}/transferwise-quote/{transferwise-quoteID}/transferwise-recipient-requirement` + +## Create a transfer + +Finally, having both the quote ID and the recipient ID, you can create a transfer. 🎉 + +1. Check if there are any additional transfer requirements via `POST /user/{userID}/transferwise-quote/{transferwise-quoteID}/transferwise-transfer-requirement`. +2. Create a transfer via `POST /user/{userID}/monetary-account/{monetary-accountID}/transferwise-quote/{transferwise-quoteID}/transferwise-transfer`. You need to specify the ID of the monetary account from which you want the payment to be made. diff --git a/src/plugins/BunqLayoutPlugin/components/Sidebar/Sidebar.js b/src/plugins/BunqLayoutPlugin/components/Sidebar/Sidebar.js index 19d147e..a5ff1fd 100644 --- a/src/plugins/BunqLayoutPlugin/components/Sidebar/Sidebar.js +++ b/src/plugins/BunqLayoutPlugin/components/Sidebar/Sidebar.js @@ -72,8 +72,8 @@ class Sidebar extends React.Component { name: "Quickstart: Create a Tab payment" }, { - destination: "quickstart-create-a-tab-payment", - name: "Quickstart: Create a Tab payment" + destination: "quickstart-transwerwise-payment", + name: "Quickstart: Create a TransferWise payment" } ];