Facture

API

Référence des endpoints de facturation v3.

Référence OpenAPI

Les opérations ci-dessous sont générées depuis la spec OpenAPI de la facturation v3. Le playground utilise le serveur de l'environnement sélectionné dans la liste des serveurs.

POST
/v3/products/{productId}/invoices

Creates an OPEN invoice payable in cash at an FDJ point of sale. partnerInvoiceReference is the partner-wide idempotency key: replaying it with an identical payload returns the existing invoice with 200, a different payload fails with REFERENCE_ALREADY_EXISTS. expiresAt defaults to now + 1 hour and must be in the future.

Authorization

bearer-auth
AuthorizationBearer <token>

Access token issued by POST /v3/oauth/token (OAuth2 client_credentials)

In: header

Path Parameters

productId*string

Product ID

Formatuuid

Request Body

application/json

The invoice to create

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v3/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/invoices" \  -H "Content-Type: application/json" \  -d '{    "partnerInvoiceReference": "string",    "amount": {      "value": 0,      "currency": "EUR"    },    "customer": {      "externalId": "string",      "firstName": "string",      "lastName": "string",      "birthDate": "string",      "birthPlace": "string",      "residenceCountryCode": "AF",      "personType": "NATURAL"    }  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "productId": "string",  "partnerInvoiceReference": "string",  "status": "OPEN",  "amount": {    "value": 0,    "currency": "EUR"  },  "customer": {    "externalId": "string",    "firstName": "string",    "lastName": "string",    "birthDate": "string",    "birthPlace": "string",    "residenceCountryCode": "AF",    "personType": "NATURAL"  },  "createdAt": "string",  "paidAt": "string",  "cancelledAt": "string",  "qrCode": {    "format": "datamatrix",    "content": "string",    "expiresAt": "string"  }}
GET
/v3/products/{productId}/invoices

Returns a page of the product invoices, sorted by descending creation date. Pass nextCursor back as cursor to fetch the next page; it is null on the last page.

Authorization

bearer-auth
AuthorizationBearer <token>

Access token issued by POST /v3/oauth/token (OAuth2 client_credentials)

In: header

Path Parameters

productId*string

Product ID

Formatuuid

Query Parameters

status?string

Invoice status

Value in

  • "OPEN"
  • "PAID"
  • "CANCELLED"
partnerInvoiceReference?string

Exact match on the partner invoice reference

Length1 <= length
createdFrom?string

Inclusive lower bound on createdAt, ISO 8601

createdTo?string

Inclusive upper bound on createdAt, ISO 8601

limit?integer

Page size, between 1 and 100. Defaults to 20

Range1 <= value <= 100
Default20
cursor?string

Opaque cursor returned as nextCursor by the previous page

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v3/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/invoices"
{  "items": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "productId": "string",      "partnerInvoiceReference": "string",      "status": "OPEN",      "amount": {        "value": 0,        "currency": "EUR"      },      "customer": {        "externalId": "string",        "firstName": "string",        "lastName": "string",        "birthDate": "string",        "birthPlace": "string",        "residenceCountryCode": "AF",        "personType": "NATURAL"      },      "createdAt": "string",      "paidAt": "string",      "cancelledAt": "string",      "qrCode": {        "format": "datamatrix",        "content": "string",        "expiresAt": "string"      }    }  ],  "nextCursor": "string"}
GET
/v3/products/{productId}/invoices/{invoiceId}

Returns an invoice of the product. qrCode is present only while the invoice is OPEN.

Authorization

bearer-auth
AuthorizationBearer <token>

Access token issued by POST /v3/oauth/token (OAuth2 client_credentials)

In: header

Path Parameters

invoiceId*string

Invoice ID

Formatuuid
productId*string

Product ID

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v3/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "productId": "string",  "partnerInvoiceReference": "string",  "status": "OPEN",  "amount": {    "value": 0,    "currency": "EUR"  },  "customer": {    "externalId": "string",    "firstName": "string",    "lastName": "string",    "birthDate": "string",    "birthPlace": "string",    "residenceCountryCode": "AF",    "personType": "NATURAL"  },  "createdAt": "string",  "paidAt": "string",  "cancelledAt": "string",  "qrCode": {    "format": "datamatrix",    "content": "string",    "expiresAt": "string"  }}
POST
/v3/products/{productId}/invoices/{invoiceId}/cancel

Cancels an OPEN invoice. Cancellation is final: the QR code can no longer be paid and the partnerInvoiceReference stays reserved.

Authorization

bearer-auth
AuthorizationBearer <token>

Access token issued by POST /v3/oauth/token (OAuth2 client_credentials)

In: header

Path Parameters

invoiceId*string

Invoice ID

Formatuuid
productId*string

Product ID

Formatuuid

Request Body

application/json

Invoice cancellation request

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v3/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "productId": "string",  "partnerInvoiceReference": "string",  "status": "OPEN",  "amount": {    "value": 0,    "currency": "EUR"  },  "customer": {    "externalId": "string",    "firstName": "string",    "lastName": "string",    "birthDate": "string",    "birthPlace": "string",    "residenceCountryCode": "AF",    "personType": "NATURAL"  },  "createdAt": "string",  "paidAt": "string",  "cancelledAt": "string",  "qrCode": {    "format": "datamatrix",    "content": "string",    "expiresAt": "string"  }}