Obtenir un mètode de pagament per ID
sales:invoicing-settings.readhttps://api.holded.com/api/v2/payment-methods/{paymentMethodId}Retorna un mètode de pagament configurat pel seu ID. L'ID s'obté del camp 'id' a la resposta de l'endpoint de llistat. Nota: retorna un mètode de pagament configurat (manual o passarel·la connectada com Stripe, PayPal, GoCardless, Square, Monei o Wallet), no una transacció individual. Utilitza /api/v2/payments/{id} per obtenir una transacció de pagament concreta.
Paràmetres
Paràmetres de ruta
stringobligatoriID del mètode de pagament (ObjectId hexadecimal de 24 caràcters)
Petició
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())Respostes
Resposta
{
"id": "507f1f77bcf86cd799439011",
"name": "string",
"type": "manual",
"status": "connected",
"isDefault": false,
"bankingAccountId": "507f1f77bcf86cd799439011",
"dueDays": 0,
"connectionId": "507f1f77bcf86cd799439011"
}Respostes exitoses
200Mètode de pagament trobatapplication/jsonUnique identifier of the payment method
Display name of the payment method
Discriminator for the payment method kind: 'manual' for manually created methods, or the provider slug for connected gateways (stripe, paypal, gocardless, square, monei, wallet)
manualstripepaypalgocardlesssquaremoneiwalletCurrent status of the payment method: 'connected' means active and usable. Online gateways may also have disconnected, access_denied, verification_required, or verification_in_review.
connecteddisconnectedaccess_deniedverification_requiredverification_in_reviewWhether this method is the account default for online payments
Associated banking account ID, if configured
Number of days until payment is due (manual methods only)
Gateway connection identifier (online methods only)
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Mètode de pagament no trobatapplication/json429Límit de sol·licituds exceditapplication/json