# APM orders

The report is essential for merchants using alternative payment methods, offering comprehensive transaction details, including order IDs, statuses, amounts, customer information, crucial for a complete understanding of APM transaction dynamics.


  This report uses the updated_at as the default parameter for unloading data, indicating the latest update to the APM orders.

Endpoint: POST /apm-orders
Version: 1.0.0
Security: MerchantID

## Header parameters:

  - `merchant` (string, required)
    Unique public key provided upon registration and must be shared for identification purposes.
    Example: "api_pk_7b197...ba108f842"

  - `signature` (string, required)
    Request signature that allows verification of merchant authenticity on the payment gateway server.
    Example: "M2E3OTkyNzcz...xMmExODI4"

## Request fields (application/json):

  - `filter` (string)
    Filtering criteria for the report data.
    Enum: "updated_at", "created_at"

  - `date_from` (string, required)
    Start datetime for the report stated in UTC+0.
    Example: "2025-08-15 11:00:00"

  - `date_to` (string, required)
    End datetime for the report stated in UTC+0.
    Example: "2025-08-18 11:00:00"

  - `limit` (integer)
    Limit value indicates the maximum number of items to be returned.
    Example: 2000

  - `next_page_iterator` (string)
    Pagination helps in managing large datasets by dividing them into smaller, manageable chunks.


  If this value is null, it indicates that all available data has been successfully retrieved by the merchant.
    Example: "eyJzdWJzY3JpcHRpb25faWQiOiI5ODlkCJkYXRlX3RvIjoiMjAyMC0wOS0xNyAxNDoxMDowMCJ9"

## Response 200 fields (application/json):

  - `body` (object) — one of:
    - Success:
      - `orders` (array, required)
        List of orders, each containing attributes like order identifier, status, type, amount, currency, and timestamps for creation and updates.
      - `orders.order_id` (string, required)
        Unique order identifier defined by the merchant.
      - `orders.order_description` (string, required)
        Order description.
      - `orders.created_at` (string, required)
        Datetime when the order was created.
      - `orders.updated_at` (string, required)
        Datetime when the order was updated.
      - `orders.method` (string, required)
        Payment method used to process the order.
      - `orders.amount` (integer, required)
        Original order amount.
      - `orders.currency` (string, required)
        Three-letter ISO-4217 currency code of the order.
      - `orders.processing_amount` (integer)
        Amount of the payment in the smallest currency unit as it was processed by the payment service provider.


  This amount may differ from the original order amount due to currency conversion or other processing factors.
      - `orders.processing_currency` (string)
        Three-letter ISO-4217 currency code of the payment when it was processed by payment service provider.


  In some cases, it is different from the original currency.
      - `orders.status` (string, required)
        Status of the requested order.
        Enum: "created", "processing", "settle_pending", "approved", "declined", "refunded"
      - `orders.customer_account_id` (string)
        Unique customer identifier defined by the merchant.
      - `orders.customer_email` (string, required)
        Customer's email address.
      - `orders.ip_address` (string, required)
        Public IP address of the cardholder, both IPv4 and IPv6 are supported.


  Required for antifraud checks.
  Private IPs (10.0.0.0-10.255.255.255, 172.16.0.0-172.31.255.255, 192.168.0.0-192.168.255.255) will result in an 'Invalid IP' error.
      - `orders.geo_country` (string)
        Country where the customer account is registered on the merchant platform.
      - `orders.error_code` (string)
        Gateway error code for the declined payment.
      - `orders.transactions` (array, required)
        List of transactions, each containing detailed attributes such as transaction identifier, status, type, method, amount, currency, and timestamps for creation and updates.
      - `orders.transactions.id` (string, required)
        Unique transaction identifier.
      - `orders.transactions.psp_transaction_id` (string)
        PSP saves the encrypted payment data and responds with a unique identifier for this transaction.

                
  PSP uses the psp_transaction_id to locate the encrypted payment data for this transaction. This is the identifier generated by the provider (in our case PayPal). Only for transactions with orders:method:paypal-vault.
      - `orders.transactions.created_at` (string, required)
        Datetime when the transaction was created.
      - `orders.transactions.updated_at` (string, required)
        Datetime when the transaction was updated.
      - `orders.transactions.method` (string, required)
        Payment method used to process the transaction.
      - `orders.transactions.amount` (integer, required)
        Transaction amount.
      - `orders.transactions.currency` (string, required)
        Three-letter ISO-4217 currency code of the transaction.
      - `orders.transactions.status` (string, required)
        Status of the transaction.
        Enum: "created", "processing", "settle_pending", "success", "fail"
      - `orders.transactions.type` (string, required)
        Type of the transaction.
        Enum: "pay", "recurring", "refund"
      - `orders.order_metadata` (object)
        Metadata is useful for storing additional, structured information about an object.
      - `metadata` (object, required)
        Metadata object containing pagination and count information.
      - `metadata.next_page_iterator` (string, required)
        Pagination helps in managing large datasets by dividing them into smaller, manageable chunks.


  If this value is null, it indicates that all available data has been successfully retrieved by the merchant.
      - `metadata.count` (integer, required)
        Number of orders on the page.
    - Authentication failed:
      - `error` (object, required)
        Error object.
      - `error.code` (string, required)
        Unauthorized access due to invalid credentials.
        Example: "1.01"
      - `error.messages` (array, required)
        Array of error messages applied to the decline payment.
        Example: ["Authentication failed"]


