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

# Notify payment completion and authorize exit

> Submits a confirmed external payment from your app checkout, wallet, or kiosk to settle a
parking quote and authorize exit gate release or begin the post-payment exit grace period.
Always supply a unique `Idempotency-Key` header.

**Required scope:** `payments:write`




## OpenAPI

````yaml /openapi/openapi.yaml post /v1/payments/notify
openapi: 3.1.0
info:
  title: AKE Parking International Open Platform API
  version: 1.0.0
  description: >-
    Zero-based, international-grade HTTP RPC specification for integrating
    third-party wallets,

    shopping mall loyalty apps, merchant POS systems, hotel/office property
    suites, and facility

    operations platforms with AKE Parking International facilities.


    Core design principles:

    - **Predictable HTTP RPC** (`POST /v1/<domain>/<action>`) with strict
    `camelCase` JSON payloads

    - **Partner-centric authorization** via Bearer API Keys bound to one or more
    facilities and scopes

    - **Deployment-agnostic contract** across Cloud Production, Cloud Sandbox,
    and Local Direct (LAN)

    - **International primitives**: generalized credentials (`PLATE`, `CARD`,
    `TICKET`, `QR_CODE` without
      country-specific fields), ISO 4217 integer minor units (supporting 0/2/3-decimal currencies),
      ISO 8601 timezone-aware timestamps, explicit tax breakdown, and cursor pagination
  contact:
    name: AKE Parking Developer Support
    url: https://www.akeparking.com
servers:
  - url: https://api.akeparking.com
    description: Cloud Production — Global SaaS production environment
  - url: https://sandbox-api.akeparking.com
    description: >-
      Cloud Sandbox — Isolated testing environment with simulated parks and
      devices
  - url: http://{host}:{port}
    description: Local Direct — On-premises LAN server deployment
    variables:
      host:
        default: 192.168.1.100
        description: Local parking server IP address or internal hostname
      port:
        default: '8080'
        description: Local API service port
security:
  - bearerAuth: []
tags:
  - name: Facilities & Occupancy
    description: >-
      Discover authorized facilities, inspect lane topologies and tariffs, and
      manage real-time occupancy counts.
  - name: Sessions & Vehicles
    description: >-
      Query active parked vehicles, historical sessions, correct recognized
      plates, and log manual entries.
  - name: Fees & Payments
    description: >-
      Obtain real-time parking fee quotes with tax and validation breakdowns,
      notify external payments, and process refunds.
  - name: Validations & Merchants
    description: >-
      Browse participating merchants and validation templates, grant digital
      vouchers, claim codes, revoke unused grants, and audit issuance.
  - name: Subscriptions
    description: >-
      Manage subscription plans and long-term parking subscriptions across
      period, stored-value, visit-pack, and duration-pack models.
  - name: Access Lists & Visitors
    description: >-
      Issue timed visitor passes for hotel or office guests and maintain VIP
      allowlists and security blocklists.
  - name: Gates & Devices
    description: >-
      Inspect lane device health, trigger audited gate control operations,
      switch lane modes, send signage/voice prompts, and capture lane cameras.
paths:
  /v1/payments/notify:
    post:
      tags:
        - Fees & Payments
      summary: Notify payment completion and authorize exit
      description: >
        Submits a confirmed external payment from your app checkout, wallet, or
        kiosk to settle a

        parking quote and authorize exit gate release or begin the post-payment
        exit grace period.

        Always supply a unique `Idempotency-Key` header.


        **Required scope:** `payments:write`
      operationId: notifyPayment
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - facilityId
                - sessionId
                - externalOrderId
                - paidAmount
                - paymentMethod
                - paymentSource
                - paidAt
              properties:
                facilityId:
                  $ref: '#/components/schemas/FacilityId'
                sessionId:
                  type: string
                quoteId:
                  type: string
                externalOrderId:
                  type: string
                paidAmount:
                  $ref: '#/components/schemas/Money'
                discountAmount:
                  $ref: '#/components/schemas/Money'
                paymentMethod:
                  $ref: '#/components/schemas/PaymentMethod'
                paymentProvider:
                  type: string
                  description: >-
                    Payment gateway or wallet brand identifier (e.g. `STRIPE`,
                    `GRABPAY`, `APPLE_PAY`, `PAYNOW`).
                  example: GRABPAY
                paymentSource:
                  $ref: '#/components/schemas/PaymentSource'
                validationCodes:
                  type: array
                  items:
                    type: string
                paidAt:
                  $ref: '#/components/schemas/IsoTimestamp'
                releaseExitLaneId:
                  type: string
                  description: >-
                    Optional exit lane ID to raise immediately if the vehicle is
                    already stopped at the barrier.
                operator:
                  type: string
                metadata:
                  $ref: '#/components/schemas/Metadata'
            example:
              facilityId: MY-KL-001
              sessionId: ses_98a71c20f4
              quoteId: qt_01JDRBH802K
              externalOrderId: ord_mall_20261127_9921
              paidAmount:
                amount: 400
                currency: MYR
              discountAmount:
                amount: 200
                currency: MYR
              paymentMethod: DIGITAL_WALLET
              paymentProvider: GRABPAY
              paymentSource: PARTNER_APP
              validationCodes:
                - CPN-8821-ABCD
              paidAt: '2026-11-27T12:01:05+08:00'
              metadata:
                mallMemberId: mbr_88310
      responses:
        '200':
          description: Payment settled and exit entitlement granted.
          content:
            application/json:
              schema:
                type: object
                required:
                  - payment
                properties:
                  payment:
                    $ref: '#/components/schemas/PaymentRecord'
              example:
                payment:
                  paymentId: pay_01JDRBJ44Q
                  externalOrderId: ord_mall_20261127_9921
                  facilityId: MY-KL-001
                  sessionId: ses_98a71c20f4
                  credential:
                    type: PLATE
                    value: WXY1234
                  status: SUCCEEDED
                  grossAmount:
                    amount: 600
                    currency: MYR
                  discountAmount:
                    amount: 200
                    currency: MYR
                  paidAmount:
                    amount: 400
                    currency: MYR
                  refundedAmount:
                    amount: 0
                    currency: MYR
                  paymentMethod: DIGITAL_WALLET
                  paymentProvider: GRABPAY
                  paymentSource: PARTNER_APP
                  paidAt: '2026-11-27T12:01:05+08:00'
                  exitAllowedUntil: '2026-11-27T12:16:05+08:00'
                  gateReleased: false
                  receiptNumber: RCPT-20261127-00412
                  appliedValidations:
                    - CPN-8821-ABCD
                  metadata:
                    mallMemberId: mbr_88310
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '503':
          $ref: '#/components/responses/FacilityOffline'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Unique UUID recommended on all mutating calls to safely retry after
        network timeouts.
      schema:
        type: string
        format: uuid
        example: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    FacilityId:
      type: string
      description: Unique external facility identifier within your partner scope.
      example: MY-KL-001
    Money:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          description: >
            Integer amount in ISO 4217 minor currency units:

            - 2-decimal currencies (`MYR`, `SGD`, `USD`, `EUR`): `1550` =
            `15.50`

            - 0-decimal currencies (`JPY`, `KRW`, `VND`): `1550` = `1550`

            - 3-decimal currencies (`KWD`, `BHD`): `1550` = `1.550`
        currency:
          $ref: '#/components/schemas/CurrencyCode'
    PaymentMethod:
      type: string
      enum:
        - CARD
        - DIGITAL_WALLET
        - BANK_TRANSFER
        - CASH
        - STORED_VALUE
        - OTHER
      description: >-
        Normalized payment instrument used to settle the transaction; use
        `paymentProvider` to specify the concrete processor or wallet brand
        (e.g. `stripe`, `apple_pay`, `tng`).
    PaymentSource:
      type: string
      enum:
        - PARTNER_APP
        - WEB_CHECKOUT
        - KIOSK
        - EXIT_TERMINAL
        - ATTENDANT_POS
        - AUTOPAY
    IsoTimestamp:
      type: string
      format: date-time
      description: ISO 8601 timestamp with explicit timezone offset or `Z` UTC suffix.
      example: '2026-11-27T12:00:00+08:00'
    Metadata:
      type: object
      additionalProperties:
        type: string
      maxProperties: 10
      description: >-
        Flat key-value partner correlation metadata (maximum 10 keys, string
        values only).
    PaymentRecord:
      type: object
      required:
        - paymentId
        - externalOrderId
        - facilityId
        - sessionId
        - credential
        - status
        - paidAmount
        - refundedAmount
        - paymentMethod
        - paymentSource
        - paidAt
        - gateReleased
        - receiptNumber
      properties:
        paymentId:
          type: string
        externalOrderId:
          type: string
        facilityId:
          $ref: '#/components/schemas/FacilityId'
        sessionId:
          type: string
        credential:
          $ref: '#/components/schemas/Credential'
        status:
          type: string
          enum:
            - SUCCEEDED
            - PARTIALLY_REFUNDED
            - REFUNDED
        grossAmount:
          $ref: '#/components/schemas/Money'
        discountAmount:
          $ref: '#/components/schemas/Money'
        paidAmount:
          $ref: '#/components/schemas/Money'
        refundedAmount:
          $ref: '#/components/schemas/Money'
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        paymentProvider:
          type:
            - string
            - 'null'
        paymentSource:
          $ref: '#/components/schemas/PaymentSource'
        paidAt:
          $ref: '#/components/schemas/IsoTimestamp'
        exitAllowedUntil:
          type:
            - string
            - 'null'
          format: date-time
        gateReleased:
          type: boolean
        receiptNumber:
          type: string
        appliedValidations:
          type: array
          items:
            type: string
        metadata:
          $ref: '#/components/schemas/Metadata'
        taxBreakdown:
          oneOf:
            - $ref: '#/components/schemas/TaxBreakdown'
            - type: 'null'
        receiptUrl:
          type:
            - string
            - 'null'
          format: uri
          description: Optional hosted digital receipt URL.
    CurrencyCode:
      type: string
      minLength: 3
      maxLength: 3
      description: >-
        Three-letter uppercase ISO 4217 currency code (e.g. `MYR`, `SGD`, `USD`,
        `JPY`, `KWD`).
      example: MYR
    Credential:
      type: object
      required:
        - type
        - value
      properties:
        type:
          $ref: '#/components/schemas/CredentialType'
        value:
          type: string
      description: Generalized vehicle or user credential scoped to the target facility.
    TaxBreakdown:
      type: object
      required:
        - included
        - ratePercent
        - taxAmount
      properties:
        included:
          type: boolean
          description: >-
            True when tax is inclusive in gross/payable amounts; false when tax
            is added on top.
        taxName:
          type:
            - string
            - 'null'
          description: Optional statutory tax label such as `GST`, `VAT`, or `SST`.
        ratePercent:
          type: number
          minimum: 0
          description: >-
            Applied statutory tax rate percentage (e.g. `8.0` for 8%
            SST/GST/VAT).
        netAmount:
          oneOf:
            - $ref: '#/components/schemas/Money'
            - type: 'null'
          description: Optional pre-tax net parking fee before tax.
        taxAmount:
          $ref: '#/components/schemas/Money'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
            details:
              type:
                - object
                - 'null'
    CredentialType:
      type: string
      enum:
        - PLATE
        - CARD
        - TICKET
        - QR_CODE
      description: >-
        Generalized entry/exit credential types: `PLATE` (normalized uppercase
        ASCII without spaces/hyphens), `CARD` (physical/RFID/tokenized card ID —
        never pass raw payment card PAN), `TICKET` (paper/barcode ticket ID),
        `QR_CODE` (QR or app user code).
  responses:
    Conflict:
      description: >-
        Business state conflict (such as duplicate payment or reused
        Idempotency-Key with different body).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: ALREADY_PAID
              message: Parking session ses_98a71c20f4 has already been settled.
              requestId: req_01JDR9Y2D6T8X
              details: null
    Unprocessable:
      description: >-
        Request syntax is valid but business validation failed (e.g., expired
        quote or insufficient merchant quota).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: QUOTE_EXPIRED
              message: Fee quote qt_01JDRBH802K has expired; request a fresh quote.
              requestId: req_01JDR9Y3E7V1L
              details: null
    FacilityOffline:
      description: Target parking facility is temporarily unreachable or offline.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: FACILITY_OFFLINE
              message: >-
                Facility MY-KL-001 is temporarily unreachable. Please retry
                shortly.
              requestId: req_01JDR9Y5G9Z0K
              details: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >
        Partner API Key passed in the `Authorization` header: `Authorization:
        Bearer ak_live_...`

        (or `ak_test_...` for Cloud Sandbox, `ak_local_...` for Local Direct).

````

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