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

# Payment Lifecycle

> Understand each stage of a Grain payment from initiation to settlement

## Payment Flow

Every Grain payment moves through a defined set of stages — from checkout to final settlement. Understanding this flow helps you build better integrations and set clear expectations for your customers.

<Steps>
  ### Customer Initiates Payment

  The customer interacts with your payment module and selects **Pay with Crypto**. Grain's API generates a prefilled payment link containing the destination address, token, and amount. The customer is prompted to review, agree, and sign the transaction.

  If the customer does not agree or sign, the transaction is marked as **rejected** and the payment is **cancelled**.

  Once the customer signs the transaction, it undergoes Grain's automated compliance screening. After screening passes, the funds are delivered to a **one-time storage wallet** generated by Grain. The payment enters a settlement hold period while awaiting final settlement.

  If a refund is requested during this period, the refund process begins (see [Refund Flow](#refund-flow) below). If no refund is requested and the settlement period has passed, the transaction is **captured**.

  Once a transaction has been **captured**, your merchant account balance is **credited** and funds are ready to be **disbursed** based on your elected settlement method.
</Steps>

***

## Refund Flow

Refunds can be initiated by either the customer or the merchant, following the merchant's refund policy. Here is how the refund process works:

<Steps>
  ### Refund Requested

  A refund is initiated by the user or merchant according to the merchant's refund policy. The request appears in your Grain Dashboard for review.

  ### Merchant Review

  You review the refund request on your Dashboard. You can approve or deny the request based on your refund policy and the details of the transaction.

  ### Refund Decision

  If approved, funds are sent back to the customer's **original payment address** from the generated one-time payment address.

  If denied, the refund request is rejected and the held funds are deposited to your **merchant account balance**.
</Steps>
