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
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.
{ "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 objectSaved cards. To see which methods can pay an invoice, read
invoicePaymentMethodRules here or paymentMethods on the invoice.idstringThe saved card ID (
card_…). Send it as savedCardId to pay an invoice with this card.brandstringlast4string or nullexpMonthnumber or nullexpYearnumber or nullcardholderNamestring or nullisPrimarybooleanaddedAtstring or nullhasPrimaryMethodbooleanbillingobjectcardAutoChargeobjectenabledbooleanWhether automatic card charges will happen. False when
configured is true but no card is saved.methodstringOne of
card.statusstringactive: 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.configuredbooleanThe saved setting. When it is true and no card is saved,
enabled is false and status is needs_payment_method.hasPaymentMethodbooleanTrue when the account has a saved card that automatic charges can use.
labelstringdescriptionstringreasonstring or nullactionsobjectcanToggleobjectallowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
lastDeclinenullPresent 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 objectidstringThe billing contact ID.
emailstringdescriptionstring or nullinvoicePaymentMethodRulesobjectcardobjectmethodstringOne of
card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailableForAccountbooleanWhether the account can use this method at all. An invoice’s
paymentMethods gives the final answer for its amount and currency.visiblebooleanPresent for restricted methods. When false, don’t show the method to the customer.
reasonstring or nullcheckoutModestring or nullOne of
payment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectWhat 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.
invoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringA billing country this method does not accept.
accountTypestringOne of
private, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanWhether a saved card or an earlier successful card payment is needed.
availableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.accountCreditobjectmethodstringOne of
card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailableForAccountbooleanWhether the account can use this method at all. An invoice’s
paymentMethods gives the final answer for its amount and currency.visiblebooleanPresent for restricted methods. When false, don’t show the method to the customer.
reasonstring or nullcheckoutModestring or nullOne of
payment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectWhat 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.
invoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringA billing country this method does not accept.
accountTypestringOne of
private, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanWhether a saved card or an earlier successful card payment is needed.
availableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.swishobjectmethodstringOne of
card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailableForAccountbooleanWhether the account can use this method at all. An invoice’s
paymentMethods gives the final answer for its amount and currency.visiblebooleanPresent for restricted methods. When false, don’t show the method to the customer.
reasonstring or nullcheckoutModestring or nullOne of
payment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectWhat 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.
invoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringA billing country this method does not accept.
accountTypestringOne of
private, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanWhether a saved card or an earlier successful card payment is needed.
availableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.bankgiroobjectmethodstringOne of
card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailableForAccountbooleanWhether the account can use this method at all. An invoice’s
paymentMethods gives the final answer for its amount and currency.visiblebooleanPresent for restricted methods. When false, don’t show the method to the customer.
reasonstring or nullcheckoutModestring or nullOne of
payment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectWhat 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.
invoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringA billing country this method does not accept.
accountTypestringOne of
private, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanWhether a saved card or an earlier successful card payment is needed.
availableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.sepaobjectmethodstringOne of
card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailableForAccountbooleanWhether the account can use this method at all. An invoice’s
paymentMethods gives the final answer for its amount and currency.visiblebooleanPresent for restricted methods. When false, don’t show the method to the customer.
reasonstring or nullcheckoutModestring or nullOne of
payment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectWhat 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.
invoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringA billing country this method does not accept.
accountTypestringOne of
private, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanWhether a saved card or an earlier successful card payment is needed.
availableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.alipayobjectmethodstringOne of
card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailableForAccountbooleanWhether the account can use this method at all. An invoice’s
paymentMethods gives the final answer for its amount and currency.visiblebooleanPresent for restricted methods. When false, don’t show the method to the customer.
reasonstring or nullcheckoutModestring or nullOne of
payment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectWhat 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.
invoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringA billing country this method does not accept.
accountTypestringOne of
private, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanWhether a saved card or an earlier successful card payment is needed.
availableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.cryptoobjectmethodstringOne of
card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailableForAccountbooleanWhether the account can use this method at all. An invoice’s
paymentMethods gives the final answer for its amount and currency.visiblebooleanPresent for restricted methods. When false, don’t show the method to the customer.
reasonstring or nullcheckoutModestring or nullOne of
payment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectWhat 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.
invoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringA billing country this method does not accept.
accountTypestringOne of
private, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanWhether a saved card or an earlier successful card payment is needed.
availableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringHow 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.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |