PATCH /payment-method/{uid}

Met à jour un moyen de paiement existant.

Définir comme défaut

Si vous définissez default: true, ce moyen deviendra le moyen par défaut pour les nouveaux documents. L'ancien moyen par défaut sera automatiquement désélectionné.

Désactivation

Utilisez state: "inactive" pour masquer un moyen de paiement sans le supprimer. Les documents existants utilisant ce moyen ne seront pas affectés.

Path parameters

  • uid string Required

    Identifiant unique du moyen de paiement

application/json

Body Required

  • name string

    Nom du moyen de paiement (ex. "Virement bancaire", "Carte Bancaire")

  • modality string

    Modalités de paiement affichées sur les documents. Ex. "Paiement à 30 jours", "RIB : FR76...", "Payable à réception"

  • default boolean

    Définir comme moyen de paiement par défaut

  • tag string

    Type de moyen de paiement :

    • check : Chèque
    • transfer : Virement bancaire
    • stripe : Stripe
    • paypal : PayPal
    • paybox : Paybox
    • epayment : Paiement électronique
    • other : Autre

    Values are paybox, epayment, check, stripe, paypal, transfer, or other.

  • state string

    État du moyen de paiement

    Values are active or inactive.

Responses

  • 200 application/json

    Moyen de paiement mis à jour

    Hide response attribute Show response attribute object
    • updatedPaymentMethod object
      Hide updatedPaymentMethod attributes Show updatedPaymentMethod attributes object
      • _id string

        Unique identifier for the payment method

      • company string

        Reference to the company

      • default boolean

        Whether this is the default payment method

      • isTest boolean

        Whether this is a test payment method

        Default value is false.

      • modality string

        Additional information about the payment method

      • name string

        Name of the payment method

      • public string

        Public information

      • rang string

        Paybox specific field

      • secret string

        Secret information

      • site string

        Paybox specific field

      • state string

        State of the payment method

        Values are active or inactive. Default value is active.

      • tag string

        Type of payment method

        Values are paybox, epayment, check, stripe, paypal, transfer, or other. Default value is other.

      • nbInvoices integer

        Number of invoices using this payment method

      • nbQuotes integer

        Number of quotes using this payment method

  • 400

    Requête invalide - Données incorrectes

  • 403

    Non autorisé - Droits insuffisants pour modifier ce moyen

  • 404

    Moyen de paiement non trouvé

PATCH /payment-method/{uid}
curl \
 --request PATCH 'https://wuro.pro/api/v3.2/payment-method/{uid}' \
 --header "X-APP-ID: $API_KEY" \
 --header "X-APP-SECRET: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","modality":"string","default":true,"tag":"paybox","state":"active"}'
Request examples
{
  "name": "string",
  "modality": "string",
  "default": true,
  "tag": "paybox",
  "state": "active"
}
Response examples (200)
{
  "updatedPaymentMethod": {
    "_id": "string",
    "company": "string",
    "default": true,
    "isTest": false,
    "modality": "string",
    "name": "string",
    "public": "string",
    "rang": "string",
    "secret": "string",
    "site": "string",
    "state": "active",
    "tag": "other",
    "nbInvoices": 42,
    "nbQuotes": 42
  }
}