> Documentation index: https://www.xekta.com/llms.txt

# Payment

> The card is held when the order is placed and charged when the buyer collects it. Nothing is paid at the counter.

## When money moves

| Moment | What happens to the card |
| - | - |
| The buyer approves and the order is placed | A **hold** for the total. Not a charge. |
| The shop cancels, or does not answer within 10 minutes | The hold is released. Nothing is charged. |
| The buyer cancels before the shop starts preparing | The hold is released. Nothing is charged. |
| The buyer collects the order and the shop enters the pickup code | XEKTA charges the card automatically. |
| An order is ready and the buyer does not collect it | The full amount may be charged. |

> [!WARNING]
> Never tell the buyer they pay at the counter, at the register or in store. There is nothing to pay there, and the shop does not run their card.

A sentence an assistant can use: "Your card is held now and charged automatically when you pick it up. Nothing to pay at the counter."

## Cards

The buyer saves a card once, on a Stripe page. XEKTA never sees the full number, and an assistant never takes card details in the chat. [`user.payment_method.setup`](https://www.xekta.com/docs/tools/user-payment-method-setup.md) says whether a card is on file and returns the link to add or replace one.

## What the buyer pays

The cart shows items, tax and the total before approval, and for shops that ship, the shipping fee. The amount the buyer approves is the amount held.

When a shop can fill only part of an order, nothing is charged for what the buyer did not get. See [Missing items](https://www.xekta.com/docs/missing-items.md).

## Sales tax

XEKTA never estimates tax. When the tax for a cart cannot be worked out, approval and checkout refuse with a tax error instead of guessing. See [Errors](https://www.xekta.com/docs/errors#sales-tax).

## When a payment fails

| Code | Meaning | What to do |
| - | - | - |
| `CHECKOUT_AUTHORIZATION_FAILED` | No card on file, or the card was declined. | Call `user.payment_method.setup`, let the buyer fix the card, then try again. |
| `PAYMENT_RAIL_UNAVAILABLE` | The payment provider could not be reached. | Changing the card does not help. Try again shortly. |

## Refunds

Within 24 hours after pickup the buyer can request a refund from the order's page in their account; the shop decides. See [Cancel, refunds and problems](https://www.xekta.com/docs/cancel-and-problems.md).
