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.
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 Access token issued by POST /v3/oauth/token (OAuth2 client_credentials)
In: header
Path Parameters
Product ID
uuidRequest 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" }}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 Access token issued by POST /v3/oauth/token (OAuth2 client_credentials)
In: header
Path Parameters
Product ID
uuidQuery Parameters
Invoice status
Value in
- "OPEN"
- "PAID"
- "CANCELLED"
Exact match on the partner invoice reference
1 <= lengthInclusive lower bound on createdAt, ISO 8601
Inclusive upper bound on createdAt, ISO 8601
Page size, between 1 and 100. Defaults to 20
1 <= value <= 10020Opaque cursor returned as nextCursor by the previous page
1 <= lengthResponse 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"}Returns an invoice of the product. qrCode is present only while the invoice is OPEN.
Authorization
bearer-auth Access token issued by POST /v3/oauth/token (OAuth2 client_credentials)
In: header
Path Parameters
Invoice ID
uuidProduct ID
uuidResponse 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" }}Cancels an OPEN invoice. Cancellation is final: the QR code can no longer be paid and the partnerInvoiceReference stays reserved.
Authorization
bearer-auth Access token issued by POST /v3/oauth/token (OAuth2 client_credentials)
In: header
Path Parameters
Invoice ID
uuidProduct ID
uuidRequest 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" }}