Introduction
The Payer REST API enables you to create magic payment experiences - based on your customers needs. It puts you in the driver's seat with full control of the flow.
Each service has its own set of functions that delivers value individually and can be applied - before, during and after the order moment. This enables you to use the functions to deliver value just in the right micro-moment throughout your customer’s journey.
Even though the services can create value when used individually, combined, you can create magic.
Take command and use single functions or combos in your scenario in the right micro-moment and generate maximum value.
In need of some inspiration or don’t know where to start? Don’t hesitate to contact us for guidance, tips & tricks or examples of experiences to start from
Integration guidelines
Formats
- All amounts are in cents, e.g. if you're using USD the amounts will be in cent
- ISO-8601 Standard for date and time stamps.
- UTF-8 text encoding.
VAT
When specifying prices of items in Orders, the unitPrice and subtotalPrice fields are specified including VAT.
Non-breaking updates of the API
When using Payers API, your service should allow for dynamic changes. Such as:
- New valid values for enums may be added.
- New fields may be added to a response.
Retrying requests
When sending a non-GET HTTP request to the API, you can add a Payer-Request-ID header
with a unique UUID to the request. This header allows you to retry the request (using the
same Payer-Request-ID) if you're unsure whether or not Payer successfully handled the
request. For example, if there was a network problem so that you couldn't receive the
response to the request.
If the request has already been handled, a 409 Conflict will be returned.
GET requests are excluded from this mechanism, since it's always safe to do GET requests
multiple times.
Authentication
Payer B2B uses authentication with a OAuth2 Bearer token for all endpoints except the
authentication endpoint. For <credentials>, we use the Base64-encoded string of
clientId:clientSecret. On macOS/Linux you can generate it with:
echo -n clientId:clientSecret | base64On Windows, you can use certutil -encode.
Use the following command with your <credentials> to authenticate:
curl -X POST \
https://b2b.payer.se/oauth2/token \
-H 'Accept: application/json' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d grant_type=client_credentials
The POST will return a JSON response containing an OAuth2 Bearer token:
{
"access_token": "some-very-long-token",
"expires_in": 3599,
"scope": "",
"token_type": "bearer"
}For all other endpoints in Payer B2B, use the access_token from the response as OAuth2
Bearer token with the HTTP header Authorization: Bearer <some-very-long-token>.
The token expires in one hour. You will notice this in the form of a 401 Unauthorized reply to a request. You should act on this reply by performing a re-authentication and then retrying the request. You are also free to keep track of the token age yourself and renew before it expires.
Common authentication errors
If you are not able to access the API, some possible errors are:
- The access token was not provided in the
Authorizationheader. - The
Authorizationheader was not prefixed withBearer. - The access token has expired. Generate a new token and perform the request again.
- You are not allowed to access the API. Contact Payer if you need access to additional APIs.
If you have other issues with authentication, contact Payer for assistance.
Generated server url
Invoices V2
API
Sends a copy of an invoice.
| object | object | ||
| address | object | ||
| city | string | ||
| coAddress | string | ||
| companyName | string | ||
| countryCode | string | Enum: | |
| firstName | string | ||
| houseAddress | string | ||
| lastName | string | ||
| state | string | ||
| streetAddress1 | string | ||
| streetAddress2 | string | ||
| title | string | ||
| yourReference | string | ||
| zipCode | string | ||
| deliveryType | string | Enum: | |
| emailCC | array[string] | ||
| emailTo | string | ||
| gln | string | ||
| invoiceNumber | int64 | ||
| smsNumber | string |
xxxxxxxxxxcurl --request PUT \ --url 'https://b2b.payer.se/api/v2/orders/invoices/send' \ --header 'Authorization: Bearer {token}' \ --data '{ "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "firstName": "{string}", "houseAddress": "{string}", "lastName": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "deliveryType": "{string}", "emailCC": [ "{array[string]...}" ], "emailTo": "{string}", "gln": "{string}", "invoiceNumber": "{int64}", "smsNumber": "{string}"}'OK
| No response body |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxxNo responsePays out the outstanding amount from a credit invoice back to the party that made the original payment.
It is only possible to use credit invoices created with API V2.
| object | object | ||
| invoiceNumber | int64 |
xxxxxxxxxxcurl --request POST \ --url 'https://b2b.payer.se/api/v2/orders/invoices/payout-credit' \ --header 'Authorization: Bearer {token}' \ --data '{ "invoiceNumber": "{int64}"}'OK
| object | object | ||
| amount | int64 | ||
| bankAccountPayout | object | If the payout is performed directly to a bank account, this field will be present | |
| maskedAccountNumber | string | The last digits of the account number that the payout is to, to help verification without showing sensitive data | |
| payoutJobId | string | ||
| transactionMessage | string | ||
| currencyCode | string | Enum: |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxx{ "amount": "{int64}", "bankAccountPayout": { "maskedAccountNumber": "5432", "payoutJobId": "5f838d38-895c-4dbc-88f7-07d9794dfbff", "transactionMessage": "5f838d3 The Merchant Name" }, "currencyCode": "{string}"}Pays an invoice with an outstanding amount from a credit invoice.
It is only possible to use invoices and credit invoices created with API V2.
| object | object | ||
| amount | int64 | minimum: 1 | |
| creditInvoiceNumber | int64 | ||
| toPayInvoiceAggregationId | string | The Monthly Invoice Statement that should be paid. One of toPayInvoiceNumber and toPayInvoiceAggregationId is required. | |
| toPayInvoiceNumber | int64 | The Invoice that should be paid. One of toPayInvoiceNumber and toPayInvoiceAggregationId is required. |
xxxxxxxxxxcurl --request POST \ --url 'https://b2b.payer.se/api/v2/orders/invoices/pay-with-credit' \ --header 'Authorization: Bearer {token}' \ --data '{ "amount": "{int64}", "creditInvoiceNumber": "{int64}", "toPayInvoiceAggregationId": "{string}", "toPayInvoiceNumber": "{int64}"}'OK
| No response body |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxxNo responseCreates a credit invoice with items that credits items from the original invoice, items to be credited are identified by item position.
An Invoice created with the V2 API can only be credited using the V2 API A credit invoice can be linked to the original invoice or it can be standalone. When using the standalone credit invoice as payment for another invoice, the original invoice will not be affected - no debt will be added to the original invoice. Either invoiceNumber or referenceId must be provided
| object | object | ||
| externalInvoiceNumber | string | Optional external invoiceNumber when this credit invoice is a mirror of credit invoice in an external system. Must be unique. maxLength: 36 minLength: 0 | |
| invoiceDate | date | Invoice date can not be in the future. If not specified, defaults to today. | |
| invoiceNumber | int64 | Required if no referenceId is provided. | |
| items | array[object] | Positions and quantities to be credited from the original invoice | |
| position | int32 | ||
| quantity | number | minimum: 0 | |
| referenceId | string | Required if no invoiceNumber is provided. maxLength: 64 minLength: 0 | |
| standalone | boolean | true means that this credit invoice will be a standalone credit invoice with no link to the original invoice. |
xxxxxxxxxxcurl --request POST \ --url 'https://b2b.payer.se/api/v2/orders/invoices/credit/partial' \ --header 'Authorization: Bearer {token}' \ --data '{ "externalInvoiceNumber": "54321-abcd-1", "invoiceDate": "2019-01-01", "invoiceNumber": "{int64}", "items": [ { "position": "{int32}", "quantity": "{number}" } ], "referenceId": "{string}", "standalone": "{boolean}"}'OK
| object | object | ||
| invoice | object | ||
| amountToPay | int64 | Amount to pay in cents, 10 SEK = 1000 | |
| balance | int64 | Balance of the invoice. A positive value means that there's outstanding amount for buyer to pay to seller. In cents, 10 SEK = 1000 | |
| calculationMode | string | Enum: | |
| countryCode | string | Enum: | |
| creditedAmount | int64 | ||
| creditsInvoiceWithInvoiceNumber | int64 | If this is a credit invoice, this will be the invoice number of the original invoice | |
| currencyCode | string | Enum: | |
| deliveryType | string | Enum: | |
| dueDate | date | ||
| externalInvoiceNumber | string | ||
| feeBalance | int64 | ||
| invoiceCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| invoiceDate | date | ||
| invoiceNumber | string | ||
| invoicePdfUrl | string | ||
| invoicePeriod | object | ||
| endDate | date | Indicate the end date of this invoice period | |
| startDate | date | Indicate the start date of this invoice period | |
| isOverdue | boolean | ||
| items | |||
| object | object | ||
| additionalDetail | string | ||
| articleNumber | string | Mandatory for FREEFORM line items. | |
| calculationMode | string | Identifies which of the three Item calculation modes that this item uses. Hint: Use a deserializer that supports polymorphic deserialization and let it use this attribute to decide which sub model to use. Enum: | |
| costCenter | string | ||
| description | string | ||
| itemType | string | Enum: | |
| position | int32 | ||
| quantity | number | Maximum 6 decimals. | |
| salesAccountCode | int32 | ||
| unit | string | ||
| vatAccountCode | int32 | ||
| unitPriceExcludingVat | number | Unit price in decimal form, excluding VAT. Maximum 6 decimals. | |
| vatPercentage | number | VAT percentage in decimal form. Maximum 2 decimals. | |
| orderApproveDate | date-time | ||
| orderId | int64 | ||
| orderReferenceId | string | ||
| orderStatus | string | Enum: | |
| ourReference | string | ||
| parentInvoiceNumber | int64 | ||
| paymentBankAccounts | array[object] | ||
| accountHolderCountry | string | Enum: | |
| accountHolderName | string | ||
| accountNumber | string | ||
| bic | string | ||
| type | string | Enum: | |
| paymentStatus | string | Enum: | |
| payments | array[object] | ||
| amount | int64 | Amount in cents, 10 SEK = 1000 | |
| bookingDate | date | Always the date the payment was booked on the account. | |
| currencyCode | string | Enum: | |
| effectiveBookingDate | date | The date the payment was booked on the account, unless it was manually mapped. In that case it is the date the mapping was done. | |
| paymentDate | date-time | ||
| referenceNumber | string | ||
| type | string | Enum: | |
| project | string | ||
| publicInvoiceUrl | string | ||
| referenceNumber | string | ||
| reminders | array[object] | ||
| creationTime | date-time | ||
| deliveryTypes | array[string] | Enum: | |
| modifiedTime | date-time | ||
| reminderNumber | int32 | ||
| remindersAreCancelled | boolean | ||
| sellingCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| site | string | ||
| status | string | Enum: | |
| storeId | string | Deprecated. Use 'site' instead. | |
| type | string | Enum: | |
| uniqueId | string | ||
| websiteInvoiceSeqNo | int64 |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxx{ "invoice": { "amountToPay": 1000, "balance": 1000, "calculationMode": "{string}", "countryCode": "{string}", "creditedAmount": "{int64}", "creditsInvoiceWithInvoiceNumber": "{int64}", "currencyCode": "{string}", "deliveryType": "{string}", "dueDate": "2019-01-01", "externalInvoiceNumber": "{string}", "feeBalance": "{int64}", "invoiceCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "invoiceDate": "2019-01-01", "invoiceNumber": "{string}", "invoicePdfUrl": "{string}", "invoicePeriod": { "endDate": "2019-01-01", "startDate": "2019-01-01" }, "isOverdue": "{boolean}", "items": [ { "additionalDetail": "{string}", "articleNumber": "10", "calculationMode": "INC_VAT_ROUNDING_PER_ROW", "costCenter": "{string}", "description": "{string}", "itemType": "{string}", "position": "{int32}", "quantity": 10, "salesAccountCode": "{int32}", "unit": "{string}", "vatAccountCode": "{int32}", "unitPriceExcludingVat": 199.99, "vatPercentage": 25 } ], "orderApproveDate": "{date-time}", "orderId": "{int64}", "orderReferenceId": "{string}", "orderStatus": "{string}", "ourReference": "{string}", "parentInvoiceNumber": "{int64}", "paymentBankAccounts": [ { "accountHolderCountry": "{string}", "accountHolderName": "{string}", "accountNumber": "{string}", "bic": "{string}", "type": "{string}" } ], "paymentStatus": "{string}", "payments": [ { "amount": 1000, "bookingDate": "2019-01-01", "currencyCode": "{string}", "effectiveBookingDate": "2019-01-01", "paymentDate": "{date-time}", "referenceNumber": "{string}", "type": "{string}" } ], "project": "{string}", "publicInvoiceUrl": "{string}", "referenceNumber": "{string}", "reminders": [ { "creationTime": "{date-time}", "deliveryTypes": [ "{array[string]...}" ], "modifiedTime": "{date-time}", "reminderNumber": "{int32}" } ], "remindersAreCancelled": "{boolean}", "sellingCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "site": "{string}", "status": "{string}", "storeId": "{string}", "type": "{string}", "uniqueId": "{string}", "websiteInvoiceSeqNo": "{int64}" }}Returns a credit invoice for given line items.
An Invoice created with the V2 API can only be credited using the V2 API A credit invoice can be linked to the original invoice or it can be standalone. When using the standalone credit invoice as payment for another invoice, the original invoice will not be affected - no debt will be added to the original invoice. Either invoiceNumber or referenceId must be provided
| object | object | ||
| deliveryType | string | Enum: | |
| externalInvoiceNumber | string | Optional external invoiceNumber when this credit invoice is a mirror of credit invoice in an external system. Must be unique. maxLength: 36 minLength: 0 | |
| invoiceDate | date | Invoice date can not be in the future. If not specified, defaults to today. | |
| invoiceNumber | int64 | Required if no referenceId is provided. | |
| items | array[object] | List of the items to be included on the credit invoice. All subtotalPrices will be negated. | |
| additionalDetail | string | maxLength: 48 minLength: 0 | |
| articleNumber | string | Mandatory for FREEFORM line items. maxLength: 64 minLength: 0 | |
| costCenter | string | maxLength: 48 minLength: 0 | |
| description | string | maxLength: 128 minLength: 0 | |
| ean | string | maxLength: 64 minLength: 0 | |
| itemType | string | Use itemType FREEFORM in item for articles to be paid. Use itemType INFOLINE if you want to add information after or before an order row to complement with free text. The position set in the items handles in which order items are shown in the invoice. When using INFOLINE, the following fields are hidden if the order results in an invoice: articleNumber, price, vat, quantity Enum: | |
| position | int32 | ||
| quantity | int32 | Needs to be at least 1 minimum: 1 | |
| salesAccountCode | int32 | For FREEFORM lines with a quantity != 0, if this is set, it must be between 1000-9999 | |
| subtotalPrice | int64 | Subtotal price including VAT in cents, 10 SEK = 1000 | |
| subtotalVatAmount | int64 | Subtotal VAT amount in cents, 10 SEK = 1000 | |
| unit | string | maxLength: 16 minLength: 0 | |
| unitPrice | int64 | Unit price in cents including VAT, 10 SEK = 1000 | |
| unitVatAmount | int64 | Unit VAT amount in cents, 10 SEK = 1000 | |
| uri | string | maxLength: 248 minLength: 0 | |
| vatAccountCode | int32 | ||
| vatPercentage | int32 | VAT percentage in cents, 25% = 2500 | |
| referenceId | string | Required if no invoiceNumber is provided. maxLength: 64 minLength: 0 | |
| standalone | boolean | true means that this credit invoice will be a standalone credit invoice with no link to the original invoice. |
xxxxxxxxxxcurl --request POST \ --url 'https://b2b.payer.se/api/v2/orders/invoices/credit/manual' \ --header 'Authorization: Bearer {token}' \ --data '{ "deliveryType": "{string}", "externalInvoiceNumber": "54321-abcd-1", "invoiceDate": "2019-01-01", "invoiceNumber": "{int64}", "items": [ { "additionalDetail": "{string}", "articleNumber": "10", "costCenter": "{string}", "description": "{string}", "ean": "{string}", "itemType": "{string}", "position": "{int32}", "quantity": 10, "salesAccountCode": 2150, "subtotalPrice": 1250, "subtotalVatAmount": 250, "unit": "{string}", "unitPrice": 125, "unitVatAmount": 25, "uri": "{string}", "vatAccountCode": "{int32}", "vatPercentage": 2500 } ], "referenceId": "{string}", "standalone": "{boolean}"}'OK
| object | object | ||
| invoice | object | ||
| amountToPay | int64 | Amount to pay in cents, 10 SEK = 1000 | |
| balance | int64 | Balance of the invoice. A positive value means that there's outstanding amount for buyer to pay to seller. In cents, 10 SEK = 1000 | |
| calculationMode | string | Enum: | |
| countryCode | string | Enum: | |
| creditedAmount | int64 | ||
| creditsInvoiceWithInvoiceNumber | int64 | If this is a credit invoice, this will be the invoice number of the original invoice | |
| currencyCode | string | Enum: | |
| deliveryType | string | Enum: | |
| dueDate | date | ||
| externalInvoiceNumber | string | ||
| feeBalance | int64 | ||
| invoiceCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| invoiceDate | date | ||
| invoiceNumber | string | ||
| invoicePdfUrl | string | ||
| invoicePeriod | object | ||
| endDate | date | Indicate the end date of this invoice period | |
| startDate | date | Indicate the start date of this invoice period | |
| isOverdue | boolean | ||
| items | |||
| object | object | ||
| additionalDetail | string | ||
| articleNumber | string | Mandatory for FREEFORM line items. | |
| calculationMode | string | Identifies which of the three Item calculation modes that this item uses. Hint: Use a deserializer that supports polymorphic deserialization and let it use this attribute to decide which sub model to use. Enum: | |
| costCenter | string | ||
| description | string | ||
| itemType | string | Enum: | |
| position | int32 | ||
| quantity | number | Maximum 6 decimals. | |
| salesAccountCode | int32 | ||
| unit | string | ||
| vatAccountCode | int32 | ||
| unitPriceExcludingVat | number | Unit price in decimal form, excluding VAT. Maximum 6 decimals. | |
| vatPercentage | number | VAT percentage in decimal form. Maximum 2 decimals. | |
| orderApproveDate | date-time | ||
| orderId | int64 | ||
| orderReferenceId | string | ||
| orderStatus | string | Enum: | |
| ourReference | string | ||
| parentInvoiceNumber | int64 | ||
| paymentBankAccounts | array[object] | ||
| accountHolderCountry | string | Enum: | |
| accountHolderName | string | ||
| accountNumber | string | ||
| bic | string | ||
| type | string | Enum: | |
| paymentStatus | string | Enum: | |
| payments | array[object] | ||
| amount | int64 | Amount in cents, 10 SEK = 1000 | |
| bookingDate | date | Always the date the payment was booked on the account. | |
| currencyCode | string | Enum: | |
| effectiveBookingDate | date | The date the payment was booked on the account, unless it was manually mapped. In that case it is the date the mapping was done. | |
| paymentDate | date-time | ||
| referenceNumber | string | ||
| type | string | Enum: | |
| project | string | ||
| publicInvoiceUrl | string | ||
| referenceNumber | string | ||
| reminders | array[object] | ||
| creationTime | date-time | ||
| deliveryTypes | array[string] | Enum: | |
| modifiedTime | date-time | ||
| reminderNumber | int32 | ||
| remindersAreCancelled | boolean | ||
| sellingCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| site | string | ||
| status | string | Enum: | |
| storeId | string | Deprecated. Use 'site' instead. | |
| type | string | Enum: | |
| uniqueId | string | ||
| websiteInvoiceSeqNo | int64 |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxx{ "invoice": { "amountToPay": 1000, "balance": 1000, "calculationMode": "{string}", "countryCode": "{string}", "creditedAmount": "{int64}", "creditsInvoiceWithInvoiceNumber": "{int64}", "currencyCode": "{string}", "deliveryType": "{string}", "dueDate": "2019-01-01", "externalInvoiceNumber": "{string}", "feeBalance": "{int64}", "invoiceCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "invoiceDate": "2019-01-01", "invoiceNumber": "{string}", "invoicePdfUrl": "{string}", "invoicePeriod": { "endDate": "2019-01-01", "startDate": "2019-01-01" }, "isOverdue": "{boolean}", "items": [ { "additionalDetail": "{string}", "articleNumber": "10", "calculationMode": "INC_VAT_ROUNDING_PER_ROW", "costCenter": "{string}", "description": "{string}", "itemType": "{string}", "position": "{int32}", "quantity": 10, "salesAccountCode": "{int32}", "unit": "{string}", "vatAccountCode": "{int32}", "unitPriceExcludingVat": 199.99, "vatPercentage": 25 } ], "orderApproveDate": "{date-time}", "orderId": "{int64}", "orderReferenceId": "{string}", "orderStatus": "{string}", "ourReference": "{string}", "parentInvoiceNumber": "{int64}", "paymentBankAccounts": [ { "accountHolderCountry": "{string}", "accountHolderName": "{string}", "accountNumber": "{string}", "bic": "{string}", "type": "{string}" } ], "paymentStatus": "{string}", "payments": [ { "amount": 1000, "bookingDate": "2019-01-01", "currencyCode": "{string}", "effectiveBookingDate": "2019-01-01", "paymentDate": "{date-time}", "referenceNumber": "{string}", "type": "{string}" } ], "project": "{string}", "publicInvoiceUrl": "{string}", "referenceNumber": "{string}", "reminders": [ { "creationTime": "{date-time}", "deliveryTypes": [ "{array[string]...}" ], "modifiedTime": "{date-time}", "reminderNumber": "{int32}" } ], "remindersAreCancelled": "{boolean}", "sellingCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "site": "{string}", "status": "{string}", "storeId": "{string}", "type": "{string}", "uniqueId": "{string}", "websiteInvoiceSeqNo": "{int64}" }}Returns a credit invoice for the full amount of the provided invoice.
An Invoice created with the V2 API can only be credited using the V2 API A credit invoice can be linked to the original invoice or it can be standalone. When using the standalone credit invoice as payment for another invoice, the original invoice will not be affected - no debt will be added to the original invoice. Either invoiceNumber or referenceId must be provided
| object | object | ||
| deliveryType | string | Optional delivery type. If not specified, the delivery type of the referenced invoice will be used Enum: | |
| externalInvoiceNumber | string | Optional external invoiceNumber when this invoice is a mirror of an invoice in an external system. Must be unique. maxLength: 36 minLength: 0 | |
| invoiceDate | date | Invoice date can not be in the future. If not specified, defaults to today. | |
| invoiceNumber | int64 | Required if no referenceId is provided. | |
| referenceId | string | Required if no invoiceNumber is provided. maxLength: 64 minLength: 0 | |
| standalone | boolean | true means that this credit invoice will be a standalone credit invoice with no link to the original invoice. |
xxxxxxxxxxcurl --request POST \ --url 'https://b2b.payer.se/api/v2/orders/invoices/credit/full' \ --header 'Authorization: Bearer {token}' \ --data '{ "deliveryType": "EMAIL", "externalInvoiceNumber": "54321-abcd-1", "invoiceDate": "2019-01-01", "invoiceNumber": "{int64}", "referenceId": "{string}", "standalone": "{boolean}"}'OK
| object | object | ||
| invoice | object | ||
| amountToPay | int64 | Amount to pay in cents, 10 SEK = 1000 | |
| balance | int64 | Balance of the invoice. A positive value means that there's outstanding amount for buyer to pay to seller. In cents, 10 SEK = 1000 | |
| calculationMode | string | Enum: | |
| countryCode | string | Enum: | |
| creditedAmount | int64 | ||
| creditsInvoiceWithInvoiceNumber | int64 | If this is a credit invoice, this will be the invoice number of the original invoice | |
| currencyCode | string | Enum: | |
| deliveryType | string | Enum: | |
| dueDate | date | ||
| externalInvoiceNumber | string | ||
| feeBalance | int64 | ||
| invoiceCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| invoiceDate | date | ||
| invoiceNumber | string | ||
| invoicePdfUrl | string | ||
| invoicePeriod | object | ||
| endDate | date | Indicate the end date of this invoice period | |
| startDate | date | Indicate the start date of this invoice period | |
| isOverdue | boolean | ||
| items | |||
| object | object | ||
| additionalDetail | string | ||
| articleNumber | string | Mandatory for FREEFORM line items. | |
| calculationMode | string | Identifies which of the three Item calculation modes that this item uses. Hint: Use a deserializer that supports polymorphic deserialization and let it use this attribute to decide which sub model to use. Enum: | |
| costCenter | string | ||
| description | string | ||
| itemType | string | Enum: | |
| position | int32 | ||
| quantity | number | Maximum 6 decimals. | |
| salesAccountCode | int32 | ||
| unit | string | ||
| vatAccountCode | int32 | ||
| unitPriceExcludingVat | number | Unit price in decimal form, excluding VAT. Maximum 6 decimals. | |
| vatPercentage | number | VAT percentage in decimal form. Maximum 2 decimals. | |
| orderApproveDate | date-time | ||
| orderId | int64 | ||
| orderReferenceId | string | ||
| orderStatus | string | Enum: | |
| ourReference | string | ||
| parentInvoiceNumber | int64 | ||
| paymentBankAccounts | array[object] | ||
| accountHolderCountry | string | Enum: | |
| accountHolderName | string | ||
| accountNumber | string | ||
| bic | string | ||
| type | string | Enum: | |
| paymentStatus | string | Enum: | |
| payments | array[object] | ||
| amount | int64 | Amount in cents, 10 SEK = 1000 | |
| bookingDate | date | Always the date the payment was booked on the account. | |
| currencyCode | string | Enum: | |
| effectiveBookingDate | date | The date the payment was booked on the account, unless it was manually mapped. In that case it is the date the mapping was done. | |
| paymentDate | date-time | ||
| referenceNumber | string | ||
| type | string | Enum: | |
| project | string | ||
| publicInvoiceUrl | string | ||
| referenceNumber | string | ||
| reminders | array[object] | ||
| creationTime | date-time | ||
| deliveryTypes | array[string] | Enum: | |
| modifiedTime | date-time | ||
| reminderNumber | int32 | ||
| remindersAreCancelled | boolean | ||
| sellingCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| site | string | ||
| status | string | Enum: | |
| storeId | string | Deprecated. Use 'site' instead. | |
| type | string | Enum: | |
| uniqueId | string | ||
| websiteInvoiceSeqNo | int64 |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxx{ "invoice": { "amountToPay": 1000, "balance": 1000, "calculationMode": "{string}", "countryCode": "{string}", "creditedAmount": "{int64}", "creditsInvoiceWithInvoiceNumber": "{int64}", "currencyCode": "{string}", "deliveryType": "{string}", "dueDate": "2019-01-01", "externalInvoiceNumber": "{string}", "feeBalance": "{int64}", "invoiceCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "invoiceDate": "2019-01-01", "invoiceNumber": "{string}", "invoicePdfUrl": "{string}", "invoicePeriod": { "endDate": "2019-01-01", "startDate": "2019-01-01" }, "isOverdue": "{boolean}", "items": [ { "additionalDetail": "{string}", "articleNumber": "10", "calculationMode": "INC_VAT_ROUNDING_PER_ROW", "costCenter": "{string}", "description": "{string}", "itemType": "{string}", "position": "{int32}", "quantity": 10, "salesAccountCode": "{int32}", "unit": "{string}", "vatAccountCode": "{int32}", "unitPriceExcludingVat": 199.99, "vatPercentage": 25 } ], "orderApproveDate": "{date-time}", "orderId": "{int64}", "orderReferenceId": "{string}", "orderStatus": "{string}", "ourReference": "{string}", "parentInvoiceNumber": "{int64}", "paymentBankAccounts": [ { "accountHolderCountry": "{string}", "accountHolderName": "{string}", "accountNumber": "{string}", "bic": "{string}", "type": "{string}" } ], "paymentStatus": "{string}", "payments": [ { "amount": 1000, "bookingDate": "2019-01-01", "currencyCode": "{string}", "effectiveBookingDate": "2019-01-01", "paymentDate": "{date-time}", "referenceNumber": "{string}", "type": "{string}" } ], "project": "{string}", "publicInvoiceUrl": "{string}", "referenceNumber": "{string}", "reminders": [ { "creationTime": "{date-time}", "deliveryTypes": [ "{array[string]...}" ], "modifiedTime": "{date-time}", "reminderNumber": "{int32}" } ], "remindersAreCancelled": "{boolean}", "sellingCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "site": "{string}", "status": "{string}", "storeId": "{string}", "type": "{string}", "uniqueId": "{string}", "websiteInvoiceSeqNo": "{int64}" }}Returns an invoice for a given invoice number
Note: By default, the invoice is returned in Inc-Vat format, even if the invoice was originally created with a different calculation mode. Please use the originalCalculationModeResponse flag if you don't want that. Also note: An Invoice created with the V2 API can only be fetched using the V2 API.
| invoiceNumber | integer | ||
| referenceId | string | maxLength: 64 minLength: 0 | |
| externalInvoiceNumber | string | ||
| originalCalculationModeResponse | boolean | The Items in the response are normally returned in the Inc-Vat format, even if the invoice was originally created with a different calculation mode. This flag makes it possible to get the Items in their original calculation mode in the response. If you enable this it's suggested that you use a deserializer that supports polymorphic deserialization and let the it use the Item 'calculationMode' attribute to decide which sub model to use. |
xxxxxxxxxxcurl --get \ --url 'https://b2b.payer.se/api/v2/orders/invoices' \ --header 'Authorization: Bearer {token}' \ --data invoiceNumber={invoiceNumber} \ --data referenceId={referenceId} \ --data externalInvoiceNumber={externalInvoiceNumber} \ --data originalCalculationModeResponse={originalCalculationModeResponse}OK
| object | object | ||
| invoice | object | ||
| amountToPay | int64 | Amount to pay in cents, 10 SEK = 1000 | |
| balance | int64 | Balance of the invoice. A positive value means that there's outstanding amount for buyer to pay to seller. In cents, 10 SEK = 1000 | |
| calculationMode | string | Enum: | |
| countryCode | string | Enum: | |
| creditedAmount | int64 | ||
| creditsInvoiceWithInvoiceNumber | int64 | If this is a credit invoice, this will be the invoice number of the original invoice | |
| currencyCode | string | Enum: | |
| deliveryType | string | Enum: | |
| dueDate | date | ||
| externalInvoiceNumber | string | ||
| feeBalance | int64 | ||
| invoiceCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| invoiceDate | date | ||
| invoiceNumber | string | ||
| invoicePdfUrl | string | ||
| invoicePeriod | object | ||
| endDate | date | Indicate the end date of this invoice period | |
| startDate | date | Indicate the start date of this invoice period | |
| isOverdue | boolean | ||
| items | |||
| object | object | ||
| additionalDetail | string | ||
| articleNumber | string | Mandatory for FREEFORM line items. | |
| calculationMode | string | Identifies which of the three Item calculation modes that this item uses. Hint: Use a deserializer that supports polymorphic deserialization and let it use this attribute to decide which sub model to use. Enum: | |
| costCenter | string | ||
| description | string | ||
| itemType | string | Enum: | |
| position | int32 | ||
| quantity | number | Maximum 6 decimals. | |
| salesAccountCode | int32 | ||
| unit | string | ||
| vatAccountCode | int32 | ||
| unitPriceExcludingVat | number | Unit price in decimal form, excluding VAT. Maximum 6 decimals. | |
| vatPercentage | number | VAT percentage in decimal form. Maximum 2 decimals. | |
| orderApproveDate | date-time | ||
| orderId | int64 | ||
| orderReferenceId | string | ||
| orderStatus | string | Enum: | |
| ourReference | string | ||
| parentInvoiceNumber | int64 | ||
| paymentBankAccounts | array[object] | ||
| accountHolderCountry | string | Enum: | |
| accountHolderName | string | ||
| accountNumber | string | ||
| bic | string | ||
| type | string | Enum: | |
| paymentStatus | string | Enum: | |
| payments | array[object] | ||
| amount | int64 | Amount in cents, 10 SEK = 1000 | |
| bookingDate | date | Always the date the payment was booked on the account. | |
| currencyCode | string | Enum: | |
| effectiveBookingDate | date | The date the payment was booked on the account, unless it was manually mapped. In that case it is the date the mapping was done. | |
| paymentDate | date-time | ||
| referenceNumber | string | ||
| type | string | Enum: | |
| project | string | ||
| publicInvoiceUrl | string | ||
| referenceNumber | string | ||
| reminders | array[object] | ||
| creationTime | date-time | ||
| deliveryTypes | array[string] | Enum: | |
| modifiedTime | date-time | ||
| reminderNumber | int32 | ||
| remindersAreCancelled | boolean | ||
| sellingCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| site | string | ||
| status | string | Enum: | |
| storeId | string | Deprecated. Use 'site' instead. | |
| type | string | Enum: | |
| uniqueId | string | ||
| websiteInvoiceSeqNo | int64 |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxx{ "invoice": { "amountToPay": 1000, "balance": 1000, "calculationMode": "{string}", "countryCode": "{string}", "creditedAmount": "{int64}", "creditsInvoiceWithInvoiceNumber": "{int64}", "currencyCode": "{string}", "deliveryType": "{string}", "dueDate": "2019-01-01", "externalInvoiceNumber": "{string}", "feeBalance": "{int64}", "invoiceCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "invoiceDate": "2019-01-01", "invoiceNumber": "{string}", "invoicePdfUrl": "{string}", "invoicePeriod": { "endDate": "2019-01-01", "startDate": "2019-01-01" }, "isOverdue": "{boolean}", "items": [ { "additionalDetail": "{string}", "articleNumber": "10", "calculationMode": "INC_VAT_ROUNDING_PER_ROW", "costCenter": "{string}", "description": "{string}", "itemType": "{string}", "position": "{int32}", "quantity": 10, "salesAccountCode": "{int32}", "unit": "{string}", "vatAccountCode": "{int32}", "unitPriceExcludingVat": 199.99, "vatPercentage": 25 } ], "orderApproveDate": "{date-time}", "orderId": "{int64}", "orderReferenceId": "{string}", "orderStatus": "{string}", "ourReference": "{string}", "parentInvoiceNumber": "{int64}", "paymentBankAccounts": [ { "accountHolderCountry": "{string}", "accountHolderName": "{string}", "accountNumber": "{string}", "bic": "{string}", "type": "{string}" } ], "paymentStatus": "{string}", "payments": [ { "amount": 1000, "bookingDate": "2019-01-01", "currencyCode": "{string}", "effectiveBookingDate": "2019-01-01", "paymentDate": "{date-time}", "referenceNumber": "{string}", "type": "{string}" } ], "project": "{string}", "publicInvoiceUrl": "{string}", "referenceNumber": "{string}", "reminders": [ { "creationTime": "{date-time}", "deliveryTypes": [ "{array[string]...}" ], "modifiedTime": "{date-time}", "reminderNumber": "{int32}" } ], "remindersAreCancelled": "{boolean}", "sellingCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "site": "{string}", "status": "{string}", "storeId": "{string}", "type": "{string}", "uniqueId": "{string}", "websiteInvoiceSeqNo": "{int64}" }}Returns invoices where the invoice customer have the given reg number or vat id
Batch size is 20. If more invoices exists, the next invoice number is returned to be used in future requests. Note: By default, the invoice is returned in Inc-Vat format, even if the invoice was originally created with a different calculation mode. Please use the originalCalculationModeResponse flag if you don't want that. Also note: An Invoice created with the V2 API can only be fetched using the V2 API.
| regNumber | string | ||
| customerVatId | string | ||
| fromInvoiceNumber | integer | ||
| originalCalculationModeResponse | boolean | The Items in the response are normally returned in the Inc-Vat format, even if the invoice was originally created with a different calculation mode. This flag makes it possible to get the Items in their original calculation mode in the response. If you enable this it's suggested that you use a deserializer that supports polymorphic deserialization and let the it use the Item 'calculationMode' attribute to decide which sub model to use. |
xxxxxxxxxxcurl --get \ --url 'https://b2b.payer.se/api/v2/orders/invoices/reg-number' \ --header 'Authorization: Bearer {token}' \ --data regNumber={regNumber} \ --data customerVatId={customerVatId} \ --data fromInvoiceNumber={fromInvoiceNumber} \ --data originalCalculationModeResponse={originalCalculationModeResponse}OK
| object | object | ||
| invoices | array[object] | ||
| amountToPay | int64 | Amount to pay in cents, 10 SEK = 1000 | |
| balance | int64 | Balance of the invoice. A positive value means that there's outstanding amount for buyer to pay to seller. In cents, 10 SEK = 1000 | |
| calculationMode | string | Enum: | |
| countryCode | string | Enum: | |
| creditedAmount | int64 | ||
| creditsInvoiceWithInvoiceNumber | int64 | If this is a credit invoice, this will be the invoice number of the original invoice | |
| currencyCode | string | Enum: | |
| deliveryType | string | Enum: | |
| dueDate | date | ||
| externalInvoiceNumber | string | ||
| feeBalance | int64 | ||
| invoiceCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| invoiceDate | date | ||
| invoiceNumber | string | ||
| invoicePdfUrl | string | ||
| invoicePeriod | object | ||
| endDate | date | Indicate the end date of this invoice period | |
| startDate | date | Indicate the start date of this invoice period | |
| isOverdue | boolean | ||
| items | |||
| object | object | ||
| additionalDetail | string | ||
| articleNumber | string | Mandatory for FREEFORM line items. | |
| calculationMode | string | Identifies which of the three Item calculation modes that this item uses. Hint: Use a deserializer that supports polymorphic deserialization and let it use this attribute to decide which sub model to use. Enum: | |
| costCenter | string | ||
| description | string | ||
| itemType | string | Enum: | |
| position | int32 | ||
| quantity | number | Maximum 6 decimals. | |
| salesAccountCode | int32 | ||
| unit | string | ||
| vatAccountCode | int32 | ||
| unitPriceExcludingVat | number | Unit price in decimal form, excluding VAT. Maximum 6 decimals. | |
| vatPercentage | number | VAT percentage in decimal form. Maximum 2 decimals. | |
| orderApproveDate | date-time | ||
| orderId | int64 | ||
| orderReferenceId | string | ||
| orderStatus | string | Enum: | |
| ourReference | string | ||
| parentInvoiceNumber | int64 | ||
| paymentBankAccounts | array[object] | ||
| accountHolderCountry | string | Enum: | |
| accountHolderName | string | ||
| accountNumber | string | ||
| bic | string | ||
| type | string | Enum: | |
| paymentStatus | string | Enum: | |
| payments | array[object] | ||
| amount | int64 | Amount in cents, 10 SEK = 1000 | |
| bookingDate | date | Always the date the payment was booked on the account. | |
| currencyCode | string | Enum: | |
| effectiveBookingDate | date | The date the payment was booked on the account, unless it was manually mapped. In that case it is the date the mapping was done. | |
| paymentDate | date-time | ||
| referenceNumber | string | ||
| type | string | Enum: | |
| project | string | ||
| publicInvoiceUrl | string | ||
| referenceNumber | string | ||
| reminders | array[object] | ||
| creationTime | date-time | ||
| deliveryTypes | array[string] | Enum: | |
| modifiedTime | date-time | ||
| reminderNumber | int32 | ||
| remindersAreCancelled | boolean | ||
| sellingCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| site | string | ||
| status | string | Enum: | |
| storeId | string | Deprecated. Use 'site' instead. | |
| type | string | Enum: | |
| uniqueId | string | ||
| websiteInvoiceSeqNo | int64 | ||
| nextInvoiceNumber | int64 |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxx{ "invoices": [ { "amountToPay": 1000, "balance": 1000, "calculationMode": "{string}", "countryCode": "{string}", "creditedAmount": "{int64}", "creditsInvoiceWithInvoiceNumber": "{int64}", "currencyCode": "{string}", "deliveryType": "{string}", "dueDate": "2019-01-01", "externalInvoiceNumber": "{string}", "feeBalance": "{int64}", "invoiceCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "invoiceDate": "2019-01-01", "invoiceNumber": "{string}", "invoicePdfUrl": "{string}", "invoicePeriod": { "endDate": "2019-01-01", "startDate": "2019-01-01" }, "isOverdue": "{boolean}", "items": [ { "additionalDetail": "{string}", "articleNumber": "10", "calculationMode": "INC_VAT_ROUNDING_PER_ROW", "costCenter": "{string}", "description": "{string}", "itemType": "{string}", "position": "{int32}", "quantity": 10, "salesAccountCode": "{int32}", "unit": "{string}", "vatAccountCode": "{int32}", "unitPriceExcludingVat": 199.99, "vatPercentage": 25 } ], "orderApproveDate": "{date-time}", "orderId": "{int64}", "orderReferenceId": "{string}", "orderStatus": "{string}", "ourReference": "{string}", "parentInvoiceNumber": "{int64}", "paymentBankAccounts": [ { "accountHolderCountry": "{string}", "accountHolderName": "{string}", "accountNumber": "{string}", "bic": "{string}", "type": "{string}" } ], "paymentStatus": "{string}", "payments": [ { "amount": 1000, "bookingDate": "2019-01-01", "currencyCode": "{string}", "effectiveBookingDate": "2019-01-01", "paymentDate": "{date-time}", "referenceNumber": "{string}", "type": "{string}" } ], "project": "{string}", "publicInvoiceUrl": "{string}", "referenceNumber": "{string}", "reminders": [ { "creationTime": "{date-time}", "deliveryTypes": [ "{array[string]...}" ], "modifiedTime": "{date-time}", "reminderNumber": "{int32}" } ], "remindersAreCancelled": "{boolean}", "sellingCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "site": "{string}", "status": "{string}", "storeId": "{string}", "type": "{string}", "uniqueId": "{string}", "websiteInvoiceSeqNo": "{int64}" } ], "nextInvoiceNumber": "{int64}"}Returns all credit invoices for a given orderId or orderReferenceId
An Invoice created with the V2 API can only be fetched using the V2 API
| orderId | integer | ||
| orderReferenceId | string | maxLength: 48 minLength: 0 |
xxxxxxxxxxcurl --get \ --url 'https://b2b.payer.se/api/v2/orders/invoices/credit' \ --header 'Authorization: Bearer {token}' \ --data orderId={orderId} \ --data orderReferenceId={orderReferenceId}OK
| object | object | ||
| invoices | array[object] | ||
| amountToPay | int64 | Amount to pay in cents, 10 SEK = 1000 | |
| balance | int64 | Balance of the invoice. A positive value means that there's outstanding amount for buyer to pay to seller. In cents, 10 SEK = 1000 | |
| calculationMode | string | Enum: | |
| countryCode | string | Enum: | |
| creditedAmount | int64 | ||
| creditsInvoiceWithInvoiceNumber | int64 | If this is a credit invoice, this will be the invoice number of the original invoice | |
| currencyCode | string | Enum: | |
| deliveryType | string | Enum: | |
| dueDate | date | ||
| externalInvoiceNumber | string | ||
| feeBalance | int64 | ||
| invoiceCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| invoiceDate | date | ||
| invoiceNumber | string | ||
| invoicePdfUrl | string | ||
| invoicePeriod | object | ||
| endDate | date | Indicate the end date of this invoice period | |
| startDate | date | Indicate the start date of this invoice period | |
| isOverdue | boolean | ||
| items | |||
| object | object | ||
| additionalDetail | string | ||
| articleNumber | string | Mandatory for FREEFORM line items. | |
| calculationMode | string | Identifies which of the three Item calculation modes that this item uses. Hint: Use a deserializer that supports polymorphic deserialization and let it use this attribute to decide which sub model to use. Enum: | |
| costCenter | string | ||
| description | string | ||
| itemType | string | Enum: | |
| position | int32 | ||
| quantity | number | Maximum 6 decimals. | |
| salesAccountCode | int32 | ||
| unit | string | ||
| vatAccountCode | int32 | ||
| unitPriceExcludingVat | number | Unit price in decimal form, excluding VAT. Maximum 6 decimals. | |
| vatPercentage | number | VAT percentage in decimal form. Maximum 2 decimals. | |
| orderApproveDate | date-time | ||
| orderId | int64 | ||
| orderReferenceId | string | ||
| orderStatus | string | Enum: | |
| ourReference | string | ||
| parentInvoiceNumber | int64 | ||
| paymentBankAccounts | array[object] | ||
| accountHolderCountry | string | Enum: | |
| accountHolderName | string | ||
| accountNumber | string | ||
| bic | string | ||
| type | string | Enum: | |
| paymentStatus | string | Enum: | |
| payments | array[object] | ||
| amount | int64 | Amount in cents, 10 SEK = 1000 | |
| bookingDate | date | Always the date the payment was booked on the account. | |
| currencyCode | string | Enum: | |
| effectiveBookingDate | date | The date the payment was booked on the account, unless it was manually mapped. In that case it is the date the mapping was done. | |
| paymentDate | date-time | ||
| referenceNumber | string | ||
| type | string | Enum: | |
| project | string | ||
| publicInvoiceUrl | string | ||
| referenceNumber | string | ||
| reminders | array[object] | ||
| creationTime | date-time | ||
| deliveryTypes | array[string] | Enum: | |
| modifiedTime | date-time | ||
| reminderNumber | int32 | ||
| remindersAreCancelled | boolean | ||
| sellingCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| site | string | ||
| status | string | Enum: | |
| storeId | string | Deprecated. Use 'site' instead. | |
| type | string | Enum: | |
| uniqueId | string | ||
| websiteInvoiceSeqNo | int64 |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxx{ "invoices": [ { "amountToPay": 1000, "balance": 1000, "calculationMode": "{string}", "countryCode": "{string}", "creditedAmount": "{int64}", "creditsInvoiceWithInvoiceNumber": "{int64}", "currencyCode": "{string}", "deliveryType": "{string}", "dueDate": "2019-01-01", "externalInvoiceNumber": "{string}", "feeBalance": "{int64}", "invoiceCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "invoiceDate": "2019-01-01", "invoiceNumber": "{string}", "invoicePdfUrl": "{string}", "invoicePeriod": { "endDate": "2019-01-01", "startDate": "2019-01-01" }, "isOverdue": "{boolean}", "items": [ { "additionalDetail": "{string}", "articleNumber": "10", "calculationMode": "INC_VAT_ROUNDING_PER_ROW", "costCenter": "{string}", "description": "{string}", "itemType": "{string}", "position": "{int32}", "quantity": 10, "salesAccountCode": "{int32}", "unit": "{string}", "vatAccountCode": "{int32}", "unitPriceExcludingVat": 199.99, "vatPercentage": 25 } ], "orderApproveDate": "{date-time}", "orderId": "{int64}", "orderReferenceId": "{string}", "orderStatus": "{string}", "ourReference": "{string}", "parentInvoiceNumber": "{int64}", "paymentBankAccounts": [ { "accountHolderCountry": "{string}", "accountHolderName": "{string}", "accountNumber": "{string}", "bic": "{string}", "type": "{string}" } ], "paymentStatus": "{string}", "payments": [ { "amount": 1000, "bookingDate": "2019-01-01", "currencyCode": "{string}", "effectiveBookingDate": "2019-01-01", "paymentDate": "{date-time}", "referenceNumber": "{string}", "type": "{string}" } ], "project": "{string}", "publicInvoiceUrl": "{string}", "referenceNumber": "{string}", "reminders": [ { "creationTime": "{date-time}", "deliveryTypes": [ "{array[string]...}" ], "modifiedTime": "{date-time}", "reminderNumber": "{int32}" } ], "remindersAreCancelled": "{boolean}", "sellingCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "site": "{string}", "status": "{string}", "storeId": "{string}", "type": "{string}", "uniqueId": "{string}", "websiteInvoiceSeqNo": "{int64}" } ]}Returns invoices with invoice number >= than given invoice number
Batch size is 20. If more invoices exists, the next invoice number is returned to be used in future requests. Note: By default, the invoice is returned in Inc-Vat format, even if the invoice was originally created with a different calculation mode. Please use the originalCalculationModeResponse flag if you don't want that. Also note: An Invoice created with the V2 API can only be fetched using the V2 API.
| fromInvoiceNumber | integer | ||
| originalCalculationModeResponse | boolean | The Items in the response are normally returned in the Inc-Vat format, even if the invoice was originally created with a different calculation mode. This flag makes it possible to get the Items in their original calculation mode in the response. If you enable this it's suggested that you use a deserializer that supports polymorphic deserialization and let the it use the Item 'calculationMode' attribute to decide which sub model to use. |
xxxxxxxxxxcurl --get \ --url 'https://b2b.payer.se/api/v2/orders/invoices/batch' \ --header 'Authorization: Bearer {token}' \ --data fromInvoiceNumber={fromInvoiceNumber} \ --data originalCalculationModeResponse={originalCalculationModeResponse}OK
| object | object | ||
| invoices | array[object] | ||
| amountToPay | int64 | Amount to pay in cents, 10 SEK = 1000 | |
| balance | int64 | Balance of the invoice. A positive value means that there's outstanding amount for buyer to pay to seller. In cents, 10 SEK = 1000 | |
| calculationMode | string | Enum: | |
| countryCode | string | Enum: | |
| creditedAmount | int64 | ||
| creditsInvoiceWithInvoiceNumber | int64 | If this is a credit invoice, this will be the invoice number of the original invoice | |
| currencyCode | string | Enum: | |
| deliveryType | string | Enum: | |
| dueDate | date | ||
| externalInvoiceNumber | string | ||
| feeBalance | int64 | ||
| invoiceCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| invoiceDate | date | ||
| invoiceNumber | string | ||
| invoicePdfUrl | string | ||
| invoicePeriod | object | ||
| endDate | date | Indicate the end date of this invoice period | |
| startDate | date | Indicate the start date of this invoice period | |
| isOverdue | boolean | ||
| items | |||
| object | object | ||
| additionalDetail | string | ||
| articleNumber | string | Mandatory for FREEFORM line items. | |
| calculationMode | string | Identifies which of the three Item calculation modes that this item uses. Hint: Use a deserializer that supports polymorphic deserialization and let it use this attribute to decide which sub model to use. Enum: | |
| costCenter | string | ||
| description | string | ||
| itemType | string | Enum: | |
| position | int32 | ||
| quantity | number | Maximum 6 decimals. | |
| salesAccountCode | int32 | ||
| unit | string | ||
| vatAccountCode | int32 | ||
| unitPriceExcludingVat | number | Unit price in decimal form, excluding VAT. Maximum 6 decimals. | |
| vatPercentage | number | VAT percentage in decimal form. Maximum 2 decimals. | |
| orderApproveDate | date-time | ||
| orderId | int64 | ||
| orderReferenceId | string | ||
| orderStatus | string | Enum: | |
| ourReference | string | ||
| parentInvoiceNumber | int64 | ||
| paymentBankAccounts | array[object] | ||
| accountHolderCountry | string | Enum: | |
| accountHolderName | string | ||
| accountNumber | string | ||
| bic | string | ||
| type | string | Enum: | |
| paymentStatus | string | Enum: | |
| payments | array[object] | ||
| amount | int64 | Amount in cents, 10 SEK = 1000 | |
| bookingDate | date | Always the date the payment was booked on the account. | |
| currencyCode | string | Enum: | |
| effectiveBookingDate | date | The date the payment was booked on the account, unless it was manually mapped. In that case it is the date the mapping was done. | |
| paymentDate | date-time | ||
| referenceNumber | string | ||
| type | string | Enum: | |
| project | string | ||
| publicInvoiceUrl | string | ||
| referenceNumber | string | ||
| reminders | array[object] | ||
| creationTime | date-time | ||
| deliveryTypes | array[string] | Enum: | |
| modifiedTime | date-time | ||
| reminderNumber | int32 | ||
| remindersAreCancelled | boolean | ||
| sellingCustomer | object | ||
| address | object | ||
| city | string | maxLength: 48 minLength: 0 | |
| coAddress | string | maxLength: 128 minLength: 0 | |
| companyName | string | maxLength: 128 minLength: 0 | |
| countryCode | string | Enum: | |
| emailAddress | string | maxLength: 128 minLength: 0 | |
| emailAddressBcc | string | maxLength: 128 minLength: 0 | |
| emailAddressCc | string | maxLength: 128 minLength: 0 | |
| firstName | string | maxLength: 48 minLength: 0 | |
| gln | string | maxLength: 128 minLength: 0 | |
| houseAddress | string | maxLength: 128 minLength: 0 | |
| languageCode | string | Enum: | |
| lastName | string | maxLength: 48 minLength: 0 | |
| phoneNumber | string | maxLength: 128 minLength: 0 | |
| state | string | maxLength: 64 minLength: 0 | |
| streetAddress1 | string | maxLength: 128 minLength: 0 | |
| streetAddress2 | string | maxLength: 128 minLength: 0 | |
| title | string | maxLength: 24 minLength: 0 | |
| yourReference | string | maxLength: 48 minLength: 0 | |
| zipCode | string | maxLength: 20 minLength: 0 | |
| customerNumber | string | maxLength: 48 minLength: 0 | |
| customerType | string | Enum: | |
| customerVatId | string | maxLength: 48 minLength: 0 | |
| regNumber | string | Organisation number for companies, social security number for persons. Needs to be in a valid format. For some countries the specified regNumber will be reformatted slightly internally to match standard formatting for the country. maxLength: 48 minLength: 0 | |
| websiteUrl | string | maxLength: 128 minLength: 0 | |
| site | string | ||
| status | string | Enum: | |
| storeId | string | Deprecated. Use 'site' instead. | |
| type | string | Enum: | |
| uniqueId | string | ||
| websiteInvoiceSeqNo | int64 | ||
| nextInvoiceNumber | int64 |
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
xxxxxxxxxx{ "invoices": [ { "amountToPay": 1000, "balance": 1000, "calculationMode": "{string}", "countryCode": "{string}", "creditedAmount": "{int64}", "creditsInvoiceWithInvoiceNumber": "{int64}", "currencyCode": "{string}", "deliveryType": "{string}", "dueDate": "2019-01-01", "externalInvoiceNumber": "{string}", "feeBalance": "{int64}", "invoiceCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "invoiceDate": "2019-01-01", "invoiceNumber": "{string}", "invoicePdfUrl": "{string}", "invoicePeriod": { "endDate": "2019-01-01", "startDate": "2019-01-01" }, "isOverdue": "{boolean}", "items": [ { "additionalDetail": "{string}", "articleNumber": "10", "calculationMode": "INC_VAT_ROUNDING_PER_ROW", "costCenter": "{string}", "description": "{string}", "itemType": "{string}", "position": "{int32}", "quantity": 10, "salesAccountCode": "{int32}", "unit": "{string}", "vatAccountCode": "{int32}", "unitPriceExcludingVat": 199.99, "vatPercentage": 25 } ], "orderApproveDate": "{date-time}", "orderId": "{int64}", "orderReferenceId": "{string}", "orderStatus": "{string}", "ourReference": "{string}", "parentInvoiceNumber": "{int64}", "paymentBankAccounts": [ { "accountHolderCountry": "{string}", "accountHolderName": "{string}", "accountNumber": "{string}", "bic": "{string}", "type": "{string}" } ], "paymentStatus": "{string}", "payments": [ { "amount": 1000, "bookingDate": "2019-01-01", "currencyCode": "{string}", "effectiveBookingDate": "2019-01-01", "paymentDate": "{date-time}", "referenceNumber": "{string}", "type": "{string}" } ], "project": "{string}", "publicInvoiceUrl": "{string}", "referenceNumber": "{string}", "reminders": [ { "creationTime": "{date-time}", "deliveryTypes": [ "{array[string]...}" ], "modifiedTime": "{date-time}", "reminderNumber": "{int32}" } ], "remindersAreCancelled": "{boolean}", "sellingCustomer": { "address": { "city": "{string}", "coAddress": "{string}", "companyName": "{string}", "countryCode": "{string}", "emailAddress": "{string}", "emailAddressBcc": "{string}", "emailAddressCc": "{string}", "firstName": "{string}", "gln": "{string}", "houseAddress": "{string}", "languageCode": "{string}", "lastName": "{string}", "phoneNumber": "{string}", "state": "{string}", "streetAddress1": "{string}", "streetAddress2": "{string}", "title": "{string}", "yourReference": "{string}", "zipCode": "{string}" }, "customerNumber": "{string}", "customerType": "{string}", "customerVatId": "{string}", "regNumber": "{string}", "websiteUrl": "{string}" }, "site": "{string}", "status": "{string}", "storeId": "{string}", "type": "{string}", "uniqueId": "{string}", "websiteInvoiceSeqNo": "{int64}" } ], "nextInvoiceNumber": "{int64}"}Invoices V3
API
Card Payments
API
Orders V2
API
Invoice Reminders
API
Customers V1
API
Direct Bank Payments
API
Settlements V2
API
Payment Requests
API
Payments V2
API
Bank Payments V1
API