---
title: "Creating an authorization request for initiating payment."
method: POST
path: "/v1/payments/{paymentId}/authorize"
tags: ["Payments"]
---

# Creating an authorization request for initiating payment.

`POST /v1/payments/{paymentId}/authorize`

## Request

- Base URL: `https://oas.finshark.io/api.finshark.io`
- URL: `https://oas.finshark.io/api.finshark.io/v1/payments/{paymentId}/authorize`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/finshark/apis/finshark-api/docs/v1/payments/:paymentId/authorize/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `paymentId` string, required

## Headers

- `sessionId` string, uuid
- `authorizationId` string, uuid

## Request body

- PaymentAuthorizationRequest: Request for the payment authorization.
  - `qrCodeRequired` boolean: Set only when selected SCA method is decoupled and if want to generate QR code from the authorization response.
  - `debtor` Debtor: Debtor information.
    - `account` Account, required
      - `accountNumber` string, nullable
      - `bank` string, nullable
      - `country` string, nullable
      - `currencies` Currency[], nullable
        - `code` string, nullable
        - `creditTurnover` number, double, nullable
        - `debitTurnover` number, double, nullable
        - `endBalance` number, double, nullable
        - `startBalance` number, double, nullable
        - `transactions` Transaction[], nullable
          - `amount` number, double, nullable
          - `categoryId` integer
          - `title` string, nullable
          - `date` string, nullable
          - `info` string, nullable
          - `transactionId` string, nullable
          - `partner` string, nullable
      - `holders` AccountHolder[], nullable
        - `name` string, nullable
      - `iban` string, nullable
      - `isJointOwnership` boolean, nullable
      - `isSharedOwnership` boolean, nullable
      - `periodEnd` string, nullable
      - `periodStart` string, nullable
    - `message` string, nullable: Own message to be on the debtor's transaction. Max length 12 characters.
    - `name` string, nullable: Name of the debtor.
  - `redirectUri` string, nullable: Mandatory if chosen PSU_REDIRECT authorization method. Customer will be redirected to this url after payment authorization is completed. Supports only HTTPS.
  - `selectedScaMethod` 'PSU_DECOUPLED' | 'PSU_REDIRECT', required: Strong customer authentication methods.

## Response `200`

The request has been fulfilled and a payment is initiated.

- PaymentStatusResponse: Response on the payment status an authorization request.
  - `id` string, required: Payment identifier.
  - `status` 'CREATED' | 'RECEIVED' | 'CANCELED' | 'FAILED' | 'REJECTED' | 'RECIPIENT_AUTHORIZATION_REQUIRED' | 'AUTHORIZATION_REQUIRED' | 'IN_PROGRESS_CODE' | 'IN_PROGRESS' | 'RECIPIENT_AUTHORIZED' | 'AUTHORIZED' | 'COMPLETED' | 'DELETED', required: Available payment statuses.
  - `psuMessage` string, nullable: Message for the PSU, included if an action needs to be taken by the user during a pending signing.
  - `scaMethods` ScaMethod[], nullable: List of available SCA methods.
    - `href` string, nullable: Redirect link for redirect or decoupled SCA methods.
    - `downloadLink` string, nullable: Download link used to get image that contains dynamic QR code. Supported formats: PNG.
    - `downloadInterval` integer, nullable: Download interval represents the period of changing the content of the downloadLink.
    - `scaMethodType` 'PSU_DECOUPLED' | 'PSU_REDIRECT', required: Strong customer authentication methods.
  - `tppMessages` string[], nullable: Message for the TPP, e.g. if an action needs to be taken by the user during a pending signing or an error message.

## Other responses

- `400`: Error caused by invalid or missing data.
- `401`: Authentication failed due to missing or invalid credentials.
- `403`: Error caused by end user (PSU) not permitted access to the resource.
- `404`: Endpoint does not exist or URL is not constructed correctly.
- `500`: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
- `503`: Returned when service is unavailable due to scheduled reasons, such as maintenance.

---

[API](https://skmtc.dev/finshark/apis/finshark-api.md) - [All operations](https://skmtc.dev/finshark/apis/finshark-api/llms.txt) - [OpenAPI document](https://skmtc.dev/finshark/apis/finshark-api/revisions/7fc3b4f800ae?raw)
