---
title: "Initializes an APM transaction."
method: POST
path: "/v2/moneyins/apm/init"
tags: ["MoneyIns | APM"]
---

# Initializes an APM transaction.

`POST /v2/moneyins/apm/init`

## Headers

- `Authorization` string, required
- `PSU-Accept-Language` string
- `PSU-IP-Address` string, required
- `PSU-User-Agent` string

## Request body

- InitApmTransactionInput — Represents the input data for initializing an APM transaction.
  - `transaction` ApmTransaction — Transaction
    - `reference` string — Reference
    - `accountId` string, required — AccountId (required)
    - `totalAmount` integer, required — TotalAmount (required)
    - `PaymentMethod` string — PaymentMethod: ideal/bancontact
    - `commissionAmount` integer — CommissionAmount
    - `comment` string — Comment
    - `autoCommission` boolean — AutoCommission
  - `paymentUrls` PaymentUrls — PaymentUrls
    - `redirections` ApmRedirections — Redirections
      - `returnUrl` string — Gets the URL to which the user will be redirected after a successful payment. ReturnUrl
      - `errorUrl` string — Gets the URL to which the user will be redirected if the payment fails. ErrorUrl
      - `cancelUrl` string — Gets the URL to which the user will be redirected if the payment is canceled. CancelUrl
  - `customer` ApmCustomer — Customer
    - `civility` string — Civility
    - `gender` 1 | 2 — Gender<br/>1 = Male.<br/>2 = Female.<br/>
    - `firstName` string, required — FirstName (required)
    - `lastName` string, required — LastName (required)
    - `email` string — Email
    - `mobilePhone` string — MobilePhone
    - `birthDate` string — BirthDate
    - `countryCode` string, required — Country code of the payer (required). For iDEAL: only NL is accepted. For Bancontact: only BE is accepted.
  - `preferredLanguage` string — Preferred language for the payment flow (e.g., fr, nl, de, en).
  - `appToAppUrl` string — URL used for app-to-app redirection.
  - `timeoutInMinutes` integer — Timeout for the transaction in minutes.

## Response `200`

OK

- InitApmTransactionOutput — Represents the output of an APM transaction initialization.
  - `id` integer — Gets or sets the Lemonway transaction ID.
  - `redirectUrl` string — Gets or sets the redirection URL.
  - `error` Error
    - `code` integer
    - `message` string
    - `psp` PSP
      - `message` string — Get the Error Message from PSP

## Other responses

- `401` — Unauthorized
- `500` — InternalServerError

---

[API](https://skmtc.net/lemonway/apis/account-onboarding-management-api.md) · [All operations](https://skmtc.net/lemonway/apis/account-onboarding-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lemonway/account-onboarding-management-api/revisions/73309fe68e2d/schema)
