Dashboard
APICancel Payment Request API - Expire a Checkout | BotSubscription
api.botsubscription.com
GET/v1/endpoint
AuthenticationBearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Mock
curl --request GET \
  --url https://api.botsubscription.com/v1/endpoint \
  --header 'Authorization: Bearer sk_live_•••'

Cancel Payment Request - Expire a Pending Checkout via API

Cancel an existing hosted checkout that is still pending. BotSubscription expires the provider session first, then updates the local payment request—so a payment that completes at the same moment always wins over the cancellation.

POST/v2/projects/{project_id}/payment-requests/{payment_request_id}/cancel

Authorization

Bearer TokenRequired

The request body and query string must both be empty. A project or API-key token needs the payment-requests:update permission; a user token may only cancel a payment request it owns.

Path Parameters

project_idstringrequired

The unique identifier of the project.

payment_request_idstringrequired

The unique identifier of the payment request to cancel (UUID).

If the provider returns an indeterminate result, BotSubscription responds with a retryable error rather than guessing at the outcome—retry the cancellation once the provider's state is clear.

Last updated: