Skip to content

Calculate payment terms

GET
/offers/terms
curl --request GET \
--url 'https://apisandbox.puurk.com/offers/terms?purchase_amount=1&oid=example' \
--header 'Authorization: Bearer <token>'

Calculate payment plan terms for a purchase. Authenticate with either a service token carrying terms:read for the organization, or a public client_id issued for the terms widget.

purchase_amount
required
integer

Purchase amount in cents

down_payment
integer

Down payment amount in cents

oid
required
string

Organization ID

client_id
string

Public API client ID (widget auth path; omit when sending a service token)

Successful operation

Media typeapplication/json
object
terms
Array<object>

One payment-plan option returned by GET /offers/terms

object
term_length
required

Plan length in months

integer
monthly_payment
required

Monthly payment in cents

integer
total_payment
required

Total paid over the plan in cents

integer
Examplegenerated
{
"terms": [
{
"term_length": 1,
"monthly_payment": 1,
"total_payment": 1
}
]
}

Missing or invalid parameters (invalid_params). Returned when oid or purchase_amount is absent, when purchase_amount or down_payment is not a non-negative integer amount in cents, or when down_payment exceeds purchase_amount.

Media typeapplication/json

The standard error body. error is a stable, machine-readable code — branch on it rather than on message, which is for humans and may change.

object
error

Machine-readable error code.

string
message

Human-readable detail.

string
Example
{
"error": "invalid_params",
"message": "oid is required"
}

Unauthorized