API referenceAd Account Requests

Quote ad account funds

Prices a top-up exactly as POST /v1/ad-account-requests/{requestId}/top-ups would, and creates nothing. The customer chooses the budget that lands on the ad account; Koast's fee (a rate per payment method) and the platform location fee are added on top, and amountCents is what the payment page charges. Refusals are those of the top-up: 400 validation_failed naming the field for a budget under the minimum or over the maximum, a payment method not offered for the account's currency (bank transfer and crypto are USD only; crypto paid on a payment page is at most 10,000.00 USD per payment) or an ad account the request does not hold; 409 conflict before the ad account is shared.

GET
/v1/ad-account-requests/{requestId}/top-ups/quote
bearerAuth
headerAuthorizationBearer <token>

An organization API key (koast_sk_…) with the API surface enabled, or an OAuth access token issued by Koast (koast_at_…) whose audience covers this API. REST access requires an active Agency plan.

requestId*string

The ad account request id, or its Koast reference (KST-…).

Length1 <= length <= 40
adAccountId*string

The ad account to fund, act_…: one of the request's accounts.

Length1 <= length <= 40
budgetCents*integer

The budget to land on the ad account, in cents of the request's currency. Koast's fee and the platform location fee are added on top of it.

Range0 < value <= 9007199254740991
paymentMethod*string

How the customer pays: card, bank_transfer (a US bank transfer, USD accounts only) or crypto (USDC, USD accounts only, when Koast offers it). Koast's fee depends on it.

Value in"card""bank_transfer""crypto"

Response Body

Quote ad account funds

application/json
  1. response
adAccountId*string
paymentMethod*string

How the customer pays: card, bank_transfer (a US bank transfer, USD accounts only) or crypto (USDC, USD accounts only, when Koast offers it). Koast's fee depends on it.

Value in"card""bank_transfer""crypto"
currency*string
budgetCents*integer

What lands on the ad account.

Range-9007199254740991 <= value <= 9007199254740991
commissionRate*number

Koast's fee rate for this payment method: 0.04 is 4%.

commissionCents*integer

Koast's fee.

Range-9007199254740991 <= value <= 9007199254740991
locationFeeRate*number

The platform location fee rate: 0.025 is 2.5%.

locationFeeCents*integer

The platform location fee.

Range-9007199254740991 <= value <= 9007199254740991
netCents*integer

What Koast sends to the ad account: the budget plus the location fee, which the platform withholds.

Range-9007199254740991 <= value <= 9007199254740991
amountCents*integer

The total the customer pays.

Range-9007199254740991 <= value <= 9007199254740991
curl -X GET "https://example.com/v1/ad-account-requests/string/top-ups/quote?adAccountId=string&budgetCents=1&paymentMethod=card" \  -H "Authorization: Bearer koast_sk_..."
{  "adAccountId": "string",  "paymentMethod": "card",  "currency": "string",  "budgetCents": -9007199254740991,  "commissionRate": 0,  "commissionCents": -9007199254740991,  "locationFeeRate": 0,  "locationFeeCents": -9007199254740991,  "netCents": -9007199254740991,  "amountCents": -9007199254740991}

Required scope: read. CLI: koast quote-ad-account-funds, see Ad Account Requests commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.