# Assign payments to stores and points of sale

Attach a **`storeId`** and/or **`pointOfSaleId`** to payments you create through the API to group transactions by [store and point of sale](https://docs.monei.com/manage-account/stores-and-points-of-sale/.md) — for reporting, analytics, and [user access control](https://docs.monei.com/manage-account/stores-and-points-of-sale/.md#segmentation). Because a point of sale belongs to a store, attaching a `pointOfSaleId` also associates the payment with that store.

Find each ID in the dashboard. Open [Settings → Stores](https://dashboard.monei.com/settings/stores) to read a store's `storeId`:

![Stores page in the MONEI Dashboard settings, listing the stores on your account](/img/dashboard/en/settings-stores.png)

Stores page in the MONEI Dashboard settings, listing the stores on your account

Open [Settings → Points of sale](https://dashboard.monei.com/settings/points-of-sale) to read a point of sale's `pointOfSaleId`:

![Points of sale page in the MONEI Dashboard settings, listing the points of sale on your account](/img/dashboard/en/settings-points-of-sale.png)

Points of sale page in the MONEI Dashboard settings, listing the points of sale on your account

You only need to specify these during payment creation; subsequent operations such as confirmation, capture, or refund inherit the association by default.

Assigning payments with `storeId` or `pointOfSaleId` is not available for standard integrations with e-commerce platforms such as Shopify, PrestaShop, Wix, and WooCommerce. This option is only applicable in custom implementations.

Common pitfall: scoped users and payment visibility

When you bind an [authorized user](https://docs.monei.com/manage-account/accessing-your-dashboard/.md#users-roles) to a store or point of sale, they **only see payments tagged with that `storeId` or `pointOfSaleId`**. Any payment created **without** the matching ID is invisible to that user in the dashboard. So if you use scoped users, make sure every payment carries the right `storeId`/`pointOfSaleId` — pass it in the API, or have the user create the payment in the dashboard or MONEI Pay (which inherits their assignment automatically).

## Create a payment with a storeId or pointOfSaleId[​](#assigning-payments "Direct link to Create a payment with a storeId or pointOfSaleId")

<!-- -->

* cURL
* Node.js
* PHP

POST https\://api.monei.com/v1/payments

```
curl --request POST 'https://api.monei.com/v1/payments' \

--header 'Authorization: pk_test_3c140607778e1217f56ccb8b50540e00' \

--header 'Content-Type: application/json' \

--data-raw '{

    "amount": 110,

    "currency": "EUR",

    "orderId": "14379133960355",

    "description": "Test Store - #14379133960355",

    "storeId": "e5f28150d9e8974c58ab5ec9c4a880f8734dcf05",

    "pointOfSaleId": "5e3f3fa8b9585e908e1b51d2c7914e61e7403078"

}'
```

server.js

```
const {Monei, PaymentTransactionType} = require('@monei-js/node-sdk');

const monei = new Monei('pk_test_36cf3e8a15eff3f5be983562ea6b13ec');

monei.payments.create({

  amount: 110,

  currency: 'EUR',

  orderId: '14379133960355',

  description: 'Test Store - #14379133960355',

  storeId: 'e5f28150d9e8974c58ab5ec9c4a880f8734dcf05',

  pointOfSaleId: '5e3f3fa8b9585e908e1b51d2c7914e61e7403078'

});
```

server.php

```
$monei = new Monei\MoneiClient('pk_test_36cf3e8a15eff3f5be983562ea6b13ec');

$monei->payments->create(new Monei\Model\CreatePaymentRequest([

  'amount' => 110,

  'currency' => 'EUR',

  'order_id' => '14379133960355',

  'description' => 'Test Store - #14379133960355',

  'store_id' => 'e5f28150d9e8974c58ab5ec9c4a880f8734dcf05',

  'point_of_sale_id' => '5e3f3fa8b9585e908e1b51d2c7914e61e7403078'

]));
```

The following parameters are required:

* **amount** `positive integer` - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD)
* **currency** `string` - Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency.
* **orderId** `string` - An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system.
* **storeId** `string` - A unique identifier of the Store. If specified, the payment is attached to this Store.
* **pointOfSaleId** `string` - A unique identifier of the Point of Sale. If specified, the payment is attached to this Point of Sale (and its Store).

Both are optional — pass either, both, or neither. Check all available [request parameters](https://docs.monei.com/apis/rest/payments-create/.md).

## Point of sale callback URL precedence[​](#pos-settings "Direct link to Point of sale callback URL precedence")

A QR-type point of sale can define a **default callback URL** in its [payment settings](https://docs.monei.com/manage-account/stores-and-points-of-sale/.md#pos-settings). When a payment is created with that point of sale's `pointOfSaleId` and you **don't** pass a `callbackUrl`, MONEI notifies the point of sale's URL when the payment completes. If you **do** pass a `callbackUrl` when [creating the payment](https://docs.monei.com/apis/rest/payments-create/.md), your value takes precedence and the point-of-sale default is not applied. Handle the notification like any payment callback — verify the `MONEI-Signature` and return `200 OK` (see [Receive webhook events](https://docs.monei.com/guides/webhooks/.md)).

## Store and point of sale configuration[​](#configuring-iban-for-settlements "Direct link to Store and point of sale configuration")

Creating stores and points of sale, payment settings (fixed amounts, required customer fields, order QR emails), QR codes and permanent payment links, and per-store IBAN settlement are all managed in the dashboard — see [stores and points of sale](https://docs.monei.com/manage-account/stores-and-points-of-sale/.md).
