Saltar al contingut principal
GET

Llistat de mètodes de pagament

Scope:sales:invoicing-settings.read
https://api.holded.com/api/v2/payment-methods

Retorna tots els mètodes de pagament configurats al compte, incloent-hi mètodes manuals (transferència bancària, contra reemborsament, xec) i proveïdors connectats (Stripe, PayPal, GoCardless, Square, Monei, Wallet). Utilitza'l quan l'usuari pregunti quins mètodes de pagament té configurats, com cobra als seus clients o quines són les formes de pagament. Diferent de l'endpoint de pagaments, que retorna transaccions individuals: aquest retorna els mètodes configurats.

Paràmetres

Paràmetres de consulta

cursorstringopcional

Cursor opac per a la paginació. Utilitza el valor retornat a la resposta anterior

limitintegeropcional= 50

Nombre màxim de mètodes de pagament a retornar per pàgina. Per defecte 50, màxim 200

Petició

python
import requests

url = "https://api.holded.com/api/v2/payment-methods?cursor=value&limit=50"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Respostes

Resposta

json
{
  "items": [
    {
      "id": "507f1f77bcf86cd799439011",
      "name": "string",
      "type": "manual",
      "status": "connected",
      "isDefault": false,
      "bankingAccountId": "507f1f77bcf86cd799439011",
      "dueDays": 0,
      "connectionId": "507f1f77bcf86cd799439011"
    }
  ],
  "cursor": "string",
  "has_more": false
}

Respostes exitoses

200Llistat de mètodes de pagamentapplication/json
object
items[]object[]required
idstringrequired

Unique identifier of the payment method

namestringrequired

Display name of the payment method

typestringrequired

Discriminator for the payment method kind: 'manual' for manually created methods, or the provider slug for connected gateways (stripe, paypal, gocardless, square, monei, wallet)

Enum:manualstripepaypalgocardlesssquaremoneiwallet
statusstringrequired

Current status of the payment method: 'connected' means active and usable. Online gateways may also have disconnected, access_denied, verification_required, or verification_in_review.

Enum:connecteddisconnectedaccess_deniedverification_requiredverification_in_review
isDefaultbooleanrequired

Whether this method is the account default for online payments

bankingAccountIdstring | nullrequired

Associated banking account ID, if configured

dueDaysinteger | nullrequired

Number of days until payment is due (manual methods only)

connectionIdstring | nullrequired

Gateway connection identifier (online methods only)

cursorstring | nulloptional
has_morebooleanrequired

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
429Límit de sol·licituds exceditapplication/json