Reissue invoice in EUR for bank transfer

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

Switch the billing account to EUR and replace the open service renewal invoices with EUR invoices for the same periods, so a customer outside Sweden can pay by SEPA bank transfer instead of a Swedish bankgiro.

Read the invoice first: paymentMethods.sepa.visible is true and available is false when bank transfer exists one currency away, and actions.canReissueInCurrency.allowed says whether this action will succeed for that invoice.

Every open renewal invoice on the account is replaced in the same call because an account holds one currency; send dryRun: true to get the full plan (affected invoices, expected EUR amounts and due dates, blockers) without changing anything.

The real call is synchronous: the account currency changes first, then each invoice is cancelled and replaced; the response lists every cancelled/replacement pair.

Only EUR is offered.

Get {id} from GET /api/v2/billing/invoices data[].id or GET /api/v2/billing/invoices/{id} id.

Billing & Orders Invoices

Authentication

Required API scopes: write:billingwrite:account

Authenticate with an API key in the Authorization: Bearer <token> header.

Context

Path Parameters

id string required Example: inv_01hxa3b4c5d6e7f8g9h0j1k2m3

Public invoice ID from invoice list/detail. Do not invent this value; use the exact ID returned by the referenced API response.

Headers

Authorization Bearer <token>
Accept application/json
Content-Type application/json

Body

required
application/json
currencyCode string · enum required

Target currency. Only EUR is offered: it is the currency with a bank-transfer rail (SEPA) for customers outside Sweden.

EUR
dryRun boolean

When true, return the plan without changing the account or any invoice.

Responses

200 With dryRun: true: the plan. Otherwise: the cancelled/replacement invoice pairs after the account switched to EUR.
ReissuePlan
currencyCode string required · Example: EUR
exchangeRate number · nullable required · Example: 0.1

Target currency units per one SEK, as configured in billing. The replacement amount is the product's price in the new currency; expectedAmount is the rate-converted expectation.

allowed boolean required

True when the real call would succeed for every affected invoice.

blockers array<object> required
blockers[].invoiceId string · nullable required

Nullable: may be null when not applicable.

blockers[].invoiceNumber string · nullable required

Nullable: may be null when not applicable.

blockers[].code string · enum required
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
blockers[].reason string required
changeQuota object required
changeQuota.remaining integer required

Currency changes left this period; the switch uses one.

changeQuota.resetAt string required
invoices array<object> required

Every open renewal invoice the switch affects, the requested one first.

invoices[].id string required
invoices[].number string · nullable required

Nullable: may be null when not applicable.

invoices[].amount number required
invoices[].currencyCode string required
invoices[].dueAt string · nullable required

Nullable: may be null when not applicable.

invoices[].expectedAmount number · nullable required

Nullable: may be null when not applicable.

invoices[].expectedCurrencyCode string required
invoices[].expectedDueAt string · nullable required

The later of the original due date and seven days from today, so the transfer can arrive.

invoices[].actions object required
invoices[].actions.canReissueInCurrency object required
invoices[].actions.canReissueInCurrency.allowed boolean required · Example: true
invoices[].actions.canReissueInCurrency.reason string · nullable required · Example: null

Nullable: may be null when not applicable.

invoices[].actions.canReissueInCurrency.code string · nullable · Example: pending_order

Machine-readable reason code when an action is blocked.

ReissueResult
currencyCode string required · Example: EUR
changedCurrency boolean required

False when the account was already in EUR.

invoices array<object> required
invoices[].cancelledInvoice object required
invoices[].cancelledInvoice.id string required
invoices[].cancelledInvoice.number string · nullable required

Nullable: may be null when not applicable.

invoices[].cancelled boolean required

True once the original invoice is cancelled in the billing system, even when the replacement could not be issued. A cancelled original is not payable any more; a failed outcome with cancelled: false left the original untouched and payable.

invoices[].replacementInvoice object · nullable required

Nullable: may be null when not applicable.

invoices[].status string · enum required
reissued
failed
invoices[].reason string · nullable required

Plain-English reason when status is failed.

400 Invalid body. currencyCode must be EUR; dryRun must be a boolean; no other fields are accepted.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
401 Unauthorized. Authentication is required.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
403 Delegated-access users cannot change the account currency (delegated_access_forbidden).
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
404 Not found. The resource does not exist or is not owned by the caller.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
409 Blocked. invoice_reissue_blocked carries a blockers array (same shape as the preview) naming every reason; pending_orders when an open order must be finished or cancelled first.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
429 The monthly limit for currency changes is reached (rate_limited); Retry-After names the wait in seconds when known.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
500 Internal error. Retry later or contact support if the issue persists.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
502 upstream_failed when the currency settings or the currency change itself failed (nothing changed). upstream_renewal_regeneration_failed when the account currency changed but at least one invoice could not be replaced: the response carries invoices with per-invoice status/reason; the original invoice stays payable by card and staff are notified.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
POST https://cloud.hostup.se/api/v2/billing/invoices/{id}/actions/reissue-in-currency
For AI assistants
View as Markdown
cURL
curl -X POST "https://cloud.hostup.se/api/v2/billing/invoices/inv_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/reissue-in-currency" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "currencyCode": "EUR",
    "dryRun": true
  }'
Response
// dryRun plan for one SEK hosting renewal invoice
{
  "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
        }
      }
    }
  ]
}

// Account switched to EUR, invoice replaced
{
  "currencyCode": "EUR",
  "changedCurrency": true,
  "invoices": [
    {
      "cancelledInvoice": {
        "id": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
        "number": "202681499"
      },
      "cancelled": true,
      "replacementInvoice": {
        "id": "inv_01hxa3b4c5d6e7f8g9h0j1k2m4",
        "number": "202681620",
        "amount": 70.8,
        "currencyCode": "EUR",
        "dueAt": "2026-09-17T00:00:00.000Z",
        "status": "unpaid",
        "paymentUrl": "/billing?invoice=202681620"
      },
      "status": "reissued",
      "reason": null
    }
  ]
}
Request Body Preview the switch
{
  "currencyCode": "EUR",
  "dryRun": true
}