> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vitawallet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Payins

> Generate shareable payment links to collect funds from your customers in local currency.

![Payins — Vita Wallet Business API](https://mintcdn.com/vitawallet-c171bb38/x9QnExFZXGtdGNf4/api-reference/_assets/payins-hero.svg?fit=max\&auto=format\&n=x9QnExFZXGtdGNf4\&q=85\&s=04629427e15d23b520c51a3737ee47f8)

The **Payins** feature lets your business generate shareable payment links to collect funds from customers — for products, services, subscriptions, or one-off invoices. Each link can be customized with amount, currency, country, and description, giving customers a direct, hosted checkout.

## Core resources

Payins operates on two linked resources:

> [card] Payment Order
>
> A payment request created to collect funds from a customer. It represents the full payment lifecycle and can contain one or more attempts.
>
> * Unique identifier (`public_code` or `issue`)
> * Expiration date
> * Final status reflecting the overall outcome
>
> Once created, a Payment Order **cannot be cancelled** by the client — it can only expire by business rule or time limit, or be cancelled internally by Vita.

> [card] Payment Order Attempt
>
> A specific trial by the user to fulfill a Payment Order. Each checkout session (declined card, closed browser, insufficient funds, etc.) is logged as a separate attempt.
>
> * Multiple attempts per order
> * Granular history of each try
> * Fine-grained webhook events

## Relationship

A single `PaymentOrder` can contain **N** `PaymentOrderAttempts`.

> [!NOTE]
>
> Receiving a `payment_order_attempt.cancelled` webhook does **not** mean the payment link is cancelled — it only means that specific attempt failed. The user can start a new attempt that may eventually move the parent `PaymentOrder` to `paid`.

```mermaid theme={null}
flowchart LR
  PO["Payment Order<br/>(public_code / issue)"]
  A1["Attempt #1<br/>cancelled"]
  A2["Attempt #2<br/>cancelled"]
  A3["Attempt #3<br/>paid ✓"]
  PO --> A1
  PO --> A2
  PO --> A3
  A3 -. moves parent to .-> PAID["Payment Order<br/>paid"]
```

## Available flows

> [card] [Create Payin (hosted)](https://docs.vitawallet.io/api-reference/create-payin/create-payin.md)
>
> Create a shareable payment link. The customer completes checkout on a Vita-hosted page and is redirected back to your URLs on success, cancel, error, or pending.

> [card] [Direct Payment](https://docs.vitawallet.io/api-reference/direct-payment/overview.md)
>
> Collect payment data from your UI and submit it directly to Vita — no redirection. Useful for apps that want to render their own checkout.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.