Paytrail payment reports API

Request a payment report

GitHub OpenAPI

Operations 2

POST /payments/report Request a payment report #
POST /settlements/{settlementId}/payments/report Request a report of payments contained in a given settlement #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/paytrail:paytrail-payment-reports-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

paytrail-payment-reports-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.0.0
  title: payment reports API
  description: Paytrail Payment API
  contact:
    name: Paytrail
    url: https://github.com/paytrail/api-documentation/issues
servers:
- url: https://services.paytrail.com
tags:
- name: payment reports
  description: Request a payment report
paths:
  /payments/report:
    post:
      tags:
      - payment reports
      summary: Request a payment report
      description: Request a report of payments to be sent to the given callback url. Callback schema defined in PaymentReportCallbackJSON.
      operationId: requestPaymentReport
      parameters:
      - name: checkout-account
        in: header
        description: Merchant ID
        example: 375917
        schema:
          type: integer
          format: int32
      - name: checkout-algorithm
        in: header
        description: HMAC algorithm
        example: sha512
        schema:
          type: string
          enum:
          - sha256
          - sha512
      - name: checkout-method
        in: header
        description: HTTP method of the request
        example: POST
        schema:
          type: string
          enum:
          - GET
          - POST
      - name: checkout-timestamp
        in: header
        description: Current timestamp in ISO 8601 format
        example: '2018-08-08T10:10:59Z'
        schema:
          type: string
          format: date-time
      - name: signature
        in: header
        description: HMAC signature calculated over the request headers and payload
        schema:
          type: string
      requestBody:
        description: Payment body payload
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentReportRequest'
      responses:
        '200':
          description: Payment report request response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentReportRequestResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/Error'
      callbacks:
        reportReady:
          '{$request.body#/callbackUrl}':
            post:
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/PaymentReportCallbackJSON'
                  application/csv:
                    schema:
                      description: The report as a CSV file
                      type: string
              responses:
                '200':
                  description: Your server returns this code if it can accept the callback
                default:
                  description: Your server can not handle callback - will result in re-sending of the report to the given callback url.
  /settlements/{settlementId}/payments/report:
    post:
      tags:
      - payment reports
      summary: Request a report of payments contained in a given settlement
      description: Request a report of payments contained in a given settlement to be sent to the given callback url. Callback schema defined in PaymentReportCallbackJSON.
      operationId: requestPaymentReportBySettlementId
      parameters:
      - name: settlementId
        in: path
        description: Settlement ID
        required: true
        schema:
          type: string
          example: '2397548234'
      - name: checkout-account
        in: header
        description: Merchant ID
        example: 375917
        schema:
          type: integer
          format: int32
      - name: checkout-algorithm
        in: header
        description: HMAC algorithm
        example: sha512
        schema:
          type: string
          enum:
          - sha256
          - sha512
      - name: checkout-method
        in: header
        description: HTTP method of the request
        example: POST
        schema:
          type: string
          enum:
          - GET
          - POST
      - name: checkout-timestamp
        in: header
        description: Current timestamp in ISO 8601 format
        example: '2018-08-08T10:10:59Z'
        schema:
          type: string
          format: date-time
      - name: signature
        in: header
        description: HMAC signature calculated over the request headers and payload
        schema:
          type: string
      requestBody:
        description: Payment body payload
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentReportBySettlementIdRequest'
      responses:
        '200':
          description: Payment report request response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentReportRequestResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/Error'
      callbacks:
        reportReady:
          '{$request.body#/callbackUrl}':
            post:
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/PaymentReportCallbackJSON'
                  application/csv:
                    schema:
                      description: The report as a CSV file
                      type: string
              responses:
                '200':
                  description: Your server returns this code if it can accept the callback
                default:
                  description: Your server can not handle callback - will result in re-sending of the report to the given callback url.
components:
  schemas:
    PaymentReportRequest:
      type: object
      description: Payment report request
      required:
      - requestType
      - callbackUrl
      properties:
        requestType:
          type: string
          example: json
          description: In which format is the report delivered in
          enum:
          - json
          - csv
        callbackUrl:
          type: string
          format: url
          example: https://example.com/payment-reports/
          description: To which URL is the report delivered to. Callback URLs must use HTTPS
        paymentStatus:
          type: string
          example: default
          description: How are the payments statuses filtered. "Default" includes both paid and settled payments. "Paid" includes paid payments that have not been settled yet. "All" includes everything, for example unpaid or failed payments.
          enum:
          - default
          - all
          - paid
          - settled
          default: default
        startDate:
          type: string
          format: datetime
          example: '2019-01-01T18:00:00'
          description: Filter out payments created before given datetime.
        endDate:
          type: string
          format: datetime
          example: '2019-01-02T20:00:00'
          description: Filter out payments created after given datetime.
        limit:
          type: integer
          example: 1000
          description: Limit the amount of payments included in the report.
          maximum: 50000
          default: 50000
        reportFields:
          type: array
          description: Limit the amount of fields included in the report. By default all fields are included.
          items:
            type: string
            enum:
            - entryDate
            - created
            - amount
            - status
            - firstname
            - familyname
            - description
            - reference
            - paymentMethod
            - stamp
            - address
            - postcode
            - postoffice
            - country
            - checkoutReference
            - archiveNumber
            - payerName
            - settlementId
            - settlementDate
            - originalTradeReference
            - vatPercentage
            - vatAmount
            - paymentMethodFee
            - paymentMethodCommission
            - shopInShopCommission
            - shopInShopCommissionVatPercentage
            - shopInShopCommissionVatAmount
            - settlementReference
            - transactionId
            - settlementDueDate
            - companyName
            - vatId
            - refunditems
            - tradeitems
        submerchant:
          type: integer
          example: 695874
          description: Get submerchant's payment report
        includeItems:
          type: boolean
          example: true
          description: Include trade items in created payment report
    Error:
      required:
      - status
      - message
      properties:
        status:
          type: string
          enum:
          - error
        message:
          type: string
          description: Error description
        meta:
          type: array
          items:
            type: string
          description: Possible detailed error descriptions
    PaymentReportRequestResponse:
      required:
      - requestId
      properties:
        requestId:
          type: string
          description: Request id
    PaymentReportCallbackJSON:
      description: The returned fields can be filtered out by specifying "reportFields" parameter
      properties:
        entryDate:
          type: string
          format: DD-MM-YYYY
          description: When the payment was paid or initialized
          example: 11-06-2019
        created:
          type: string
          format: HH:mm
          description: Hour and minute of the payment creation
          example: '11:31'
        amount:
          type: number
          format: float
          description: Payment amount in Euros
          example: 15.95
        status:
          type: string
          enum:
          - New
          - Paid
          - waiting for approval
          - Cancelled
          - Timeout
          - Halted
          - Delayed
          - Paid and settled
          description: Payment status
          example: Paid
        firstname:
          type: string
          description: First name
          example: John
        familyname:
          type: string
          description: Last name
          example: Doe
        description:
          type: string
          format: datetime
          description: Payment description
          example: Cat food and rubber boots
        reference:
          type: string
          description: Merchant's reference
          example: 12345-abc
        paymentMethod:
          type: string
          description: Payment method
          example: OP
        stamp:
          type: string
          description: Payment Stamp
          example: CO~1554204687711
        address:
          type: string
          description: Delivery address
          example: Hämeenkatu 16
        postcode:
          type: string
          description: Postal code
          example: '33100'
        postoffice:
          type: string
          description: Post office
          example: Tampere
        country:
          type: string
          description: Country of delivery
          example: Finland
        checkoutReference:
          type: string
          description: Checkout reference
          example: '1031751'
        archiveNumber:
          type: string
          description: Archive number
          example: '81295824808952395'
        payerName:
          type: string
          description: Name from bank
          example: DOEJOHN
        settlementId:
          type: number
          description: Settlement (report) id
          example: 1235678
        settlementDate:
          type: string
          description: When the payment is settled
          format: DD-MM-YYYY
          example: '2019-04-04'
        originalTradeReference:
          type: string
          description: Merchant's reference of the original payment in case of refund
          example: 12345-abc
        vatPercentage:
          type: number
          format: float
          description: Payment VAT percentage
          example: 25.5
        vatAmount:
          type: number
          format: float
          description: Payment VAT amount in Euros
          example: 0.192
        paymentMethodFee:
          type: number
          format: float
          description: Payment method fee in Euros
          example: 0.12
        paymentMethodCommission:
          type: number
          format: float
          description: Payment method commission amount in Euros
          example: 0.024
        shopInShopCommission:
          type: number
          format: float
          description: Payment method commission amount in Euros
          example: 0.8
        shopInShopCommissionVatPercentage:
          type: number
          format: float
          description: Payment method commission VAT percentage
          example: 25.5
        shopInShopCommissionVatAmount:
          type: number
          format: float
          description: Payment method commission VAT amount in Euros
          example: 0.192
        refunditems:
          type: string
          description: Contains a `|` (pipe) -delimited list of *stamp*:*amount* pairs. Pairs are delimited by a `:` (colon). Stamp refers to the payment item's stamp that was refunded.
          example: stamp1:400|stamp2:200
        settlementReference:
          type: string
          description: Settlement reference
          example: '45667372'
        transactionId:
          type: string
          description: Assigned transaction ID for the payment
          example: 5770642a-9a02-4ca2-8eaa-cc6260a78eb6
        settlementDueDate:
          type: string
          description: When the payment settlement is due
          format: DD-MM-YYYY
          example: '2019-04-10'
        tradeitems:
          type: array
          description: Trade items included in the payment
          items:
            type: object
            properties:
              stamp:
                type: string
                description: Payment item stamp
              amount:
                type: number
                description: Item amount in cents
              description:
                type: string
                description: Item description
              vat:
                type: number
                description: VAT percentage
              code:
                type: string
                description: Product code
              quantity:
                type: number
                description: Quantity
        companyName:
          type: string
          description: Company name
          example: Example company
        vatId:
          type: string
          description: Company VAT ID in international format
          example: FI02454583
    PaymentReportBySettlementIdRequest:
      type: object
      description: Payment report request
      required:
      - requestType
      - callbackUrl
      properties:
        requestType:
          type: string
          example: json
          description: In which format is the report delivered in
          enum:
          - json
          - csv
        callbackUrl:
          type: string
          format: url
          example: https://example.com/payment-reports/
          description: To which URL is the report delivered to
        reportFields:
          type: array
          description: Limit the amount of fields included in the report. By default all fields are included.
          items:
            type: string
            enum:
            - entryDate
            - created
            - amount
            - status
            - firstname
            - familyname
            - description
            - reference
            - paymentMethod
            - stamp
            - address
            - postcode
            - postoffice
            - country
            - checkoutReference
            - archiveNumber
            - payerName
            - settlementId
            - settlementDate
            - originalTradeReference
            - vatPercentage
            - vatAmount
            - paymentMethodFee
            - paymentMethodCommission
            - shopInShopCommission
            - shopInShopCommissionVatPercentage
            - shopInShopCommissionVatAmount
            - settlementReference
            - transactionId
            - settlementDueDate
            - companyName
            - vatId
            - refunditems
            - tradeitems
        submerchant:
          type: integer
          example: 695874
          description: Get submerchant's payment report
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Request did not pass input validation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'