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

# Payment Request Types

> TypeScript types for payment creation, processing, and status.

## PaymentRequest

Returned by `readSignedInvoice` and `useNFCMerchant.createPaymentRequest`. Represents a verified payment invoice.

```ts theme={null}
interface PaymentRequest {
  paymentId: string;
  amount: string;          // USDC decimal string, e.g. "25.00"
  merchantWallet: string;  // Merchant's on-chain wallet address
  transactionId: string;   // Alias for paymentId (backwards compatibility)
  currency: 'USDC';
  network: 'base';
  timestamp: number;       // Unix timestamp in ms
  expiresAt?: number;      // Unix timestamp in ms
}
```

***

## CreatePaymentRequest

Passed to the payment creation API:

```ts theme={null}
interface CreatePaymentRequest {
  amount: string;      // USDC decimal string
  merchantId: string;
}
```

***

## CreatePaymentResponse

Returned by the payment creation API:

```ts theme={null}
interface CreatePaymentResponse {
  paymentId: string;
  merchantWallet: string;
  expiresAt: number;  // Unix timestamp in ms
}
```

***

## ProcessPaymentRequest

Passed to the payment processing API:

```ts theme={null}
interface ProcessPaymentRequest {
  paymentId: string;
  txHash?: string;
  customerWallet?: string;
}
```

***

## ProcessPaymentResponse

Returned by the payment processing API:

```ts theme={null}
interface ProcessPaymentResponse {
  transactionId?: string;
  status: PaymentStatus;
  confirmedAt?: number;  // Unix timestamp in ms
}
```

***

## PaymentStatusResponse

Returned by payment status polling:

```ts theme={null}
interface PaymentStatusResponse {
  status: PaymentStatus;
  txHash?: string;
  confirmedAt?: number;
  error?: string;
}
```

***

## PayFromPoolRequest / Response

Used internally by POOL mode:

```ts theme={null}
interface PayFromPoolRequest {
  payment_id: string;
  customer_id: string;
  amount: string;
}

interface PayFromPoolResponse {
  success: boolean;
  transactionId?: string;
  status: PaymentStatus;
  error?: string;
}
```
