Payment Quotes
POST
/v2/payment_intents/{intent_id}/payment_quotes/{quote_id}/refreshAuth requiredRefresh a payment quote
Re-prices a quote at the current exchange rate for the amount still due and restarts its 5-minute price lock. The quote keeps its ID and address.
Use it when the countdown on a quote runs out before the customer pays. Only quotes with status pending or expired can be refreshed. Once a payment has been seen on a quote, its price can no longer change.
No request body is needed.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Path Parameters
intent_idstringrequiredID of the payment intent
quote_idstringrequiredID of the payment quote
Responses
intent_idpath · stringrequiredID of the payment intent
quote_idpath · stringrequiredID of the payment quote
Response will appear here
Request
curl -X POST \
"https://www.blockonomics.co/api/v2/payment_intents/d5e88bd4-2964-4554-9a81-ab64c391d174/payment_quotes/d81111b2-0165-4831-bd12-7a09011d4aa6/refresh" \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch('https://www.blockonomics.co/api/v2/payment_intents/d5e88bd4-2964-4554-9a81-ab64c391d174/payment_quotes/d81111b2-0165-4831-bd12-7a09011d4aa6/refresh', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
const data = await response.json()
console.log(data)import requests
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.post(
"https://www.blockonomics.co/api/v2/payment_intents/d5e88bd4-2964-4554-9a81-ab64c391d174/payment_quotes/d81111b2-0165-4831-bd12-7a09011d4aa6/refresh",
headers=headers
)
print(response.json())Response
{
"data": {
"id": "d81111b2-0165-4831-bd12-7a09011d4aa6",
"payment_intent_id": "d5e88bd4-2964-4554-9a81-ab64c391d174",
"amount": 12040,
"paid_amount": 0,
"crypto": "BTC",
"address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"status": "pending",
"txid": null,
"paid_timestamp": null,
"expires_in": 299
}
}