## Payment Request Schema

### Parameters
- **amount**: (integer, required) Must be ≥ 1
- **external_bank_account_token**: (uuid, required)
- **financial_account_token**: (uuid, required)
- **memo**: (string, length ≤ 512) Must match `^[0-9A-Za-z \x20-\x7e\x40-\xff]*$`
- **method**: (string, required, enum)
  - Allowed: `ACH_NEXT_DAY`, `ACH_SAME_DAY`
- **method_attributes**: (object, required)  
  - **token**: (uuid) Customer-provided token that will serve as an idempotency token.
  - **type**: (string, required, enum) Allowed: `COLLECTION`, `PAYMENT`
- **user_defined_id**: (string, length ≤ 512)
- **hold**: (object, optional) Hold details when this payment is initiated.

### Base Transaction Schema

### Response Codes
- **202**: Created
- **400**: Invalid parameter in the query.
- **401**: User has not been authenticated.
- **404**: Resource not found.
- **429**: Exceeded allowed requests.

### Transaction Fields
- **status**: (string, required, enum) Possible values: `PENDING`, `SETTLED`, `DECLINED`, `REVERSED`, `CANCELED`, `RETURNED`
- **token**: (uuid, required) Unique identifier for the transaction
- **created**: (date-time, required) ISO 8601 timestamp
- **updated**: (date-time, required) Last update timestamp
- **family**: (const, enum, required) Allowed: `PAYMENT`
- **category**: (string, required, enum)  
  - Possible categories include: `ACH`, `WIRE`, `BALANCE_OR_FUNDING`, `FEE`, `REWARD` etc.
- **currency**: (string) Currency in ISO 4217 format
- **result**: (string, required, enum) Allowed: `APPROVED`, `DECLINED`

### Method-Specific Attributes
**AchMethodAttributes**:  
- **financial_account_token**: (uuid, required)
- **external_bank_account_token**: (uuid|null) 
- **direction**: (string, required, enum) `CREDIT`, `DEBIT`
- **source**: (string, required, enum) `LITHIC`, `EXTERNAL`, `CUSTOMER`
- **method**: (string, required, enum) `ACH_NEXT_DAY`, `ACH_SAME_DAY`, `WIRE`
- **settled_amount**: (integer, required)
- **pending_amount**: (integer, required)

### Events Array
- **events**: (array of objects, required) List of transaction events, each containing fields such as:
  - **amount**: (integer, required)
  - **created**: (date-time, required)
  - **detailed_results**: (array of strings)
  - **result**: (string, required, enum)
  - **token**: (uuid, required)
  - **type**: (string, required)

### Example Request in CURL
```
curl --request POST \
     --url https://sandbox.lithic.com/v1/payments \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "amount": 0,
  "external_bank_account_token": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "financial_account_token": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "memo": "string",
  "method": "ACH_NEXT_DAY",
  "method_attributes": {
    "sec_code": "CCD",
    "ach_hold_period": 0,
    "addenda": "string",
    "override_company_name": "string"
  },
  "token": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "type": "COLLECTION",
  "user_defined_id": "string",
  "hold": {
    "token": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}'
```

### Response Example
```
{
  "status": "PENDING",
  "token": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "created": "2026-07-18T00:25:39.083Z",
  "updated": "2026-07-18T00:25:39.083Z"
}
```
