# Payment instructions (manual bank transfer)

Get the details your customer needs to pay a checkout by bank transfer and show them in your own UI, such as an invoice, a thank-you page or a PDF.

Each call returns one set of instructions: recipient name, IBAN, local account number (CZ/SK), variable symbol, amount, currency and a QR code in the standard used in the country of the checkout currency. The customer doesn't have to choose anything. No e-mail is sent.

## Before you begin

- Bank transfer must be enabled for your account in the checkout currency; otherwise the endpoint returns `409`. Ask Payout support to enable it.
- An API key and a Bearer token, as in [Simple payment](https://developers.payout.tech/guides/payment-gateway-use-cases-simple-payment.html#step-1), steps 1 and 2.

## Steps

1. **Create the checkout**

   Create the checkout as in [Simple payment](https://developers.payout.tech/guides/payment-gateway-use-cases-simple-payment.html#step-3) and keep the `id` from the response.

2. **Get the payment instructions**

   Send a `GET` request with the checkout `id` in the path. It needs only the `Authorization` header with the Bearer token.

   ```bash
   curl --location --request GET 'https://sandbox.payout.one/api/v1/checkouts/141447/payment_instructions' \
   --header 'Accept: application/json' \
   --header 'Authorization: Bearer SFMyNTY.EXAMPLE-TOKEN.dGhpcy1pcy1hLWZha2Utc2lnbmF0dXJlLWV4YW1wbGU'
   ```

3. **Show the instructions to the customer**

   Response for the 3.00 EUR checkout from Simple payment:

   ```json
   {
       "recipient_name": "Payout a.s.",
       "iban": "SK3112000000198742637541",
       "account_number": "000019-8742637541/1200",
       "variable_symbol": "1000123411",
       "amount": "3.0000",
       "currency": "EUR",
       "qr_code": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAHBCAYAAACBh..."
   }
   ```

   > [!NOTE]
   > Unlike the rest of the API, `amount` here is not in cents. It is a decimal string in whole currency units: `"3.0000"` is 3.00 EUR.

   | Field | Description |
   | --- | --- |
   | `recipient_name` | Name of the beneficiary the customer sends the money to. |
   | `iban` | Beneficiary IBAN in international format. |
   | `account_number` | Beneficiary account in local format (`prefix-account/bank_code`). Filled for Czech (CZ) and Slovak (SK) IBANs, `null` for other countries. |
   | `variable_symbol` | Variable symbol the customer must include in the transfer. It links the incoming payment to the checkout. |
   | `amount` | Amount to transfer, as a decimal string in whole currency units. |
   | `currency` | Currency code by ISO 4217. |
   | `qr_code` | Base64-encoded PNG of the payment QR code. Show it with `<img src="data:image/png;base64,${qr_code}" />`. |

   The QR code is cached, so repeated calls for the same checkout return the same image and are safe to retry.

4. **Wait for the webhook**

   When the transfer arrives and is matched to the checkout, Payout sends `checkout.succeeded`. Handle it as in [Simple payment](https://developers.payout.tech/guides/payment-gateway-use-cases-simple-payment.html#step-7), steps 7 to 9.

## Error responses

| HTTP | Error | Cause |
| --- | --- | --- |
| `401` | `Unauthorized access. Check your token.` | Missing or invalid Bearer token. |
| `403` | `Forbidden` | The checkout belongs to another account. |
| `404` | `Not Found` | No checkout with this `id` exists. |
| `409` | `Bank transfer not enabled for this account.` | Your account has no active bank transfer payment method for the checkout currency. Ask support to enable it. |
| `410` | `Checkout has expired.` | The checkout's `will_expire_at` has passed. Create a new checkout. |
| `422` | `No bank account available for this currency.` | No beneficiary bank account is available for the checkout currency. Contact Payout support. |
| `500` | `Failed to generate QR code.` | The QR code generator failed, for example during a Pay by Square API outage. Retry; the request is safe to repeat. |
