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

# Get the payment policy for this purchase

> Ask Ringup how payment should be handled for this purchase, before taking payment. Resolved per purchase from the merchant's settings and the amount: the same merchant can return different statuses for different orders.



## OpenAPI

````yaml /api-reference/openapi.json post /payment_policy
openapi: 3.1.0
info:
  title: Ringup tools API
  description: >-
    Five REST tools for taking payment on a voice call. Identity rides trusted
    headers; the model never types a phone number or merchant id.
  version: 1.0.0
servers:
  - url: https://ringup.dev/api/tools
security: []
paths:
  /payment_policy:
    post:
      summary: Get the payment policy for this purchase
      description: >-
        Ask Ringup how payment should be handled for this purchase, before
        taking payment. Resolved per purchase from the merchant's settings and
        the amount: the same merchant can return different statuses for
        different orders.
      operationId: payment_policy
      parameters:
        - $ref: '#/components/parameters/CallerNumber'
        - $ref: '#/components/parameters/Merchant'
        - $ref: '#/components/parameters/CallId'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount_cents:
                  type: number
                  description: The purchase amount in cents.
            example:
              amount_cents: 8500
      responses:
        '200':
          description: The policy decision for this purchase.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - required
                      - optional
                      - not_required
                    description: >-
                      required: payment must complete before the call ends.
                      optional: offer once, never block. not_required: do not
                      offer payment at all; proceed as the business's normal
                      flow.
                  reason:
                    type: string
                    description: >-
                      One sentence written for the model, telling the payment
                      step how to behave.
              example:
                status: required
                reason: amount over $50 requires payment before the call ends
components:
  parameters:
    CallerNumber:
      name: X-Caller-Number
      in: header
      required: true
      description: >-
        The caller's phone number in E.164, templated from the platform's
        caller-ID variable. Never model-generated.
      schema:
        type: string
        example: '+14155550142'
    Merchant:
      name: X-Ringup-Merchant
      in: header
      required: true
      description: >-
        The dialed number in E.164 (resolved to a merchant server-side) or an
        explicit merchant id.
      schema:
        type: string
        example: tonys-pizza
    CallId:
      name: X-Call-Id
      in: header
      required: false
      description: >-
        The platform's call id. Used for charge idempotency: retries within a
        call can never double-charge.
      schema:
        type: string

````