# Pay by transfer (/merchants/pay-by-transfer)

Pay by transfer lets a customer pay without connecting a wallet. The checkout page gives them an amount and a Solana
address, and they send USDC there from an exchange or from any wallet. When the full amount arrives, the order is paid,
as with any crypto payment. You do not need to turn anything on.

## When the checkout offers it [#when-the-checkout-offers-it]

The checkout page shows a third way to pay, **Transfer** ("From an exchange or a wallet that can’t connect", with a
"New" tag), below **Crypto wallet** and, when you take cards, **Card**. It is offered when all of these are true:

* The checkout is a one-time payment. A subscription never offers it.
* The checkout takes crypto. A checkout session your code creates with `payment_methods: ["card"]` does not.
* The checkout is open, and your account can take payments.
* Fianto can pay the Solana network costs of the transfer at that moment. When it cannot, the page leaves Transfer out
  and the other ways to pay stay.
* At least 20 minutes are left before the checkout session's 24-hour limit.

It works for every kind of one-time checkout: one your code creates, a shop purchase, a payment link and an invoice's
**Pay** page.

## What your customer does [#what-your-customer-does]

1. On the checkout page they choose **Transfer**. The page reads "Pay by transfer" and lists three steps: "We open a
   one-time Solana address for this payment.", "You send" the total "USDC on Solana from an exchange or any wallet." and
   "This page updates by itself when it arrives."
2. They type their email if the page asks for it, then press **Get transfer details**. The email is optional, except
   for a shop purchase and on a payment link that requires one: then the page says "Enter your email to continue." until
   they type it.
3. The page shows "Send exactly" and the total in USDC, "Network" Solana, "Token" USDC, and "Send to this address" with
   the address and a QR code of it. Each has a copy button. The page warns: "Send only USDC on the Solana network.
   Anything sent on another network, or another token, can't be recovered." **Paying from an exchange?** opens tips,
   such as choosing the Solana network when withdrawing and adding the exchange's fee so that the full total arrives.
4. They send the USDC within the time window. The window is 60 minutes, shorter only when the checkout is close to its
   24-hour limit. The page counts down the time left and says "You can close this page. Reopen this link any time to see
   the status."
5. If only part arrives, the page shows "Received so far" and "Send" the rest "more to the same address.", with a copy
   button for the rest. From the first part on, the other ways to pay are locked: "A transfer is on its way. Finish it
   here."
6. When the total has arrived, the page says "Transfer received. Confirming on Solana…", then shows the usual receipt,
   "Payment received".

There is one address per checkout. If nothing arrives, the checkout ends about 5 minutes after the window does, and the
page says "This payment request expired". To pay, the customer starts a new checkout.

## Where the money goes [#where-the-money-goes]

The customer sends the USDC to a one-time Solana address that Fianto makes for this checkout. Fianto then forwards it
from that address. When the total arrived in the window, the price goes to your receiving wallet and the Fianto fee and
the network fee go to Fianto, as in a wallet payment. Fianto pays the Solana network fees of these forwards. Money that
did not pay the order (see below) is forwarded to your receiving wallet in full, with no fee, and becomes a refund item.

## What can happen [#what-can-happen]

| What happened                                | What your customer sees                                                                                            | What you get                                                                          |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| The total arrived in the window              | The receipt, "Payment received"                                                                                    | The payment, as for a wallet payment                                                  |
| More than the total arrived                  | Under the receipt: "You sent" the extra "USDC more than the total. It went to" you, "contact them to get it back." | The payment, and an "Overpaid" refund item for the extra                              |
| The window ended before the total arrived    | What arrived "was sent to" you, "The order was not paid.", "To get it back, contact" you                           | What arrived, as a "Short" refund item. The order stays unpaid                        |
| Money arrived after the window ended         | Nothing new                                                                                                        | A "Late" refund item                                                                  |
| The order was also paid another way          | Under that receipt: "You also sent" the amount "USDC by transfer. It went to" you, "not to this order"             | A "Duplicate" refund item                                                             |
| SOL was sent to the address                  | Nothing new                                                                                                        | A "SOL sent" refund item, counted in SOL                                              |
| The sending wallet is one Fianto has blocked | "Your transfer window has ended. Checking what arrived…"                                                           | Nothing until Fianto's staff release it. If they keep it held, the order stays unpaid |

Fianto keeps watching the address for 90 days after the window ends: hourly for the first 7 days, then daily. Money that
arrives in that time is forwarded to you as a "Late" refund item. After 90 days nothing watches it.

When your support email is set, the customer's page offers a button to write to you. Set it in **Settings** →
"Checkout" → "Support email".

> **You refund the customer yourself:**
>
> A refund item's money is yours to send back, as a crypto transfer: Fianto does not return it. Send it from your own
> wallet, then mark the item refunded. The item does not name the wallet the money came from, and the customer may have
> sent it from an exchange: ask them where to send it, using the email on the item or the one they write from.

## Settle a refund item [#settle-a-refund-item]

**Step 1.**

### Open Transfer refunds [#open-transfer-refunds]

In the sidebar, open **Payments**, then the **Transfer refunds** tab. The page reads "Money from a transfer that
reached you but is owed back to the customer. Send it back from your wallet, then mark it refunded." When items are
waiting, Overview's attention strip says how many ("1 transfer refund to make"), and **Open Transfer refunds** on
**Needs attention** opens the list filtered to "To refund".

**Step 2.**

### Read the item [#read-the-item]

The chips filter by status: "All", "To refund" and "Refunded". Each row shows the **Amount**, the **Status**, the
**Reason** ("Overpaid", "Short", "Late", "Duplicate" or "SOL sent"), the **Checkout** it came from, the **Customer**'s
email when they gave one, and when it was **Created**.

**Step 3.**

### Send the money back, then mark it refunded [#send-the-money-back-then-mark-it-refunded]

Send the amount back from your wallet. Then click **Mark refunded** on the row. The dialog asks "Mark this refund as
sent?" and says "Do this once you have sent the money back to the customer yourself. Fianto does not send it." Confirm
with **Mark refunded**. There is no undo. The row then shows "Refunded" and the date in the **Action** column.

Marking a refund needs a role that can move money: Owner, Admin or Finance. A Viewer sees the list without the
**Action** column.

## In your dashboard [#in-your-dashboard]

* **Payments.** A payment made by transfer reads "Crypto · Transfer" on its page, and in the list's Method column when
  that column shows. Its transaction is Fianto's forward from the one-time address, not a transfer from the customer's
  wallet.
* **Customers.** A customer who gave an email appears under that email. A customer who gave none has no customer
  record.
* **Invoices.** An invoice paid by transfer reads "Paid by transfer" where a payer wallet would be. Its refund tools
  refuse: "This payment was made by transfer. Refund the payer directly."

## For developers [#for-developers]

A payment by transfer is an ordinary crypto payment in the v1 API:

* `gateway` is `solana` and `method` is `crypto`, with the forward's `signature`.
* `customer.wallet` is `null`. `customer.id` is set only when the payer gave an email.
* You get `checkout.session.completed` and `order.paid` as for a wallet payment.
* Each refund item sends one [`transfer.refund_due`](/developers/webhooks/events#transfers) event to the application the
  checkout session belongs to. It carries `refund_item` (`id`, `kind`, `amount`, `created_at`), `checkout_session_id`,
  your `order_id` and, only when the payer gave one, `payer_email`. A `sol` item's `amount` is in lamports, any other
  in USDC base units. An item held for screening sends nothing until it is released.
* In the SDK, `onTransferRefundDue` is the typed callback from `@fianto/sdk` 0.8.0. With an older version the event
  still reaches `onEvent`.

```ts
import { createWebhookHandler } from '@fianto/sdk/handlers';

export const POST = createWebhookHandler({
  async onTransferRefundDue(event) {
    const { refund_item, order_id, payer_email } = event.data;
    // Record refund_item.id once, then tell your team who to pay back and how much.
    console.log(order_id, refund_item.kind, refund_item.amount, payer_email ?? 'no email');
  },
});
```

The v1 API has no refund endpoint: you send the money and mark the item in the dashboard.

## Test mode [#test-mode]

Pay by transfer works in Test mode, on Solana devnet. The customer sends devnet test USDC to the address the page shows,
and the **Transfer refunds** tab lists the test items.

## Troubleshooting [#troubleshooting]

| You see | Why | Fix |
|---|---|---|
| The checkout shows no **Transfer** | The checkout is a subscription, takes cards only, is close to its 24-hour limit, or Fianto cannot pay the network costs right now. | Check the list in [When the checkout offers it](#when-the-checkout-offers-it). The other ways to pay still work. |
| "Transfer is not available right now. Choose another way to pay." | Fianto could not open the address for this checkout. | The customer pays with **Crypto wallet** or **Card** on the same page. |
| "Too many tries. Wait a minute, then press Get transfer details again." | Too many tries in a short time. | Wait a minute, then press **Get transfer details** again. |
| A "Short" refund item and an unpaid order | The window ended before the full total arrived, often because an exchange took its fee from the amount. | Send the amount back and mark it refunded. To buy, the customer pays again on a new checkout. |
| No **Mark refunded** button | Your role cannot move money. | Ask an Owner, Admin or Finance member to mark it. |

## See also [#see-also]

- [Orders and payments](/merchants/orders-and-payments): Where payments and checkouts appear.

- [Event types](/developers/webhooks/events#transfers): The transfer.refund_due payload in full.

- [Paying with Fianto](/payers/paying-with-fianto#paying-by-transfer): What your customer sees on the checkout page.