Skip to content

Reissue an invoice in EUR

POST /api/v2/billing/invoices/{id}/actions/reissue-in-currency

Switch the account to EUR and replace its open renewal invoices with EUR invoices for the same periods. The new invoices can be paid by SEPA bank transfer. This is for customers outside Sweden with SEK invoices. Check actions.canReissueInCurrency on GET /api/v2/billing/invoices/{id} first. Send dryRun: true first to see every open invoice the switch affects and any blockers. Nothing changes on a dry run. The real call goes through only when every open invoice can be reissued and no order is pending. It changes the account currency for all future invoices. When the account is not in EUR yet, it uses one of the account’s monthly currency changes (changeQuota). Each original invoice is cancelled and replaced at once. The response lists each cancelled invoice with its replacement.

Authentication: An API key with the scopes write:billing and write:account. About keys and scopes

Request

Path parameters

idstringrequired
Public invoice ID from GET /api/v2/billing/invoices (inv_…).

Body

currencyCodestringrequired
Target currency. Only EUR, the currency SEPA bank transfer uses. One of EUR.
dryRunboolean
Return the plan without changing anything. Default false.

Example

POST /api/v2/billing/invoices/{id}/actions/reissue-in-currency
curl -X POST "https://cloud.hostup.se/api/v2/billing/invoices/inv_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/reissue-in-currency" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"currencyCode": "EUR",
"dryRun": true
}'

Responses

200 With dryRun: true: the plan. Otherwise: each cancelled invoice with its EUR replacement.

{
"currencyCode": "EUR",
"exchangeRate": 0.1,
"allowed": true,
"blockers": [],
"changeQuota": {
"remaining": 2,
"resetAt": "2026-10-01T00:00:00.000Z"
},
"invoices": [
{
"id": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
"number": "202681499",
"amount": 708,
"currencyCode": "SEK",
"dueAt": "2026-09-10T00:00:00.000Z",
"expectedAmount": 70.8,
"expectedCurrencyCode": "EUR",
"expectedDueAt": "2026-09-17T00:00:00.000Z",
"actions": {
"canReissueInCurrency": {
"allowed": true,
"reason": null,
"code": null
}
}
}
]
}
Response fields
currencyCodestring
exchangeRatenumber or null
EUR per 1 SEK, used for expectedAmount. The replacement is priced from the product’s EUR price. Its amount can differ.
allowedboolean
True when the real call would go through.
blockersarray of object
invoiceIdstring or null
invoiceNumberstring or null
codestring
One of account_country_not_eligible, invoice_not_unpaid, invoice_already_in_currency, invoice_partially_settled, invoice_peppol_delivered, invoice_order_backed, invoice_add_funds, invoice_usage_not_reissuable, invoice_domain_renewal, invoice_not_service_renewal, invoice_multiple_services, renewal_period_ended, currency_not_supported, pending_orders, rate_limited.
reasonstring
changeQuotaobject
remaininginteger
Currency changes left this month. The switch uses one when the account is not in EUR yet.
resetAtstring
When the monthly count resets.
invoicesarray of object
Every open invoice the switch affects, the requested one first.
idstring
numberstring or null
amountnumber
currencyCodestring
dueAtstring or null
expectedAmountnumber or null
expectedCurrencyCodestring
expectedDueAtstring or null
The later of the original due date and seven days from today.
actionsobject
canReissueInCurrencyobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid body. currencyCode must be EUR and dryRun a boolean. Other fields are rejected.
401Unauthorized. Authentication is required.
403delegated_access_forbidden: a user with delegated access cannot change the account currency.
404Not found. The resource does not exist or is not owned by the caller; code is invoice_not_found.
409Blocked. invoice_reissue_blocked: an open invoice cannot be reissued. detail gives the first reason. Send dryRun: true to see every blocker. pending_orders: finish or cancel the open orders first.
429rate_limited: the account has used its currency changes for this month. Retry-After gives the wait in seconds when known.
500Internal error. Retry later or contact support if the issue persists.
502upstream_failed: the currency settings or the currency change failed. Nothing changed. upstream_renewal_regeneration_failed: the account currency changed but at least one invoice was not replaced. detail says for each invoice whether the original was cancelled or is still payable by card. A cancelled original has nothing to pay until Hostup issues the replacement.