> ## 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.

# Authorize a card

> Authorizes a card for a given user.



## OpenAPI

````yaml /swagger.json post /Payment/Card/Auth
openapi: 3.0.4
info:
  title: SynchPay API
  version: v1
servers:
  - url: https://api.trysynch.com
    description: Sandbox
  - url: https://api.synchpay.com
    description: Production
security:
  - Bearer: []
paths:
  /Payment/Card/Auth:
    post:
      tags:
        - Payment
      summary: Authorize a card
      description: Authorizes a card for a given user.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizeCardRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/AuthorizeCardRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AuthorizeCardRequest'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/AuthorizeCardResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizeCardResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/AuthorizeCardResponse'
components:
  schemas:
    AuthorizeCardRequest:
      type: object
      properties:
        locationId:
          type: string
          format: uuid
        amount:
          type: integer
          format: int32
          nullable: true
        registrationId:
          type: string
          format: uuid
          nullable: true
        contactNumber:
          type: string
          nullable: true
        returnUrl:
          type: string
          nullable: true
      additionalProperties: false
    AuthorizeCardResponse:
      type: object
      properties:
        paymentRequestId:
          type: string
          format: uuid
        url:
          type: string
        registrationPersonId:
          type: string
          format: uuid
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: http
      description: "JWT Authorization header using the Bearer scheme. \r\n                        Use `/auth/token` to obtain access token. \r\n                        Enter 'Bearer' [space] and then your token in the text input below. \r\n                        Example: 'Bearer eyJhbGci...'"
      scheme: bearer
      bearerFormat: JWT

````