Send receipt
const url = 'https://sender.sandbox-api.kivra.com/dr/v1/receipts';const options = { method: 'POST', headers: { 'Content-Type': 'application/json;profile=https://se.receipts.kivra.com/schemas/json/retail/v2.0' }, body: '{ "business_unit": { "name": "Merchant name", "organization_number": "112233-4499", "unit_id": "466", "contact": { "address": { "street_address": "Merchant road", "locality": "Merchant town", "postal_code": "12345", "country_code": "SWE" }, "phone": "010-123 45 67" } }, "cashier": { "id": "601ada97949c9530f2e087c1", "name": "Stangen" }, "sales_recording_system": { "id": "389114001", "name": "Merchant name", "serial_number": "1462-DASDAD-SE" }, "receipt_identifier": { "sequence_number": 68612 }, "time_of_purchase": "2022-04-27T11:59:08.831+02:00", "currency": "SEK", "totals": { "gross": { "amount": 141 }, "vat": { "amount": 15.11, "sub_totals": [ { "amount": 15.11, "taxable_amount": 141, "net_amount": 125.89, "tax_percentage": 12 } ] }, "paid": { "amount": 141, "received": 141, "returned": 0 } }, "items": [ { "sale": { "identifiers": [ { "identifier_type": "pos", "value": "5cc90e04-86c3-4f29-ae02-5146f328c123" } ], "description": "Dirty Burger Dubbel", "quantity": { "value": 1, "unit": "ea" }, "eligible_for_frequent_shopper_points": true, "regular_sales_unit_price": 125, "extended_amount": 125, "tax_percentage": 12, "tax_amount": 13.39, "sequence_number": 1 } }, { "sale": { "identifiers": [ { "identifier_type": "pos", "value": "9b4e4d67-2483-43c8-bbfc-eca1cb68a123" } ], "description": "Béarnaise", "quantity": { "value": 1, "unit": "ea" }, "eligible_for_frequent_shopper_points": true, "regular_sales_unit_price": 16, "extended_amount": 16, "tax_percentage": 12, "tax_amount": 1.71, "sequence_number": 2 } } ], "payments": [ { "amount": 141, "amount_applied_to_bill": 141, "tender": { "creditdebit": { "bank_identification_number": "535583******7361", "acquiring_institution_id_code": "8025689", "retrieval_reference_number": "220427039945", "card_acceptor_id": "47238220", "card_acceptor_terminal_id": "47238220", "card_acceptor_name": "Merchant name", "approval_code": "882875", "card_token": { "value": "709215290212149250", "scheme": "par" } } } } ], "customer": { "loyalty": { "program": "Stammis", "customer_number": "197305105111" }, "id": { "civic_registration_number": "196801249290" } } }'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sender.sandbox-api.kivra.com/dr/v1/receipts \ --header 'Content-Type: application/json;profile=https://se.receipts.kivra.com/schemas/json/retail/v2.0' \ --data '{ "business_unit": { "name": "Merchant name", "organization_number": "112233-4499", "unit_id": "466", "contact": { "address": { "street_address": "Merchant road", "locality": "Merchant town", "postal_code": "12345", "country_code": "SWE" }, "phone": "010-123 45 67" } }, "cashier": { "id": "601ada97949c9530f2e087c1", "name": "Stangen" }, "sales_recording_system": { "id": "389114001", "name": "Merchant name", "serial_number": "1462-DASDAD-SE" }, "receipt_identifier": { "sequence_number": 68612 }, "time_of_purchase": "2022-04-27T11:59:08.831+02:00", "currency": "SEK", "totals": { "gross": { "amount": 141 }, "vat": { "amount": 15.11, "sub_totals": [ { "amount": 15.11, "taxable_amount": 141, "net_amount": 125.89, "tax_percentage": 12 } ] }, "paid": { "amount": 141, "received": 141, "returned": 0 } }, "items": [ { "sale": { "identifiers": [ { "identifier_type": "pos", "value": "5cc90e04-86c3-4f29-ae02-5146f328c123" } ], "description": "Dirty Burger Dubbel", "quantity": { "value": 1, "unit": "ea" }, "eligible_for_frequent_shopper_points": true, "regular_sales_unit_price": 125, "extended_amount": 125, "tax_percentage": 12, "tax_amount": 13.39, "sequence_number": 1 } }, { "sale": { "identifiers": [ { "identifier_type": "pos", "value": "9b4e4d67-2483-43c8-bbfc-eca1cb68a123" } ], "description": "Béarnaise", "quantity": { "value": 1, "unit": "ea" }, "eligible_for_frequent_shopper_points": true, "regular_sales_unit_price": 16, "extended_amount": 16, "tax_percentage": 12, "tax_amount": 1.71, "sequence_number": 2 } } ], "payments": [ { "amount": 141, "amount_applied_to_bill": 141, "tender": { "creditdebit": { "bank_identification_number": "535583******7361", "acquiring_institution_id_code": "8025689", "retrieval_reference_number": "220427039945", "card_acceptor_id": "47238220", "card_acceptor_terminal_id": "47238220", "card_acceptor_name": "Merchant name", "approval_code": "882875", "card_token": { "value": "709215290212149250", "scheme": "par" } } } } ], "customer": { "loyalty": { "program": "Stammis", "customer_number": "197305105111" }, "id": { "civic_registration_number": "196801249290" } } }'Sends a receipt to Kivra. The receipt is routed to a store via one of two options:
- Automatically: describe the store inline in business_unit; Kivra resolves — or creates — the owning chain and store.
- Explicitly: set business_unit.service_id to a store_id obtained when the store was created (see Chain/Store Management).
Access scope
- PARTNER
- CHAIN
- STORE
Headers
The Content-Type must be set to:
Content-Type: application/json;profile=https://se.receipts.kivra.com/schemas/json/retail/v2.0
The profile tells what version of the JSON schema the receipt is based on.
This schema is available for download in JSON.
Body
Receipts are sent as JSON.
IMPORTANT NOTE:
For card payments, Kivra’s JSON scheme uses the masked card number:
- Bank Identification Number — masked card number (preferred). The card’s 6-8 digit BIN may be sent if the masked card number is unavailable. In addition, the following payment terminal information should be provided according to ISO standard 8583:
- Retrieval Reference Number
- Card Acceptor Terminal ID
- Card Acceptor ID
- Card Acceptor Name
- Approval Code
- Acquiring institution identification code
Request Bodyrequired
Section titled “Request Bodyrequired”Sends a receipt
Digital receipt schema
object
If true the receipt is a copy
Merchant information
object
Kivra id of an existing business unit.
Internal merchant shop/business unit id
Partner’s own stable identifier for the store. The store is deduped on (owning chain, external_id), so a partner keeps one store per external_id.
Swedish organisationsnummer (10 digits, optionally hyphenated). A VAT number must be sent in vat_number, not here.
VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here.
Merchant contact information name, address, phone etc
object
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
Generic format for phone numbers where strict format can not be enforced, use only for phone number to be displayed
A geographical coordinate
object
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Merchant information
object
Kivra id of an existing business unit.
Internal merchant shop/business unit id
Partner’s own stable identifier for the store. The store is deduped on (owning chain, external_id), so a partner keeps one store per external_id.
Swedish organisationsnummer (10 digits, optionally hyphenated). A VAT number must be sent in vat_number, not here.
VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here.
Merchant contact information name, address, phone etc
object
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
Generic format for phone numbers where strict format can not be enforced, use only for phone number to be displayed
A geographical coordinate
object
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Merchant information
object
Kivra id of an existing business unit.
Internal merchant shop/business unit id
Partner’s own stable identifier for the store. The store is deduped on (owning chain, external_id), so a partner keeps one store per external_id.
Swedish organisationsnummer (10 digits, optionally hyphenated). A VAT number must be sent in vat_number, not here.
VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here.
Merchant contact information name, address, phone etc
object
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
Generic format for phone numbers where strict format can not be enforced, use only for phone number to be displayed
A geographical coordinate
object
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Merchant information
object
Kivra id of an existing business unit.
Internal merchant shop/business unit id
Partner’s own stable identifier for the store. The store is deduped on (owning chain, external_id), so a partner keeps one store per external_id.
Swedish organisationsnummer (10 digits, optionally hyphenated). A VAT number must be sent in vat_number, not here.
VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here.
Merchant contact information name, address, phone etc
object
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
Generic format for phone numbers where strict format can not be enforced, use only for phone number to be displayed
A geographical coordinate
object
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Optional chain grouping for the store. Reference an existing chain with service_id, or supply name plus organization_number, vat_number, or external_id to group the store under a chain that is created on first use. organization_number/vat_number follow the same semantics as on the wrapping business unit. When omitted, the store is grouped under the default chain (one per the store’s own organization/VAT number per partner).
object
Kivra id of an existing chain. When present, references that chain directly; name/organization_number/vat_number/external_id are then not required.
Display name of the chain. Required when the chain may need to be created (i.e. when service_id is absent).
Swedish organisationsnummer (10 digits, optionally hyphenated) of the chain. A VAT number must be sent in vat_number, not here. Grouping key when external_id is absent.
Chain VAT registration number incl. country prefix (SE/NO/DK/FI), accepted as an alternative to organization_number. A plain Swedish organisationsnummer must go in organization_number, not here. Grouping key when external_id is absent.
Partner’s own stable identifier for the chain. Grouping key when no organization_number/vat_number is given.
Identifies the person handling the purchase if applicable
object
Information about the point of sales system used. The system producing the receipt
object
Information about the point of sales system used. The system producing the receipt
object
Receipt identifiers: sequence number and/or extended number with or without barcode representation
object
A sequence number as stipulated by the swedish tax authorities
A more complex receipt number if applicable, must be unique in given context
object
Data that will be presented as a barcode on the receipt
Barcode representation of any data
In what context is the value (receipt number) unique, note GLOBAL can only be used if a digital receipt provider receipt id is used
ISO 8601 date/time format: YYYY-MM-DDThh:mm:ssTZD
The receipt default currency. This gives the currency for all amounts in the receipt. If applicable overriding currencies can be added to the tender parts
Total amounts keyed by type, e.g. {“gross”: {…}, “vat”: {…}}.
object
Paid: gross amount including discount and rounding.
object
Signed paid total: negative when money goes back to the customer (e.g. a return).
Amount received from the customer (e.g. cash tendered), when it differs from the paid amount.
Amount returned to the customer (e.g. change given), when applicable.
Gross: total including vat, excluding discounts
object
Signed gross total: negative when money goes back to the customer (e.g. a return).
Tax releated total
object
Signed tax total: negative when money goes back to the customer (e.g. a return).
Add sub total for each tax percentage used
One or more sub totals, exactly one per distinct tax percentage. Every line and modifier at a given rate is aggregated into that rate’s single bucket. Monetary fields are signed (see amount).
object
Signed amount for this VAT bucket: the signed sum of every line and modifier at this tax_percentage. Because there is one bucket per rate, opposite-direction entries at the same rate cancel — e.g. a +15 kr sale and a −15 kr return, both at 15%, aggregate into a single 15% bucket with amount 0. Negative when returns at the rate outweigh sales.
Amount including tax amount (signed, same direction as amount).
Amount excluding tax amount (signed, same direction as amount).
Net: total excluding vat
object
Signed net total: negative when money goes back to the customer (e.g. a return).
Total loyalty points/amount redeemed. Amount only — no breakdown applies.
object
Rounding adjustment applied to reach the paid amount. Amount only — no breakdown applies.
object
Signed rounding adjustment (may be negative).
Aggregate discount and surcharge totals. Both are fully derivable from the line- and receipt-level modifiers (a checksum), so either may be omitted. If sent, provide at least one.
object
object
Positive magnitude; the enclosing discount/surcharge key carries the direction.
object
Positive magnitude; the enclosing discount/surcharge key carries the direction.
Any textual information aimed for the receipt header
Any textual information aimed for the receipt footer
List of receipt items, goods or services sold/returned. Each entry is a single-key object naming the item type, e.g. {“sale”: {…}}. The key implies the type, so it need not be repeated inside the value.
object
Defines data needed to handle sold product/service
object
All items must have a unique sequence number 1,2,3 etc. Used for internal references. Also see item_link
A reference to an other items sequence_number if a relation exists
Identifier for an item being sold or returned. Supported types: ‘pos’ (Point of Sale identifier) and ‘gtin’ (Global Trade Item Number).
object
Product serial number
Specifies a specific product batch/lot
object
Quantity sold/returned/covered. Must be > 0: a line for zero units is not a real sale, and it would make the per-unit price (actual_sales_unit_price = extended_amount / quantity) underivable.
Unit for this quantity; we recommend following a standard such as UN/CEFACT Rec 20. Must contain at least one non-whitespace character.
True if item bought is eligible for bonus
The unit cost of the item to the merchant at the time of the Transaction.
Optional: the undiscounted per-unit price the merchant printed, before any discounts or surcharges.
Optional: the authoritative per-unit price the merchant printed, net of discounts/surcharges, carried through for faithful display. When omitted, consumers derive extended_amount / quantity. It is kept as a field (not dropped as “derivable”) because the printed price is independently rounded, so the quotient can differ from what the customer saw on the paper receipt. extended_amount remains the authoritative line total.
The amount the customer paid for this line, net of any line-level modifiers (VAT-inclusive). Authoritative for the line total.
Line-level price modifiers (discounts/surcharges) already reflected in extended_amount.
A single price modifier, keyed by direction: {“discount”: {…}} reduces what the customer pays, {“surcharge”: {…}} increases it. The key carries the direction — there is no action/type field and no sign on amount. Used identically at line and receipt level.
object
The value of a discount or surcharge (direction is set by the enclosing key). amount is authoritative; percent, base_amount and quantity are informational only.
object
Required, authoritative monetary magnitude (VAT-inclusive), always positive. Direction is carried by the enclosing discount/surcharge key.
Human-readable label for the modifier, e.g. “Member offer −10%”.
Optional category of the modifier.
Informational: the percentage applied (always positive).
Informational: the amount the percent applied to.
Informational: how many times the modifier was applied. Might not equal the item quantity. Example: 2 coupons ‘3 for 2’ on six items — item quantity 6, modifier quantity 2.
VAT-bucket routing key: the tax rate the modifier’s (VAT-inclusive) amount belongs to. Send only when it differs from the affected line’s rate.
The value of a discount or surcharge (direction is set by the enclosing key). amount is authoritative; percent, base_amount and quantity are informational only.
object
Required, authoritative monetary magnitude (VAT-inclusive), always positive. Direction is carried by the enclosing discount/surcharge key.
Human-readable label for the modifier, e.g. “Member offer −10%”.
Optional category of the modifier.
Informational: the percentage applied (always positive).
Informational: the amount the percent applied to.
Informational: how many times the modifier was applied. Might not equal the item quantity. Example: 2 coupons ‘3 for 2’ on six items — item quantity 6, modifier quantity 2.
VAT-bucket routing key: the tax rate the modifier’s (VAT-inclusive) amount belongs to. Send only when it differs from the affected line’s rate.
Tax amount based on extended amount and tax percentage
Gives exchange rate etc when payment is done with a foreign currency
object
ISO 4217 foreign currency code
The original amount in the foreign currency the being converted to local currency. For example, converting Yen to Dollars, this amount would be the amount of Yen
Defines data needed to handle returned product/service
object
All items must have a unique sequence number 1,2,3 etc. Used for internal references. Also see item_link
A reference to an other items sequence_number if a relation exists
A more complex receipt number if applicable, must be unique in given context
object
Data that will be presented as a barcode on the receipt
Barcode representation of any data
In what context is the value (receipt number) unique, note GLOBAL can only be used if a digital receipt provider receipt id is used
Identifier for an item being sold or returned. Supported types: ‘pos’ (Point of Sale identifier) and ‘gtin’ (Global Trade Item Number).
object
Product serial number
Specifies a specific product batch/lot
object
Quantity sold/returned/covered. Must be > 0: a line for zero units is not a real sale, and it would make the per-unit price (actual_sales_unit_price = extended_amount / quantity) underivable.
Unit for this quantity; we recommend following a standard such as UN/CEFACT Rec 20. Must contain at least one non-whitespace character.
True if item bought is eligible for bonus
The unit cost of the item to the merchant at the time of the Transaction.
Optional: the undiscounted per-unit price the merchant printed, before any discounts or surcharges.
Optional: the authoritative per-unit price the merchant printed, net of discounts/surcharges, carried through for faithful display. When omitted, consumers derive extended_amount / quantity. It is kept as a field (not dropped as “derivable”) because the printed price is independently rounded, so the quotient can differ from what the customer saw on the paper receipt. extended_amount remains the authoritative line total.
The amount the customer paid for this line, net of any line-level modifiers (VAT-inclusive). Authoritative for the line total.
Line-level price modifiers (discounts/surcharges) already reflected in extended_amount.
A single price modifier, keyed by direction: {“discount”: {…}} reduces what the customer pays, {“surcharge”: {…}} increases it. The key carries the direction — there is no action/type field and no sign on amount. Used identically at line and receipt level.
object
The value of a discount or surcharge (direction is set by the enclosing key). amount is authoritative; percent, base_amount and quantity are informational only.
object
Required, authoritative monetary magnitude (VAT-inclusive), always positive. Direction is carried by the enclosing discount/surcharge key.
Human-readable label for the modifier, e.g. “Member offer −10%”.
Optional category of the modifier.
Informational: the percentage applied (always positive).
Informational: the amount the percent applied to.
Informational: how many times the modifier was applied. Might not equal the item quantity. Example: 2 coupons ‘3 for 2’ on six items — item quantity 6, modifier quantity 2.
VAT-bucket routing key: the tax rate the modifier’s (VAT-inclusive) amount belongs to. Send only when it differs from the affected line’s rate.
The value of a discount or surcharge (direction is set by the enclosing key). amount is authoritative; percent, base_amount and quantity are informational only.
object
Required, authoritative monetary magnitude (VAT-inclusive), always positive. Direction is carried by the enclosing discount/surcharge key.
Human-readable label for the modifier, e.g. “Member offer −10%”.
Optional category of the modifier.
Informational: the percentage applied (always positive).
Informational: the amount the percent applied to.
Informational: how many times the modifier was applied. Might not equal the item quantity. Example: 2 coupons ‘3 for 2’ on six items — item quantity 6, modifier quantity 2.
VAT-bucket routing key: the tax rate the modifier’s (VAT-inclusive) amount belongs to. Send only when it differs from the affected line’s rate.
Tax amount based on extended amount and tax percentage
Gives exchange rate etc when payment is done with a foreign currency
object
ISO 4217 foreign currency code
The original amount in the foreign currency the being converted to local currency. For example, converting Yen to Dollars, this amount would be the amount of Yen
Text only item, example: product warranty text linked to item purchased
object
All items must have a unique sequence number 1,2,3 etc. Used for internal references. Also see item_link
A reference to an other items sequence_number if a relation exists
Deposit to get or pay connected to items sold/returned
object
All items must have a unique sequence number 1,2,3 etc. Used for internal references. Also see item_link
A reference to an other items sequence_number if a relation exists
Signed per-unit deposit amount: negative when the deposit is returned to the customer.
Signed total deposit amount (unit_amount * quantity): negative when the deposit is returned to the customer.
Number of times deposit is applied
Tax on deposit is not always the same as the goods/service connected
A deposit can be divided into different VATs.
object
Signed deposit amount for this VAT bucket: negative when it is returned to the customer (a deposit return)
Receipt-level price modifiers (discounts/surcharges) that apply to the whole receipt and cannot be attributed to individual lines — for example a 5% discount on the entire purchase, spread pro-rata across its VAT rates. If the POS can attribute a modifier to specific lines it does not belong here: put it on those lines’ own modifiers instead (e.g. a discount on a single item). Distinct from totals.modifiers, which is the aggregate discount/surcharge checksum derived from these.
A single price modifier, keyed by direction: {“discount”: {…}} reduces what the customer pays, {“surcharge”: {…}} increases it. The key carries the direction — there is no action/type field and no sign on amount. Used identically at line and receipt level.
object
The value of a discount or surcharge (direction is set by the enclosing key). amount is authoritative; percent, base_amount and quantity are informational only.
object
Required, authoritative monetary magnitude (VAT-inclusive), always positive. Direction is carried by the enclosing discount/surcharge key.
Human-readable label for the modifier, e.g. “Member offer −10%”.
Optional category of the modifier.
Informational: the percentage applied (always positive).
Informational: the amount the percent applied to.
Informational: how many times the modifier was applied. Might not equal the item quantity. Example: 2 coupons ‘3 for 2’ on six items — item quantity 6, modifier quantity 2.
VAT-bucket routing key: the tax rate the modifier’s (VAT-inclusive) amount belongs to. Send only when it differs from the affected line’s rate.
The value of a discount or surcharge (direction is set by the enclosing key). amount is authoritative; percent, base_amount and quantity are informational only.
object
Required, authoritative monetary magnitude (VAT-inclusive), always positive. Direction is carried by the enclosing discount/surcharge key.
Human-readable label for the modifier, e.g. “Member offer −10%”.
Optional category of the modifier.
Informational: the percentage applied (always positive).
Informational: the amount the percent applied to.
Informational: how many times the modifier was applied. Might not equal the item quantity. Example: 2 coupons ‘3 for 2’ on six items — item quantity 6, modifier quantity 2.
VAT-bucket routing key: the tax rate the modifier’s (VAT-inclusive) amount belongs to. Send only when it differs from the affected line’s rate.
Tender related information, several tender types can be used for payment
One or more tender types can be used. Each type is described and the amount used for each tender type
object
Signed amount for this tender: positive is money from the customer to the merchant, negative is money back to the customer (a refund/change leg).
The amount applied to the transaction total
Gives exchange rate etc when payment is done with a foreign currency
object
ISO 4217 foreign currency code
The original amount in the foreign currency the being converted to local currency. For example, converting Yen to Dollars, this amount would be the amount of Yen
If the amount to pay needs rounding
The payment/tender type used and its type-specific details, as a single-key object naming the type, e.g. {“cash”: {…}}. The key implies the type, so it need not be repeated inside the value.
object
Cash payment. Carries no additional fields; the enclosing key identifies it.
object
Credit or debit card payment properties
object
ISO 8583 field 56 Payment Account Reference, masked card number
ISO 8583 field 32, Acquiring institution identification code
ISO 8583 field 37, Retrieval Reference Number
ISO 8583 field 42 Card Acceptor Identification Code
ISO 8583 field 41 Card Acceptor Terminal ID
ISO 8583 field 43 Card Acceptor Name/Location
ISO 8583 field 38 Approval Code
Gives a token value of the payment card and tokenizier info/scheme.
object
Tokenized payment card number
Token scheme, vendor specific. Any unique token provider definition, e.g. payprov_name_findity_dr
Payment slip data as an array of texts
Gives giftcard payment info: amount (initial, current), valid period, etc. Dates must be given in format: 2016-09-29
object
Barcode representation of tender details
object
The barcode value
The barcode type
Gives basic mobile payment information, mobile specific payment info can be added in the tender_details section
object
Mobile payment name, e.g. swish, android wallet, etc
More restrictive international phone number format used as identifier, based on ITU-T E.123
Any additional payment information needed
object
Barcode representation of tender details
object
The barcode value
The barcode type
Loyalty payment, bonus check.
object
The number of loyalty points redeemed by the customer. Provide this and/or amount_redeemed, depending on how the redemption is denominated.
The amount redeemed by the customer. Provide this and/or points_redeemed, depending on how the redemption is denominated.
Add loyalty account data to the customer definitions
Coupon payment
object
Coupon name
Any additional coupon description, if needed
Coupon identifier
If a manufacture coupon
Assigned by the manufacture for each product, validates that a consumer has purchased a qualifying product
Identifies promotion campaign
Coupon value when redeemed
Quantity of items covered by the coupon
object
Quantity sold/returned/covered. Must be > 0: a line for zero units is not a real sale, and it would make the per-unit price (actual_sales_unit_price = extended_amount / quantity) underivable.
Unit for this quantity; we recommend following a standard such as UN/CEFACT Rec 20. Must contain at least one non-whitespace character.
Links to sold item sequence numbers part of promotion is applicable
Barcode representation of tender details
object
The barcode value
The barcode type
Generic tender type. type names the specific generic tender; use “other” together with type_name when none of the named types matches. Add tender-specific payment info in the details section.
object
Free-text name for the tender. Required when type is “other”.
Any additional payment information needed
object
Barcode representation of tender details
object
The barcode value
The barcode type
Generic tender type. type names the specific generic tender; use “other” together with type_name when none of the named types matches. Add tender-specific payment info in the details section.
object
Free-text name for the tender. Required when type is “other”.
Any additional payment information needed
object
Barcode representation of tender details
object
The barcode value
The barcode type
Identification and information about the customer
object
Customer identifiers used to match the receipt to a Kivra user. Any combination may be supplied; each value must be accurate, since an incorrect identifier prevents the receipt from reaching the right user.
object
The digital receipt service customer identifier
More restrictive international phone number format used as identifier, based on ITU-T E.123
Swedish personnummer 12 digits
Customer loyalty information
object
Loyalty program name, example: SJ Prio, ICA, SAS Eurobonus, etc. NOTE! Named used must be approved by Findity
Some programs has different levels based on point etc
The actual loyalty number
Loyalty points gained/lost in transaction
Total loyalty points after increment
Loyalty points needed to achieve next goal/level
object
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
A geographical coordinate
object
Customer loyalty information
object
Loyalty program name, example: SJ Prio, ICA, SAS Eurobonus, etc. NOTE! Named used must be approved by Findity
Some programs has different levels based on point etc
The actual loyalty number
Loyalty points gained/lost in transaction
Total loyalty points after increment
Loyalty points needed to achieve next goal/level
Information about a connected customer order if applicable
object
Order/booking number connected to the receipt. Provide this for a new order/booking; for an existing order/booking being changed, use order_reference instead.
Order/booking number connected to the receipt for an existing order/booking when the order is changed. For a new order/booking, use order_number instead.
To whom the order/order_reference belongs
object
object
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
An address following the convention of http://microformats.org/wiki/hcard. At least one of street_address or post_box is required.
object
Country as an ISO 3166-1 alpha-3 code, e.g. SWE. Case-insensitive.
Whether the address relates to a business or a home
Generic format for phone numbers where strict format can not be enforced, use only for phone number to be displayed
A geographical coordinate
object
Customer loyalty information
object
Loyalty program name, example: SJ Prio, ICA, SAS Eurobonus, etc. NOTE! Named used must be approved by Findity
Some programs has different levels based on point etc
The actual loyalty number
Loyalty points gained/lost in transaction
Total loyalty points after increment
Loyalty points needed to achieve next goal/level
Control unit information required by swedish tax authorities
object
Examples
Sale — auto-created store
A card sale where the store is created straight from the receipt. business_unit describes the store (name + organization_number) and business_unit.service_id is omitted, so Kivra resolves — or creates — the owning chain and store. Customer identified by civic registration number; card_token uses the par scheme for reliable matching.
{ "business_unit": { "name": "Merchant name", "organization_number": "112233-4499", "unit_id": "466", "contact": { "address": { "street_address": "Merchant road", "locality": "Merchant town", "postal_code": "12345", "country_code": "SWE" }, "phone": "010-123 45 67" } }, "cashier": { "id": "601ada97949c9530f2e087c1", "name": "Stangen" }, "sales_recording_system": { "id": "389114001", "name": "Merchant name", "serial_number": "1462-DASDAD-SE" }, "receipt_identifier": { "sequence_number": 68612 }, "time_of_purchase": "2022-04-27T11:59:08.831+02:00", "currency": "SEK", "totals": { "gross": { "amount": 141 }, "vat": { "amount": 15.11, "sub_totals": [ { "amount": 15.11, "taxable_amount": 141, "net_amount": 125.89, "tax_percentage": 12 } ] }, "paid": { "amount": 141, "received": 141, "returned": 0 } }, "items": [ { "sale": { "identifiers": [ { "identifier_type": "pos", "value": "5cc90e04-86c3-4f29-ae02-5146f328c123" } ], "description": "Dirty Burger Dubbel", "quantity": { "value": 1, "unit": "ea" }, "eligible_for_frequent_shopper_points": true, "regular_sales_unit_price": 125, "extended_amount": 125, "tax_percentage": 12, "tax_amount": 13.39, "sequence_number": 1 } }, { "sale": { "identifiers": [ { "identifier_type": "pos", "value": "9b4e4d67-2483-43c8-bbfc-eca1cb68a123" } ], "description": "Béarnaise", "quantity": { "value": 1, "unit": "ea" }, "eligible_for_frequent_shopper_points": true, "regular_sales_unit_price": 16, "extended_amount": 16, "tax_percentage": 12, "tax_amount": 1.71, "sequence_number": 2 } } ], "payments": [ { "amount": 141, "amount_applied_to_bill": 141, "tender": { "creditdebit": { "bank_identification_number": "535583******7361", "acquiring_institution_id_code": "8025689", "retrieval_reference_number": "220427039945", "card_acceptor_id": "47238220", "card_acceptor_terminal_id": "47238220", "card_acceptor_name": "Merchant name", "approval_code": "882875", "card_token": { "value": "709215290212149250", "scheme": "par" } } } } ], "customer": { "loyalty": { "program": "Stammis", "customer_number": "197305105111" }, "id": { "civic_registration_number": "196801249290" } }}Sale — explicit pre-created store, cash payment
A cash sale routed to a store you created in advance: business_unit.service_id references that store. Tender is cash.
{ "business_unit": { "service_id": "012345678901234567890123456789012345678901", "name": "Merchant name", "organization_number": "112233-4499", "unit_id": "466" }, "cashier": { "id": "601ada97949c9530f2e087c1", "name": "Stangen" }, "sales_recording_system": { "id": "389114001", "name": "Merchant name", "serial_number": "1462-DASDAD-SE" }, "receipt_identifier": { "sequence_number": 68613 }, "time_of_purchase": "2022-04-27T12:10:00.000+02:00", "currency": "SEK", "totals": { "gross": { "amount": 141 }, "vat": { "amount": 15.11, "sub_totals": [ { "amount": 15.11, "taxable_amount": 141, "net_amount": 125.89, "tax_percentage": 12 } ] }, "paid": { "amount": 141, "received": 150, "returned": 9 } }, "items": [ { "sale": { "identifiers": [ { "identifier_type": "pos", "value": "5cc90e04-86c3-4f29-ae02-5146f328c123" } ], "description": "Dirty Burger Dubbel", "quantity": { "value": 1, "unit": "ea" }, "eligible_for_frequent_shopper_points": true, "regular_sales_unit_price": 125, "extended_amount": 125, "tax_percentage": 12, "tax_amount": 13.39, "sequence_number": 1 } }, { "sale": { "identifiers": [ { "identifier_type": "pos", "value": "9b4e4d67-2483-43c8-bbfc-eca1cb68a123" } ], "description": "Béarnaise", "quantity": { "value": 1, "unit": "ea" }, "eligible_for_frequent_shopper_points": true, "regular_sales_unit_price": 16, "extended_amount": 16, "tax_percentage": 12, "tax_amount": 1.71, "sequence_number": 2 } } ], "payments": [ { "amount": 141, "amount_applied_to_bill": 141, "tender": { "cash": {} } } ], "customer": { "id": { "phone": "+46701234567" } }}Sale — discount, deposit, control unit and barcode identifier
A richer sale: a two-pack with a volume discount expressed as an item-level price_modifier keyed by direction (a discount with a positive amount), a deposit line (pant), the control_unit block, and an extended (barcode) receipt identifier. totals carries the aggregate modifiers (discount/surcharge magnitudes) alongside gross/net/vat/paid.
{ "business_unit": { "name": "Merchant name", "organization_number": "112233-4499", "unit_id": "466" }, "cashier": { "id": "601ada97949c9530f2e087c1", "name": "Stangen" }, "sales_recording_system": { "id": "389114001", "name": "Merchant name", "serial_number": "1462-DASDAD-SE" }, "receipt_identifier": { "sequence_number": 4402, "extended_number": { "value": "9312345678907", "context": "store" } }, "control_unit": { "id": "SE-CU-0012", "code": "BGXOV2QOHHILXHLPHHXRAYZEKGFNC2BD" }, "time_of_purchase": "2022-04-27T14:02:11.000+02:00", "currency": "SEK", "totals": { "gross": { "amount": 202 }, "modifiers": { "discount": { "amount": 20 } }, "vat": { "amount": 36.4, "sub_totals": [ { "amount": 36.4, "taxable_amount": 182, "net_amount": 145.6, "tax_percentage": 25 } ] }, "net": { "amount": 145.6 }, "paid": { "amount": 182, "received": 182, "returned": 0 } }, "items": [ { "sale": { "identifiers": [ { "identifier_type": "pos", "value": "a1c3f2e0-0001" } ], "description": "Sport T-shirt (2-pack)", "quantity": { "value": 2, "unit": "ea" }, "regular_sales_unit_price": 100, "actual_sales_unit_price": 90, "extended_amount": 180, "modifiers": [ { "discount": { "amount": 20, "reason": "campaign", "description": "Volume discount 2-pack", "percent": 10, "base_amount": 200 } } ], "tax_percentage": 25, "tax_amount": 36, "sequence_number": 1 } }, { "deposit": { "description": "Pant (bottle deposit)", "quantity": 2, "unit_amount": 1, "amount": 2, "tax_percentage": 25, "sequence_number": 2 } } ], "payments": [ { "amount": 182, "amount_applied_to_bill": 182, "tender": { "creditdebit": { "bank_identification_number": "535583******7361", "acquiring_institution_id_code": "8025689", "retrieval_reference_number": "220427039945", "card_acceptor_id": "47238220", "card_acceptor_terminal_id": "47238220", "card_acceptor_name": "Merchant name", "approval_code": "882875", "card_token": { "value": "709215290212149250", "scheme": "par" } } } } ], "customer": { "id": { "phone": "+46701234567" } }}Return — referencing the original sale receipt
A return refunded to card. The returned line references the original sale via receipt_reference; its context (store / chain / global) says at what level the referenced receipt number is unique — use global only when a digital-receipt-provider receipt id is used. Direction is carried by the sign — the return line, the totals, and the payment all use negative amounts, and there is no refund flag.
{ "business_unit": { "service_id": "012345678901234567890123456789012345678901", "name": "Merchant name", "organization_number": "112233-4499", "unit_id": "466" }, "cashier": { "id": "601ada97949c9530f2e087c1", "name": "Stangen" }, "sales_recording_system": { "id": "389114001", "name": "Merchant name", "serial_number": "1462-DASDAD-SE" }, "receipt_identifier": { "sequence_number": 68620 }, "time_of_purchase": "2022-04-28T09:30:00.000+02:00", "currency": "SEK", "totals": { "gross": { "amount": -125 }, "vat": { "amount": -13.39, "sub_totals": [ { "amount": -13.39, "taxable_amount": -125, "net_amount": -111.61, "tax_percentage": 12 } ] }, "paid": { "amount": -125 } }, "items": [ { "return": { "identifiers": [ { "identifier_type": "pos", "value": "5cc90e04-86c3-4f29-ae02-5146f328c123" } ], "description": "Dirty Burger Dubbel", "quantity": { "value": 1, "unit": "ea" }, "extended_amount": -125, "tax_percentage": 12, "tax_amount": -13.39, "receipt_reference": { "value": "68612", "context": "store" }, "sequence_number": 1 } } ], "payments": [ { "amount": -125, "amount_applied_to_bill": -125, "tender": { "creditdebit": { "bank_identification_number": "535583******7361", "acquiring_institution_id_code": "8025689", "retrieval_reference_number": "220427039945", "card_acceptor_id": "47238220", "card_acceptor_terminal_id": "47238220", "card_acceptor_name": "Merchant name", "approval_code": "882875", "card_token": { "value": "709215290212149250", "scheme": "par" } } } } ], "customer": { "loyalty": { "program": "Stammis", "customer_number": "197305105111" }, "id": { "civic_registration_number": "196801249290" } }}Responses
Section titled “Responses”Receipt successfully sent
object
Non-fatal validation findings (warning/info). See Validation feedback above.
One validation finding. See the Receipt validation logic guide.
object
Stable identifier for the check, e.g. items.paid_mismatch.
Error = contract violation (rejected with 400 40020 for opted-in partners); warning/info = non-fatal feedback.
JSON path to the offending field, e.g. payments[0].tender.card_token.
Human-readable description of the finding.
The expected value, for mismatch findings.
The value found, for mismatch findings.
Example
{ "message": "Received receipt", "findings": [ { "code": "transaction.card_token_scheme_not_par", "severity": "info", "path": "payments[0].tender.card_token.scheme", "message": "card_token scheme is \"kivra\"; par is recommended for reliable matching" } ]}Headers
Section titled “Headers”The id of the created receipt
Example
15662258993a2dcd45aba54f9086544f5f97c60ec4The service_id (store id) the receipt was routed to. When the store is auto-created (retail/v2.0 with business_unit.service_id omitted) this is the id of the newly created — or resolved — store, which the caller otherwise has no way to learn.
Example
15594097555922f97bfeb148d6b9a6ef76f76ebdceThe id of the owning chain. Under auto-create, the newly created — or resolved — chain.
Example
15594097552e6dfbe7ca6d4679acd8120c3344cc8cRetained or Greenbin receipt received
object
Base64 encoded QR code
Token
URL to the receipt
object
Example
{ "data": "base64-encoded-qr-code", "token": "token", "url": "https://url-to-receipt"}Headers
Section titled “Headers”The id of the retained receipt. Not applicable for greenbin receipts
Example
15662258993a2dcd45aba54f9086544f5f97c60ec4The service_id (store id) the receipt was routed to. When the store is auto-created (retail/v2.0 with business_unit.service_id omitted) this is the id of the newly created — or resolved — store, which the caller otherwise has no way to learn.
Example
15594097555922f97bfeb148d6b9a6ef76f76ebdceThe id of the owning chain. Under auto-create, the newly created — or resolved — chain.
Example
15594097552e6dfbe7ca6d4679acd8120c3344cc8cBad request
object
Examples
{ "error_code": "40000", "short_message": "bad_request", "long_message": "body is missing required fields or has invalid fields"}{ "error_code": "40002", "short_message": "bad request", "long_message": "unsupported content type header"}Unauthorized access
object
Examples
{ "error_code": "40100", "short_message": "unauthorized", "long_message": "permission denied"}Not found
object
Examples
{ "error_code": "40400", "short_message": "not found", "long_message": "the requested resource could not be found", "error_detail": "invalid service_id"}Internal server error
object
Example
{ "error_code": "50000", "short_message": "internal server error", "long_message": "unknown error ocurred"}