Saltar al contenido principal
GET

Abrir o ver un método de pago

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

Devuelve un método de pago configurado por su ID. El ID se obtiene del campo 'id' en la respuesta del endpoint de listado. Nota: devuelve un método de pago configurado (manual o pasarela conectada como Stripe, PayPal, GoCardless, Square, Monei o Wallet), no una transacción individual. Usa /api/v2/payments/{id} para obtener una transacción de pago concreta.

Parámetros

Parámetros de ruta

paymentMethodIdstringobligatorio

ID del método de pago (ObjectId hexadecimal de 24 caracteres)

Petición

python
import requests

url = "https://api.holded.com/api/v2/payment-methods/507f1f77bcf86cd799439011"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

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

Respuestas

Respuesta

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

Respuestas exitosas

200Método de pago encontradoapplication/json
object
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)

Respuestas de error

401API key inválida o no proporcionadaapplication/json
403Permisos insuficientesapplication/json
404Método de pago no encontradoapplication/json
429Límite de solicitudes excedidoapplication/json