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

# Generate a checkout

> Creates a new checkout session and returns a URL that you can redirect your customer to for payment.
The customer will be able to complete the payment using their Mobipurse wallet or other available payment methods.




## OpenAPI

````yaml api-reference/openapi-3.1.yml post /v1/checkouts
openapi: 3.0.3
info:
  title: Mobipurse API
  description: >
    Mobipurse is a universal wallet platform that enables merchants to accept
    payments and make disbursements to customers across any country.


    ## Authentication

    All API requests require authentication using an API key. Include your API
    key in the `x-api-key` header.


    ## Environments

    - **Staging**: `https://staging-api.mobipurse.com`

    - **Production**: `https://api.mobipurse.com`


    ## Support

    - Email: support@mobipurse.com

    - Dashboard: https://mobipurse.com
  version: 1.0.0
  contact:
    email: support@mobipurse.com
servers:
  - url: https://staging-api.mobipurse.com
    description: Staging server
  - url: https://api.mobipurse.com
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Checkouts
    description: Operations for creating and managing payment checkouts
  - name: Disbursements
    description: Operations for making disbursements to recipients
paths:
  /v1/checkouts:
    post:
      tags:
        - Checkouts
      summary: Generate a checkout
      description: >
        Creates a new checkout session and returns a URL that you can redirect
        your customer to for payment.

        The customer will be able to complete the payment using their Mobipurse
        wallet or other available payment methods.
      operationId: createCheckout
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCheckoutRequest'
            examples:
              basic:
                summary: Basic checkout
                value:
                  amount: 200000
                  country: CI
                  currency: XOF
                  locale: fr
                  webhookURL: https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1
                  redirectURL: https://mobipurse.com
      responses:
        '200':
          description: Checkout created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCheckoutResponse'
              examples:
                success:
                  summary: Successful checkout creation
                  value:
                    statusCode: 200
                    data:
                      url: >-
                        https://staging.mobipurse.com/checkouts/DMBC20251110154056OSPHM
                      reference: DMBC20251110154056OSPHM
                      merchantsReference: DMBC20251110154056OSPHM
                      amount: 200000
                      fee: 9600
                      status: pending
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CreateCheckoutRequest:
      type: object
      required:
        - amount
        - country
        - currency
      properties:
        amount:
          type: integer
          description: >-
            The amount to charge in the lowest currency denomination (e.g.,
            200000 for 2000.00)
          example: 200000
          minimum: 1
        country:
          type: string
          description: The 2-character ISO country code
          example: CI
          pattern: ^[A-Z]{2}$
        currency:
          type: string
          description: The 3-character ISO currency code
          example: XOF
          pattern: ^[A-Z]{3}$
        reference:
          type: string
          description: >-
            Unique merchant reference for the checkout. Must be unique for each
            checkout.
          example: 2a59004d-72a9-4bdc-9893-abff8fa6ffb4
        locale:
          type: string
          description: Locale of the checkout page. Defaults to 'en' if not specified.
          example:
            - en
            - fr
        webhookURL:
          type: string
          format: uri
          description: URL to receive webhook notifications for payment events
          example: https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1
        redirectURL:
          type: string
          format: uri
          description: URL to redirect the customer after payment completion
          example: https://mobipurse.com
    CreateCheckoutResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 200
        data:
          type: object
          properties:
            url:
              type: string
              format: uri
              description: The checkout URL to redirect the customer to
              example: https://staging-mobipurse.com/checkouts/DMBC20251110154056OSPHM
            reference:
              type: string
              description: Unique reference generated by Mobipurse
              example: DMBC20251110154056OSPHM
            merchantsReference:
              type: string
              description: Merchant's reference for the checkout
              example: DMBC20251110154056OSPHM
            amount:
              type: integer
              description: The checkout amount
              example: 200000
            fee:
              type: integer
              description: The transaction fee
              example: 9600
            status:
              type: string
              enum:
                - pending
                - success
                - failed
              description: Current status of the checkout
              example: pending
    Error:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          type: string
          example: Invalid request parameters
        error:
          type: string
          example: Bad Request
  responses:
    BadRequest:
      description: Bad request - Invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            error: Invalid request parameters
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            error: Invalid API key
    UnprocessableEntity:
      description: Unprocessable entity - Validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 422
            error: Invalid phone number format
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 500
            error: Internal Server Error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Generate this from your Mobipurse dashboard
        under Settings → API Keys.

````