Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

# <span id="topic-quickstart-transwerwise-payment">Quickstart: Create a TransferWise payment</span>

## <span id="topic-quickstart-transwerwise-payment>Goal </span>

You want to send a payment in currency other than euro outside the SEPA zone.

## <span id="topic-quickstart-transwerwise-payment>Before you start </span>

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.*

## <span id="topic-quickstart-transwerwise-payment>Get the up-to-date exchange rate (optional)</span>

You might want to check the latest currency exchange rate before making a transfer. Here’s how you can do it using the bunq API:
1. Check the list of supported currencies via `GET /user/{userID}/transferwise-currency`. Copy the needed currency code.
2. Create a temporary quote for the currency of your choice via `POST /user/{userID}/transferwise-quote-temporary`.

ℹ️ *A quote is the exchange rate at the exact timestamp. Temporary quotes carry solely informative value and cannot be used for creating a transfer.*

3. Read the temporary quote via `GET /user/{userID}/transferwise-quote-temporary/{transferwise-quote-temporaryID}`.

## <span id="topic-quickstart-transwerwise-payment">Create a TransferWise account</span>

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.*

## <span id="topic-quickstart-transwerwise-payment">Create a quote</span>

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).

## <span id="topic-quickstart-transwerwise-payment">Create a recipient</span>

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`

## <span id="topic-quickstart-transwerwise-payment">Create a transfer</span>

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.
4 changes: 2 additions & 2 deletions src/plugins/BunqLayoutPlugin/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
];

Expand Down