Skip to content

List payment methods

GET /api/v2/billing/payment-methods

List the saved cards, the automatic card payment setting, the invoice copy addresses and the payment rules for the account. Pass a card’s id as savedCardId to POST /api/v2/billing/invoices/{id}/actions/pay. invoicePaymentMethodRules shows which payment methods the account can use in general. For one invoice, read paymentMethods on GET /api/v2/billing/invoices/{id}. That list also checks the invoice’s status, balance and currency. billing.cardAutoCharge.lastDecline shows the card’s last refused charge in the last 30 days.

Authentication: An API key with the scope read:billing. About keys and scopes

Example

GET /api/v2/billing/payment-methods
curl "https://cloud.hostup.se/api/v2/billing/payment-methods" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 Saved cards, payment settings and payment rules.

Response 200
{
"methods": [
{
"id": "card_01hxa3b4c5d6e7f8g9h0j1k2m3",
"brand": "visa",
"last4": "5566",
"expMonth": 4,
"expYear": 2027,
"cardholderName": "Example Customer",
"isPrimary": true,
"addedAt": "2026-04-27T12:34:56.000Z"
}
],
"hasPrimaryMethod": true,
"billing": {
"cardAutoCharge": {
"enabled": true,
"method": "card",
"status": "active",
"configured": true,
"hasPaymentMethod": true,
"label": "Card auto-charge",
"description": "Automatically charge the saved card when invoices are due.",
"reason": null,
"actions": {
"canToggle": {
"allowed": true,
"reason": null
}
},
"lastDecline": null
}
},
"billingContacts": [
{
"id": "42",
"email": "invoices@example.com",
"description": null
}
],
"invoicePaymentMethodRules": {
"card": {
"method": "card",
"label": "Card",
"availableForAccount": true,
"reason": null,
"checkoutMode": "payment",
"requirements": {}
},
"accountCredit": {
"method": "accountCredit",
"label": "Account credit",
"availableForAccount": false,
"reason": "No account credit is available.",
"checkoutMode": null,
"requirements": {
"invoiceCurrencyCode": "SEK",
"accountCurrencyCode": "SEK",
"availableBalance": {
"amount": 0,
"currencyCode": "SEK"
}
}
},
"swish": {
"method": "swish",
"label": "Swish",
"availableForAccount": false,
"reason": "Swish requires a Swedish billing account and a SEK invoice.",
"checkoutMode": null,
"requirements": {
"invoiceCurrencyCode": "SEK",
"accountCountryCode": "SE"
}
},
"bankgiro": {
"method": "bankgiro",
"label": "Bankgiro",
"availableForAccount": false,
"reason": "Bankgiro is only available for Swedish billing accounts with SEK invoices.",
"checkoutMode": null,
"requirements": {
"invoiceCurrencyCode": "SEK",
"accountCountryCode": "SE"
}
},
"sepa": {
"method": "sepa",
"label": "SEPA bank transfer",
"availableForAccount": true,
"reason": null,
"checkoutMode": "sepa_bank_transfer_payment",
"requirements": {
"invoiceCurrencyCode": "EUR"
}
},
"alipay": {
"method": "alipay",
"label": "Alipay",
"availableForAccount": true,
"reason": null,
"checkoutMode": "alipay_payment",
"requirements": {
"invoiceCurrencyCodes": [
"EUR",
"USD"
]
}
},
"crypto": {
"method": "crypto",
"label": "Cryptocurrency",
"availableForAccount": true,
"visible": true,
"reason": null,
"checkoutMode": null,
"requirements": {
"invoiceCurrencyCodes": [
"SEK",
"EUR",
"USD"
],
"accountCountryExcludedCode": "SE",
"accountType": "private",
"requiresCardVerification": true
}
}
}
}
Response fields
methodsarray of object
Saved cards. To see which methods can pay an invoice, read invoicePaymentMethodRules here or paymentMethods on the invoice.
idstring
The saved card ID (card_…). Send it as savedCardId to pay an invoice with this card.
brandstring
last4string or null
expMonthnumber or null
expYearnumber or null
cardholderNamestring or null
isPrimaryboolean
addedAtstring or null
hasPrimaryMethodboolean
billingobject
cardAutoChargeobject
enabledboolean
Whether automatic card charges will happen. False when configured is true but no card is saved.
methodstring
One of card.
statusstring
active: charges to the saved card are ready. needs_payment_method: the setting is on but no card is saved. disabled: the setting is off. disabled_for_einvoice: turned off automatically because the invoices are sent as Peppol e-invoices. A card charge would then pay the same invoice twice. Turning the setting on again is your choice and ends that automatic handling. One of active, needs_payment_method, disabled, disabled_for_einvoice.
configuredboolean
The saved setting. When it is true and no card is saved, enabled is false and status is needs_payment_method.
hasPaymentMethodboolean
True when the account has a saved card that automatic charges can use.
labelstring
descriptionstring
reasonstring or null
actionsobject
canToggleobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
lastDeclinenull
Present on GET /api/v2/billing/payment-methods only. The latest refused charge to the saved card in the last 30 days, while that refusal is still the card’s most recent charge. null when the latest charge succeeded or none was tried. enabled: true together with a lastDecline means the next automatic charge will most likely be refused too. Replace the card or ask the bank to allow the charge.
billingContactsarray of object
idstring
The billing contact ID.
emailstring
descriptionstring or null
invoicePaymentMethodRulesobject
cardobject
methodstring
One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
availableForAccountboolean
Whether the account can use this method at all. An invoice’s paymentMethods gives the final answer for its amount and currency.
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
checkoutModestring or null
One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
accountCreditobject
methodstring
One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
availableForAccountboolean
Whether the account can use this method at all. An invoice’s paymentMethods gives the final answer for its amount and currency.
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
checkoutModestring or null
One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
swishobject
methodstring
One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
availableForAccountboolean
Whether the account can use this method at all. An invoice’s paymentMethods gives the final answer for its amount and currency.
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
checkoutModestring or null
One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
bankgiroobject
methodstring
One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
availableForAccountboolean
Whether the account can use this method at all. An invoice’s paymentMethods gives the final answer for its amount and currency.
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
checkoutModestring or null
One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
sepaobject
methodstring
One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
availableForAccountboolean
Whether the account can use this method at all. An invoice’s paymentMethods gives the final answer for its amount and currency.
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
checkoutModestring or null
One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
alipayobject
methodstring
One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
availableForAccountboolean
Whether the account can use this method at all. An invoice’s paymentMethods gives the final answer for its amount and currency.
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
checkoutModestring or null
One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
cryptoobject
methodstring
One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
availableForAccountboolean
Whether the account can use this method at all. An invoice’s paymentMethods gives the final answer for its amount and currency.
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
checkoutModestring or null
One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.

Errors

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

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists.