Skip to content

Area: Developers

POST

Confirm a usage charge

Path
/partners/domains/usageRecords/confirm
Auth
Partner token · partner server only
POST
/partners/domains/usageRecords/confirm
Code sample: cURL
# $SIGNED_PAYLOAD: the request claims as a JWT signed with your private key, see https://releva.ai/documentation/reference/partners/overview/#authentication
curl --request POST \
--url 'https://releva.ai/api/v0/partners/domains/usageRecords/confirm' \
--header 'content-type: application/json' \
--header "x-rlv-partner-token: $RELEVA_PARTNER_TOKEN" \
--data "{\"payload\": \"$SIGNED_PAYLOAD\"}"

Tells Releva that a usage charge it sent to your usage webhook was collected. acceptedAmount (in the charge’s currency) is capped at the charged amount; zero or less leaves the charge pending so Releva sends it again. Repeating a confirm changes nothing. Only for partners with external billing.

Media typeapplication/json
object
payload
required

The request fields as JWT claims, signed with your RSA private key (RS512 recommended; RS256/384 and PS256/384/512 are also accepted) with a short expiry (expiresIn: '1h'). The operation’s x-signed-claims schema lists the claims.

string

Example generated

{
"payload": "example"
}

confirmed: true when the charge is (now or already) accepted, false when it stays pending.

Media typeapplication/json
object
confirmed
required
boolean

Example generated

{
"confirmed": true
}

Partner token, shop lookup or billing mode error.

Media typeapplication/json
object
message
required

Human-readable error. Several validation errors are joined with a space.

string

Examples

{
"message": "Partner identification is missing!"
}

No charge with this id for this shop (also for a missing or non-numeric id).

Media typeapplication/json
object
message
required

Human-readable error. Several validation errors are joined with a space.

string

Example

{
"message": "Unknown usage charge for this domain"
}

The payload could not be verified (missing, not a JWT, signed with another key, or expired), or another unexpected error.

Media typeapplication/json
object
message
required

Human-readable error. Several validation errors are joined with a space.

string

Example

{
"message": "An internal error occurred."
}