Skip to content
Indiana
Dashboard
Docs
Browse docs / Confirm automatic payment authorization

Confirm automatic payment authorization

POST/api/v1/billing/authorizations/confirm

The customer explicitly accepts this authorization's fixed terms after payment setup. Retries reference the same authorization.

API v1Updated

Make the request

The customer explicitly accepts this authorization's fixed terms after payment setup. Retries reference the same authorization.

Credential
Customer token only. Identity is bound to the token.
Permission
billing:write
Set the base URL and App ID from SDK setup. These examples use placeholders and do not execute requests. Never put a server key in browser code.
For this Web Beta, configure the Stripe Sandbox test account and fixed Product Prices before checkout. Redirects do not confirm payment.
request.shShell
curl -X POST "$INDIANA_BASE_URL/api/v1/billing/authorizations/confirm" \  -H "Authorization: Bearer $INDIANA_CUSTOMER_TOKEN" \  -H "X-Indiana-Project: $INDIANA_PROJECT_ID" \  -H "X-Indiana-Protocol: 0.5" \  -H "X-Indiana-Environment: sandbox" \  -H "Content-Type: application/json" \  -d '{  "authorizationId": "00000000-0000-4000-8000-000000000001",  "accepted": true}'

The response tab lists field types, not an example payload. Actual values depend on customer state.

Request parameters

JSON body

authorizationIduuidRequired

The authorizationId value for this operation. Its accepted type and constraints are listed above and below.

acceptedtrueRequired

Whether business rules accepted the operation. HTTP 200 does not imply accepted is true.

Response fields

Successful responses include requestId and scope. Use the actual business status or accepted field to determine the result. Optional fields are omitted when unavailable.

HTTP 200 · application/json

requestIduuidRequired

Server-generated HTTP request UUID. Include it when reporting a failed request.

scopeobjectRequired

The App and environment of this response. Headers only verify scope; they cannot switch key scope.

Show child fields
projectIdstringRequired

App ID bound to the credential.

minLength: 1

environmentenumRequired

Separate data scope: sandbox or live.

Show allowed values

"sandbox""live"

authorizationobjectRequired

The authorization value for this operation. Its accepted type and constraints are listed above and below.

Show child fields
iduuidRequired

The id value for this operation. Its accepted type and constraints are listed above and below.

termsobject | objectRequired

The terms value for this operation. Its accepted type and constraints are listed above and below.

Show child fields
productVersionIduuid | uuidRequired

The productVersionId value for this operation. Its accepted type and constraints are listed above and below.

internal_feature_iduuid | uuidRequired

The internal_feature_id value for this operation. Its accepted type and constraints are listed above and below.

currencyenum | enumRequired

Currency code supported by the published price.

kind"auto_topup" | "postpaid"Required

The kind value for this operation. Its accepted type and constraints are listed above and below.

thresholdobjectOptional

The threshold value for this operation. Its accepted type and constraints are listed above and below.

quantityobjectOptional

Use the declared field type for business quantity. Credit operations use decimal strings to avoid floating-point error. quote/reserve/confirm/refund require positive quantities; consume can record zero-cost events.

purchaseLimitobjectOptional

The purchaseLimit value for this operation. Its accepted type and constraints are listed above and below.

Show child fields
intervalenumRequired

The interval value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"hour""day""week""month"

intervalCountintegerRequired

Charging interval count: up to 156 weeks, 36 months or 3 years; omitted means 1. Not accepted for free or one_time. Allowance resets remain independent.

min: 1 · max: 12

limitintegerRequired

Maximum records per page, subject to the contract limit.

min: 1 · max: 1000000

purchaseAmountMinorstringOptional

The purchaseAmountMinor value for this operation. Its accepted type and constraints are listed above and below.

pattern: ^(?:[1-9]\d{0,7}|1\d{8}|200000000)$

purchaseUnitsobjectOptional

The purchaseUnits value for this operation. Its accepted type and constraints are listed above and below.

maxAmountMinorPerPeriodstringOptional

The maxAmountMinorPerPeriod value for this operation. Its accepted type and constraints are listed above and below.

pattern: ^(?:[1-9]\d{0,7}|1\d{8}|200000000)$

maxOutstandingMinorstringOptional

The maxOutstandingMinor value for this operation. Its accepted type and constraints are listed above and below.

pattern: ^(?:[1-9]\d{0,7}|1\d{8}|200000000)$

cashPriceobjectOptional

The cashPrice value for this operation. Its accepted type and constraints are listed above and below.

Show child fields
currencyenumRequired

Currency code supported by the published price.

Show allowed values

"USD""EUR""CNY""GBP""JPY""CAD""AUD""NZD""CHF""HKD""SGD""KRW""INR""BRL""MXN""TWD""THB""IDR""MYR""PHP""VND""ZAR""AED""SAR""SEK""NOK""DKK""PLN""CZK""HUF""ILS""TRY""RON"

pricingobject | objectRequired

The pricing value for this operation. Its accepted type and constraints are listed above and below.

billingCycleobjectOptional

The billingCycle value for this operation. Its accepted type and constraints are listed above and below.

statusenumRequired

The status value for this operation. Its accepted type and constraints are listed above and below.

Show allowed values

"prepared""active""revoked""blocked"

createdAtdate-timeRequired

ISO 8601 UTC time when the record was created.

acceptedAtdate-time | nullRequired

The acceptedAt value for this operation. Its accepted type and constraints are listed above and below.

effectiveAtdate-time | nullRequired

The effectiveAt value for this operation. Its accepted type and constraints are listed above and below.

revokedAtdate-time | nullRequired

The revokedAt value for this operation. Its accepted type and constraints are listed above and below.

Handle errors

Common failures
CodeRecovery
UNAUTHENTICATEDVerify the key or refresh the expired customer token once.
FORBIDDENCheck current key permissions and customer access.
INVALID_REQUESTCheck field types, UUIDs, decimal strings and mutually exclusive fields.
SCOPE_MISMATCHUse the App and environment bound to the credential.

Common failures

  • UNAUTHENTICATED

    Recovery
    Verify the key or refresh the expired customer token once.
  • FORBIDDEN

    Recovery
    Check current key permissions and customer access.
  • INVALID_REQUEST

    Recovery
    Check field types, UUIDs, decimal strings and mutually exclusive fields.
  • SCOPE_MISMATCH

    Recovery
    Use the App and environment bound to the credential.

Related:All request and error conventions·Back to endpoint index