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

# Receive checkout payment callback

> Webhook your application must implement. After a customer completes or fails a checkout payment, Bpay POSTs the payment status to your configured callback URL. Replace the server URL with your own HTTPS endpoint.



## OpenAPI

````yaml /openapi/payments-checkout.json post /callback
openapi: 3.0.3
info:
  title: Beem Payments Checkout API
  version: 1.0.0
  description: >-
    Bpay Checkout: request a hosted payment page, whitelist domains for iframe
    checkout, and receive payment status callbacks.
  contact:
    name: Beem
    url: https://beem.africa
    email: support@beem.africa
servers:
  - url: https://checkout.beem.africa/v1
    description: Bpay Checkout API
security: []
tags: []
paths:
  /callback:
    post:
      summary: Receive checkout payment callback
      description: >-
        Webhook your application must implement. After a customer completes or
        fails a checkout payment, Bpay POSTs the payment status to your
        configured callback URL. Replace the server URL with your own HTTPS
        endpoint.
      operationId: receiveCheckoutPaymentCallback
      parameters:
        - name: beem-secure-token
          in: header
          required: false
          schema:
            type: string
          description: >-
            Client validation token from the original checkout request, if
            provided.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
                - referenceNumber
                - status
                - timestamp
                - transactionID
                - msisdn
              properties:
                amount:
                  type: string
                  description: Amount paid by the customer.
                referenceNumber:
                  type: string
                  description: Reference number matching the checkout request.
                status:
                  type: string
                  enum:
                    - success
                    - failed
                  description: Payment status.
                timestamp:
                  type: string
                  format: date-time
                  description: Payment date-time in ISO 8601 format.
                transactionID:
                  type: string
                  description: Transaction ID matching the checkout request.
                msisdn:
                  type: string
                  description: Customer mobile number.
            examples:
              success:
                summary: Successful payment
                value:
                  amount: '10000'
                  referenceNumber: SAMPLE-12345
                  status: success
                  timestamp: '2021-06-17T11:34:28.608Z'
                  transactionID: '12345678'
                  msisdn: '255701000000'
              failed:
                summary: Failed payment
                value:
                  amount: '10000'
                  referenceNumber: SAMPLE-12345
                  status: failed
                  timestamp: '2021-06-17T11:34:28.608Z'
                  transactionID: '12345678'
                  msisdn: '255701000000'
      responses:
        '200':
          description: Acknowledge receipt of the payment status
          content:
            application/json:
              schema:
                type: object
                required:
                  - amount
                  - status
                  - referenceNumber
                  - statusMessage
                  - transactionID
                properties:
                  amount:
                    type: string
                    description: Echo the amount from the callback request.
                  status:
                    type: boolean
                    description: Set to true when payment succeeded, false otherwise.
                  referenceNumber:
                    type: string
                    description: Echo the reference number from the callback request.
                  statusMessage:
                    type: string
                    description: Human-readable status message for your records.
                  transactionID:
                    type: string
                    description: Echo the transaction ID from the callback request.
              examples:
                acknowledged:
                  summary: Acknowledge payment
                  value:
                    amount: '10000'
                    status: true
                    referenceNumber: SAMPLE-12345
                    statusMessage: Payment was successful!
                    transactionID: '12345678'
      servers:
        - url: https://example.com
          description: Your callback server — replace with your URL

````