> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oxanaut.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Créer une session de paiement pour une offre



## OpenAPI

````yaml /openapi.fr.json post /v1/billing/checkout
openapi: 3.0.0
info:
  title: OneSubnet Core API
  description: >-
    OneSubnet hosting panel API. Toutes les routes sont préfixées par /v1/
    (versioning URI). Les routes Panel sont appelées par le daemon Wings, pas
    par les clients. Les routes Admin nécessitent le rôle admin.
  version: '1.0'
  contact: {}
servers: []
security: []
tags:
  - name: Auth & Users
    description: Authentification, profil, gestion utilisateurs
  - name: Store
    description: 'Boutique: catégories, produits, panier'
  - name: Billing
    description: Facturation, checkout Stripe, webhooks
  - name: Services
    description: Services hébergés (enregistrements facturation)
  - name: Affiliation
    description: Parrainage et commissions
  - name: Notifications
    description: Notifications
  - name: Admin - RBAC
    description: Gestion des rôles, permissions, groupes
  - name: Admin - Store & Invoices
    description: CRUD produits, plans, coupons, factures
  - name: Admin - Settings & Tenants
    description: Configuration, multi-tenant, whitelabel
  - name: Admin - Audit
    description: Journal d'audit des requêtes
  - name: System
    description: Health, meta-info
paths:
  /v1/billing/checkout:
    post:
      tags:
        - Billing
      summary: Créer une session de paiement pour une offre
      operationId: BillingController_createCheckout_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCheckoutDto'
      responses:
        '201':
          description: ''
      security:
        - bearer: []
components:
  schemas:
    CreateCheckoutDto:
      type: object
      properties:
        sku:
          type: string
          example: mc-java-17
          description: Offer SKU to purchase.
        quantity:
          type: number
          example: 1
          minimum: 1
          maximum: 100
          default: 1
        planId:
          type: string
          description: >-
            ID of the billing Plan to use. If omitted, the first (cheapest)
            active plan is used.
        eggId:
          type: string
          description: >-
            Selected egg variant (software choice, e.g. Velocity instead of the
            default Bungeecord). Must be the product default egg or one of its
            `eggVariants`; otherwise the checkout is rejected with a 400.
        configs:
          type: object
          description: >-
            Selected config options, keyed by configOptionId → chosen value
            (matching a choice `value` in the option's `choices` JSON array).
          example:
            ram: '4096'
            disk: '50'
        couponCode:
          type: string
          description: >-
            Optional coupon code to apply at checkout. Validated against the
            Coupon table (must exist, be active, and not be expired).
          example: SUMMER25
        gatewayType:
          type: string
          description: >-
            Gateway type to use for this checkout (e.g. "stripe", "manual").
            When omitted, the default enabled gateway is used. A "manual"
            gateway leaves the invoice PENDING (awaiting payment) and returns no
            redirect URL.
          example: manual
        useCredits:
          type: boolean
          description: >-
            When true, apply the customer account credit balance to the order,
            capped at `loyalty.max_credit_usage_percent` (default 50%) of the
            post-coupon total. The credits are deducted atomically and the
            remaining balance is charged via the gateway. The customer always
            pays at least (100 − max)% out of pocket.
          default: false
          example: true
      required:
        - sku
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

## Related topics

- [Générer un lien de paiement brandé pour une facture](/api-reference/billing/générer-un-lien-de-paiement-brandé-pour-une-facture.md)
- [Créer un SetupIntent pour enregistrer un moyen de paiement](/api-reference/billing/créer-un-setupintent-pour-enregistrer-un-moyen-de-paiement.md)
- [Créer une session Portail Client Stripe](/api-reference/billing/créer-une-session-portail-client-stripe.md)
- [Boutique et panier](/panel/boutique.md)
- [Créer une nouvelle clé API pour l’utilisateur courant](/api-reference/billing/créer-une-nouvelle-clé-api-pour-l’utilisateur-courant.md)
