Payment
A Payment is one payment on an order: how the order was paid, how much, and what the payment provider charged for it. An order paid in several ways, such as part gift card and part card, has one payment for each. What the order bought is on its order lines.
How the money is written:
- Amounts are in minor units (øre/cents).
- A refund doesn't change the payments it refunds. It adds a negative copy of each payment on the order, dated when the refund was made and carrying the refund's
refundId. - Money paid back at the till for a return is a payment of its own with a negative
amount, on the return's order. - So the sum of
amountover a period is what was taken in that period, with the period's refunds and returns already taken off.
| Property | Type | Default | Description | Example |
|---|---|---|---|---|
id* | string (UUIDv4) | Unique identifier | "3e7a1c0b-2d4f-4e6a-9b8c-5d6e7f8a9b0c" | |
orderId* | string (UUIDv4) | The order the payment is for | "f0a52c7e-9e04-4bb4-bd38-1bb88e1dd0e4" | |
date* | string | When the order was completed. On a refund payment: when the refund was made | "2026-10-15T10:30:00.000Z" | |
paymentMethod | string | null | How it was paid. See Payment methods below | "CREDIT_CARD" |
wallet | string | null | The wallet a card payment was made with, such as APPLE_PAY | null |
cardBrand | string | null | The card's brand, on card payments, such as VISA or MASTERCARD | "VISA" |
amount | number | The amount paid. Negative when money goes back to the customer: on refund payments, on money paid back at the till for a return, and on cash change given back on a split payment | 55000 | |
fee | number | null | The fee the payment provider charged for the payment, where Loby records one | 770 |
giftcardId | string (UUIDv4) | null | The gift card spent, on GIFTCARD payments | null |
customPaymentMethod | object | null | The museum's own payment method, on CUSTOM payments: its id and name. name is null if the method has been deleted | { "id": "...", "name": "Faktura" } |
refundId | string (UUIDv4) | null | Set on the negative copy a refund adds: the refund it belongs to. null on payments taken | null |
cashRegisterId | string (UUIDv4) | null | The till the payment was taken at. null when it wasn't taken at a till, such as online | null |
testMode | boolean | Whether the payment is a test record. Only included when the request is made with a test mode API key | true |
Card numbers, expiry dates and payment provider references are not available through the API.
{ "id": "3e7a1c0b-2d4f-4e6a-9b8c-5d6e7f8a9b0c", "orderId": "f0a52c7e-9e04-4bb4-bd38-1bb88e1dd0e4", "date": "2026-10-15T10:30:00.000Z", "paymentMethod": "CREDIT_CARD", "wallet": null, "cardBrand": "VISA", "amount": 55000, "fee": 770, "giftcardId": null, "customPaymentMethod": null, "refundId": null, "cashRegisterId": null }
Payment methods
paymentMethod | How it was paid |
|---|---|
CREDIT_CARD | A card, online or at the till. Apple Pay is a card payment with wallet set to APPLE_PAY |
MOBILE_PAY | MobilePay through Stripe |
DIRECT_VIPPS_MOBILEPAY | MobilePay at the till, paid straight to the museum's own Vipps MobilePay account |
CASH | Cash at the till. A negative CASH payment is money paid back: change on a split payment, or a return |
GIFTCARD | A Loby value gift card, in giftcardId |
GIFTUP | A GiftUp gift card |
CUSTOM | One of the museum's own payment methods, such as an invoice, in customPaymentMethod |
INTERNAL | An internal sale. Only on older orders |
Payments and order lines
An order's payments add up to its order lines' amount plus any booking fees. Cash payments can differ by cash rounding. Match payments and lines on orderId.