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

# Cancel a payment intent

> Cancels an intent only while its current lifecycle state permits cancellation.



## OpenAPI

````yaml /openapi.json post /api/v1/business/payment-intents/{id}/cancel
openapi: 3.1.0
info:
  title: NorthFond Business API
  version: 1.0.0
  summary: Provider-neutral stablecoin on-ramp and off-ramp infrastructure.
  description: >-
    NorthFond lets businesses accept payments, inspect treasury balances,
    provision or register EVM wallets, store beneficiaries, request quotes,
    initiate on-ramps and off-ramps, confirm settlement, and track transactions.
    Sandbox and live credentials use the same API contract and remain isolated.
  contact:
    name: NorthFond API Support
servers:
  - url: https://payment.gideondevrel.xyz
    description: Configured NorthFond API environment
security:
  - ApiKeyAuth: []
tags:
  - name: Account
    description: Authenticated business context.
  - name: Customers
    description: Business-owned customers and managed wallets.
  - name: Beneficiaries
    description: Encrypted, reusable payout destinations.
  - name: Wallets
    description: Managed and external EVM funding wallets.
  - name: Quotes
    description: Provider-neutral off-ramp prices.
  - name: Off-ramps
    description: Stablecoin-to-fiat payout initiation.
  - name: On-ramps
    description: Fiat-to-stablecoin deposit initiation.
  - name: Payment intents
    description: Customer payment collection and lifecycle management.
  - name: Treasury
    description: Business settlement wallet, balances, deposits, and ledger activity.
  - name: Transactions
    description: Payment status, events, and settlement.
externalDocs:
  description: NorthFond developer documentation
  url: /docs
paths:
  /api/v1/business/payment-intents/{id}/cancel:
    post:
      tags:
        - Payment intents
      summary: Cancel a payment intent
      description: >-
        Cancels an intent only while its current lifecycle state permits
        cancellation.
      operationId: cancelPaymentIntent
      parameters:
        - name: id
          in: path
          required: true
          description: NorthFond resource identifier.
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: Payment intent cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: >-
        A unique key for this logical write operation. Reuse it when retrying
        the exact same request.
      schema:
        type: string
        minLength: 8
        maxLength: 255
      example: operation_01K4ZJBP5S9J9T7AM6XW8HCT2F
  schemas:
    PaymentIntent:
      type: object
      required:
        - id
        - external_reference
        - amount
        - accepted_payment_methods
        - settlement
        - payment_instructions
        - status
        - customer
        - metadata
        - expires_at
        - cancelled_at
        - completed_at
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        external_reference:
          type: string
        amount:
          type: object
          required:
            - currency
            - value
          properties:
            currency:
              type: string
              enum:
                - KES
                - USDC
            value:
              type: string
        accepted_payment_methods:
          type: array
          items:
            type: string
            enum:
              - mobile_money
              - stablecoin
        settlement:
          type: object
          required:
            - mode
            - currency
            - asset
            - chain
            - amount
            - exchange_rate
          properties:
            mode:
              type: string
              enum:
                - stablecoin
                - local_currency
            currency:
              type: string
              enum:
                - KES
                - USDC
            asset:
              const: USDC
            chain:
              const: base
            amount:
              type: string
            exchange_rate:
              type: string
            beneficiary_id:
              type:
                - string
                - 'null'
              format: uuid
            payout_status:
              type:
                - string
                - 'null'
            payout_transaction_id:
              type:
                - string
                - 'null'
              format: uuid
            payout_error:
              type:
                - string
                - 'null'
        payment_instructions:
          oneOf:
            - type: 'null'
            - type: object
              required:
                - type
                - asset
                - chain
                - address
              properties:
                type:
                  const: stablecoin
                asset:
                  const: USDC
                chain:
                  const: base
                address:
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
        status:
          $ref: '#/components/schemas/PaymentIntentStatus'
        customer:
          type: object
          additionalProperties: true
        metadata:
          type: object
          additionalProperties: true
        expires_at:
          type: string
          format: date-time
        cancelled_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PaymentIntentStatus:
      type: string
      enum:
        - awaiting_payment
        - funds_detected
        - processing
        - completed
        - expired
        - cancelled
        - failed
        - review_required
        - approved
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
            requestId:
              type: string
              format: uuid
            details: {}
  responses:
    BadRequest:
      description: The request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: The API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The API key lacks the required scope or the source IP is not allowed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The tenant-scoped resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: The request conflicts with current resource or idempotency state.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnprocessableEntity:
      description: The request is understood but cannot be processed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: The credential rate limit was exceeded.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unavailable:
      description: A required service or environment configuration is unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: nf_test_… or nf_live_…
      description: A secret NorthFond business API key. Keep it on your server.

````