The payment-sheet secrets for the purchase waiting on a payment.
POST
/billing/purchase/complete
const url = 'https://api.siteqwality.com/billing/purchase/complete';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siteqwality.com/billing/purchase/complete \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”The open invoice’s client secret
Media type application/json
object
kind
required
new or upgrade, as in the overview’s pending_purchase.
string
stripe_subscription_id
required
string
client_secret
required
Confirms the open invoice’s payment in the payment sheet.
string
customer_session_client_secret
Lets the payment sheet offer the saved cards.
string | null
Example generated
{ "kind": "example", "stripe_subscription_id": "example", "client_secret": "example", "customer_session_client_secret": "example"}Missing or invalid authentication
Caller has no billing role
No purchase is waiting on a payment
Internal server error