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

# Cards

> Auth flow for card transactions.

## Authorization

During the payment capture process, additional authentication steps may be required due to the specific card involved. These may include OTP validation, PIN validation, or even 3DS (3D Secure).

```http theme={null}
POST /payment-sessions/{payment_id}/authorize
```

```json theme={null}
// otp authorize

{
    "otp": "123456" //5 or 6 digit string
}

// pin authorize

{
    "pin": "1234" //4 digit string
}

// card_enroll & 3ds

{
    "card_enroll": "" //string
}

// Cvv

{

    "cvv": "123" //string

}
```

**Sample Response**

```json theme={null}
{
    "data": {
        "url": "",
        "status": "captured|failed",
        "message": "",
        "payment": {
            "id": ,
            "currency": ,
            "amount": ,
            "description": ,
            "payment_method": {
                "card_number": "",
                "expiry_month": ,
                "expiry_year": ,
                "id": "",
                "type": "card"
            },
            "status": "pending",
            "date": ,
            "mode": ,
            "customer": {
                "first_name": ,
                "last_name": ,
                "email": ,
                "billing_address": {
                    "line1": ,
                    "line2": ,
                    "city": ,
                    "state": ,
                    "zip_code": ,
                    "country": ,
                }
            },
            "reference": ,
            "metadata": {}
        }
    }
}
```
