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

# Authorizing a Card

> Create a hosted card authorization flow for a payer.

Use `POST /Payment/Card/Auth` to authorize a card for a payer. The response provides a URL for continuing the hosted card flow.

## Prerequisites

* Obtain an access token from `/auth/token` using your `ClientId` and `ClientSecret`.
* Retrieve the target `LocationId` from the [company locations](/synchpay/company-locations) endpoint.

## Endpoint

* **URL**: `https://api.synchpay.com/Payment/Card/Auth`
* **Method**: `POST`
* **Authorization**: `Bearer <AccessToken>`

## Request Body

| Parameter        | Type    | Description                                                                   | Required |
| ---------------- | ------- | ----------------------------------------------------------------------------- | -------- |
| `LocationId`     | string  | UUID of the company location associated with the authorization.               | Yes      |
| `Amount`         | integer | Amount in cents, when the authorization is associated with a specific amount. | No       |
| `RegistrationId` | string  | Existing SynchPay user registration UUID.                                     | No       |
| `ContactNumber`  | string  | Payer phone number, when a registration ID is not supplied.                   | No       |
| `ReturnUrl`      | string  | URL to which SynchPay redirects the payer after the hosted flow.              | No       |

```json theme={null}
{
  "LocationId": "4d8ab11b-0322-4bf9-921f-39d753b0530c",
  "Amount": 5000,
  "RegistrationId": "6e8d9257-bd5f-45cf-8f29-6d0ae8a6d991",
  "ReturnUrl": "https://example.com/card/complete"
}
```

## Response

| Field                  | Type   | Description                                                             |
| ---------------------- | ------ | ----------------------------------------------------------------------- |
| `PaymentRequestId`     | string | UUID of the payment request created for the authorization.              |
| `Url`                  | string | Hosted URL for continuing the card authorization flow.                  |
| `RegistrationPersonId` | string | Registered person UUID created or resolved for the payer, when present. |

```json theme={null}
{
  "PaymentRequestId": "ce0e3549-a83e-4cf6-bb5c-1d50a21d8af7",
  "Url": "https://app.synchpay.com/card/authorize/ce0e3549-a83e-4cf6-bb5c-1d50a21d8af7",
  "RegistrationPersonId": "27420540-dbbf-44be-b773-2014851787b7"
}
```

<Note>
  This endpoint starts a SynchPay card authorization flow. To record a card transaction processed by an external terminal or provider, use [register external card payment](/synchpay/card-payment).
</Note>
