Get Facture


The following endpoint can be used to retrieve the details of a Facture within the CoCard Pay Center application.


Point de terminaison

The following endpoint can be used to retrieve a Facture. You must replace the {base_url} , {external_id} and {site_id} variables with the appropriate values.

GET
{base_url}/api/v3.1/site/{site_id}/invoice/{external_id}
Demande
Aucun corps n'est requis pour cet appel API
Réponse
Champ
Type
Description
external_id
String
The unique invoice id from the source system/database. If we detect a record with the same `external_id`, it will be updated, otherwise it will be added.
invoice_number
String
Le numéro unique attribué par le système source et affiché au client sur le Facture.
totals
The total amounts on the Facture. Validated against the sum of the line items found in `lines`.
customer
Une référence au dossier du client. Omettez ce champ pour recevoir un lien vers le Facture.
invoice_term_name
String
The invoice term name for the Facture. Defaults to the customer invoice term if it exists, unless `null` is passed in.
lines
A list of line items on the Facture. Required if `description` is not passed in.
description
String
A short description of the products/services on the Facture. Required if `lines` are not passed in.
invoice_date
Date
La date du Facture. Si elle est définie dans le futur, la demande ne sera pas envoyée avant cette date. Par défaut, elle est définie à aujourd'hui si elle est laissée vide. Format = YYYY-MM-DD
customer_memo
String
Une note présentée au client en bas du Facture.
internal_memo
String
Un mémo ajouté au bas de la Facture. Visible uniquement par le personnel interne, jamais affiché aux clients.
active
Boolean
Ce drapeau représente si l'enregistrement Facture est actif et disponible pour être utilisé ou non.
Default = `true`
payments
Une liste des paiements effectués sur le Facture.
webhook_url
String
Le URL où envoyer les données lorsque des actions spécifiques sont effectuées sur le Facture. Des notifications seront envoyées en cas d'échec d'un envoi de texto/courriel, si un client clique sur un lien, ou s'il effectue un paiement.
attachments
String [ ]
Une liste d'URL de pièces jointes.
created_at
Date
La date à laquelle le Facture a été créé.
updated_at
Date
La date à laquelle le Facture a été dernièrement mis à jour.
Sample Response
			
{
  "_id": "61f32dc2f62bdc6a48945067",
  "external_id": "439772921",
  "invoice_number": "12345",
  "description": "",
  "customer_memo": "",
  "internal_memo": "",
  "due_date": "2021-10-01",
  "totals": {
    "taxes": 2.85,
    "total": 30
  },
  "customer": {
    "external_id": "39772634",
    "first_name": "John",
    "last_name": "Doe",
    "mobile_phone": "111-222-3333",
    "email": "johndoe@abc.com"
  },
  "lines": [
    {
      "description": "",
      "product": {
        "external_id": "62331255",
        "name": "Mens Large T-shirt",
        "unit_price": 15
      },
      "unit_price": 15,
      "qty": 2,
      "total": 30
    }
  ],
  "payments": [
    {
      "external_id": "72345322",
      "payment_type": "payment_card",
      "payment_sub_type": "amex",
      "display_name": "AMEX ****** 3422",
      "last_4": "3422",
      "total": 30,
      "paid_on": "2021-03-15T16:32:11Z",
      "status": "captured",
      "active": true
    }
  ],
  "notifications": [
    {
      "error": false,
      "value": "test@test.com",
      "description": "Email to test@test.com sent",
      "at": "2021-03-15T13:32:11Z"
    },
    {
      "error": false,
      "value": "999-123-4567",
      "description": "Text to 999-123-4567 sent",
      "at": "2021-03-15T13:32:11Z"
    }
  ],
  "webhook_url": "https://yourcompany.com/webhook",
  "created_at": "2025-05-30T19:19:44.143Z",
  "updated_at": "2025-05-30T19:19:44.143Z"
}