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

# Purchase education pin

> Purchase education pin



## OpenAPI

````yaml POST /api/v1/education-pin/purchase
openapi: 3.1.0
info:
  title: Dancity API
  description: >-
    Paths below match the server base URL + global prefix `api`. Merchant:
    `Authorization: Bearer dcy_live_...` and `channel: API`. App: JWT. See
    Guides for flows.
  version: 1.0.0
servers:
  - url: https://api.dancity.app
    description: Production
  - url: http://localhost:6565
    description: Local development
security: []
tags:
  - name: VAS
    description: >-
      Merchant API (`/api/v1`): catalog GETs (wallet, services, products, plans)
      and purchase routes; `channel: API` on POST buys; app education & betting
      where listed
  - name: Products & services
    description: 'Catalog GETs: all services; products and plans with optional query filters'
  - name: Wallet
    description: Get wallet by id (JWT)
  - name: Transactions
    description: Fetch your transactions and requery one by id for current status
  - name: Betting
    description: Betting funding
  - name: Education
    description: Education pins
  - name: eSIM
    description: eSIM catalog and purchase
  - name: Webhook
    description: Outbound events Dancity POSTs to your configured HTTPS URL
paths:
  /api/v1/education-pin/purchase:
    post:
      tags:
        - Education
      summary: Purchase education pin
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - quantity
                - exam_name
              properties:
                quantity:
                  type: number
                  minimum: 1
                  maximum: 5
                  example: 1
                exam_name:
                  type: string
                  description: >-
                    Exam product name from GET /api/v1/products (e.g. WAEC
                    Result Checker).
                  example: WAEC Result Checker
                examNumber:
                  type: string
                  description: Required when exam_name is JAMB.
                  example: '0123456789'
                customerRef:
                  type: string
                  example: EDU-REF-001
                promocode:
                  type: string
                  example: EDU10
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                success: true
                message: Education pins purchased
                data:
                  transactionId: TXN-20260506-007
                  pins:
                    - pin: '****-****-****'
                      serial: SN-001
                      expiry: '2027-01-01'
        '400':
          description: Bad request
          content:
            application/json:
              example:
                success: false
                message: Validation failed
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                success: false
                message: Invalid API key or IP not allowlisted
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              example:
                success: false
                message: Sorry, something went wrong. Please try again later
                statusCode: 500
      security:
        - DancityApiKey: []
components:
  securitySchemes:
    DancityApiKey:
      type: http
      scheme: bearer
      bearerFormat: dcy_live_...
      description: Merchant API key from the Dancity dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.