---
title: "Add a list of payments to an existing payment"
method: POST
path: "/paymenttyperelation/{paymentId}"
tags: ["PaymentTypeRelations"]
---

# Add a list of payments to an existing payment

`POST /paymenttyperelation/{paymentId}`

## Request

- Base URL: `https://api.c1st.com/api`
- URL: `https://api.c1st.com/api/paymenttyperelation/{paymentId}`
- Auth: HTTP bearer

## Request body

- PaymentTypeRelation[]
  - `id` integer, nullable
  - `title` string: The title of the payment. E.g. 'cash' or 'Dankort'
  - `paymenttypeid` integer, nullable: reference to user created payment type.
  - `amount` number, double: The amount of the payment type.
  - `unroundedcash` number, double, nullable: The unrounded amount for a cash payment. Used to calculate rounding difference
  - `cash` integer: Returns whether or not the payment type is cash-based.
  - `bamdesk_messageid` integer, nullable: If provider = 'bamdesk'. This will be the id for the messageid for Worldline card-terminal.
  - `accountno` string, nullable: The account where the payment has been posted. If not applicable, it will be null.
  - `currency` string, nullable: 3-digit currency code if the payment is in foreign currency.
  - `exchangerate` number, double, nullable: The exchange rate if the payment is in foreign currency
  - `receipts` string[], nullable: Index for where it's stored.
  - `receiptsCount` integer, nullable: Number of entries in receipts.
  - `mobilepayid` string, nullable: If provider = 'mobilepay' this is a reference to the Mobile Pay transaction
  - `paymentid` integer, nullable: The paymentid the type is related to
  - `vipps_reference_id` string, nullable: The reference for the vipps payment
  - `adyen_reference_id` string, nullable: The reference for the adyen payment
  - `error_message` string, nullable: If an error occured during the payment, this will contain the error message, if supported by the provider.
  - `provider` union
    - 'mobilepay' | 'bamdesk' | 'nets' | 'stripe' | 'vipps' | 'adyen' | 'adyen_ecommerce' | 'fashioncheque', nullable
    - string, nullable: If payment was handled by an external provider use this string indicate the provider.
  - `status` 'initiated' | 'reserved' | 'cancelled' | 'captured'
  - `initiated_amount` number, double, nullable: The amount attempted when the payment type was initiated. Defaults to `amount` when omitted on creation.
  - `created_at` string, nullable: The timestamp for when the payment type relation was created.
  - `updated_at` string, nullable: The timestamp for when the payment type relation was last updated.

## Response `200`

Ok

- PaymentTypeRelation[]
  - `id` integer, nullable
  - `title` string: The title of the payment. E.g. 'cash' or 'Dankort'
  - `paymenttypeid` integer, nullable: reference to user created payment type.
  - `amount` number, double: The amount of the payment type.
  - `unroundedcash` number, double, nullable: The unrounded amount for a cash payment. Used to calculate rounding difference
  - `cash` integer: Returns whether or not the payment type is cash-based.
  - `bamdesk_messageid` integer, nullable: If provider = 'bamdesk'. This will be the id for the messageid for Worldline card-terminal.
  - `accountno` string, nullable: The account where the payment has been posted. If not applicable, it will be null.
  - `currency` string, nullable: 3-digit currency code if the payment is in foreign currency.
  - `exchangerate` number, double, nullable: The exchange rate if the payment is in foreign currency
  - `receipts` string[], nullable: Index for where it's stored.
  - `receiptsCount` integer, nullable: Number of entries in receipts.
  - `mobilepayid` string, nullable: If provider = 'mobilepay' this is a reference to the Mobile Pay transaction
  - `paymentid` integer, nullable: The paymentid the type is related to
  - `vipps_reference_id` string, nullable: The reference for the vipps payment
  - `adyen_reference_id` string, nullable: The reference for the adyen payment
  - `error_message` string, nullable: If an error occured during the payment, this will contain the error message, if supported by the provider.
  - `provider` union
    - 'mobilepay' | 'bamdesk' | 'nets' | 'stripe' | 'vipps' | 'adyen' | 'adyen_ecommerce' | 'fashioncheque', nullable
    - string, nullable: If payment was handled by an external provider use this string indicate the provider.
  - `status` 'initiated' | 'reserved' | 'cancelled' | 'captured'
  - `initiated_amount` number, double, nullable: The amount attempted when the payment type was initiated. Defaults to `amount` when omitted on creation.
  - `created_at` string, nullable: The timestamp for when the payment type relation was created.
  - `updated_at` string, nullable: The timestamp for when the payment type relation was last updated.

## Other responses

- `404`: The payment you are trying to add paymenttypes to does not exist.

---

[API](https://skmtc.dev/c1st/apis/customers-1st-api.md) - [All operations](https://skmtc.dev/c1st/apis/customers-1st-api/llms.txt) - [OpenAPI document](https://skmtc.dev/c1st/apis/customers-1st-api/revisions/4250bb326f2a?raw)
