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

# Card API

> Accept card payments from all major card processors including Visa, MasterCard, American Express and UnionPay

## Prerequisites

1. **API Keys** -
   [Generate API Keys](/application/embedded-application-setup) for Hosted Checkout integration

2. **Authorization Token** -
   Use **API Keys** to [Generate Authorization Token](/api-reference/authorization/generate-token)

## How It Works

**Step 1** - Validate Card Payment details

<Card title="Preview Card Payment" icon="brackets-curly" href="/api-reference/collection/card-payment/preview-card-payment" horizontal>
  This endpoint validates payment details like **Amount**, **Order Reference** and
  verifies **Method** availability
</Card>

**Step 2** - Initiate card payment

<Card title="Initiate Card Payment" icon="brackets-curly" href="/api-reference/collection/card-payment/initiate-card-payment" horizontal>
  This endpoint initiate a card payment and returns a link of session for hosted mastercard checkout widget.
</Card>

**Step 3** - Open the hosted link in a new tab or window to prompt user to enter their card information and the complete payment.

<Note>
  We do not collect or store customer card information
</Note>

**Step 4** - Check payment status

<Card title="Check Payment Status" icon="brackets-curly" href="/api-reference/collection/card-payment/querying-for-payments" horizontal>
  This endpoint queries for the payment status using payment's **Order
  Reference**
</Card>
