Skip to main content
POST
/
payment_policy
Get the payment policy for this purchase
curl --request POST \
  --url https://ringup.dev/api/tools/payment_policy \
  --header 'Content-Type: application/json' \
  --header 'X-Caller-Number: <x-caller-number>' \
  --header 'X-Ringup-Merchant: <x-ringup-merchant>' \
  --data '
{
  "amount_cents": 8500
}
'
{
  "status": "required",
  "reason": "amount over $50 requires payment before the call ends"
}

Headers

X-Caller-Number
string
required

The caller's phone number in E.164, templated from the platform's caller-ID variable. Never model-generated.

Example:

"+14155550142"

X-Ringup-Merchant
string
required

The dialed number in E.164 (resolved to a merchant server-side) or an explicit merchant id.

Example:

"tonys-pizza"

X-Call-Id
string

The platform's call id. Used for charge idempotency: retries within a call can never double-charge.

Body

application/json
amount_cents
number

The purchase amount in cents.

Response

200 - application/json

The policy decision for this purchase.

status
enum<string>

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.

Available options:
required,
optional,
not_required
reason
string

One sentence written for the model, telling the payment step how to behave.