Verify on your server
How it works
Keep the review ID with the quote
When a review starts, you get its ID (rv_…). With the embed, onResult passes it to your page: send it to your server and store it against the quote.
You can also send the ID with the payment form, for example in a hidden field.
In a server or agent flow, your server already has the ID from the check’s response.
Read the review at bind
Call the server endpoint with your secret key. It’s for servers only: it sends no CORS headers and needs no Origin. Set your secret key and your region’s address as environment variables:
A review from another account or environment returns 404 review_not_found: a test secret key only reads test reviews.
Check it before you bind
Bind only when every check passes:
A purchase with no review ID is one the check let continue, or one that proceeded without an answer. This is expected for most customers when the product asks only when an agent is detected. Where every purchase must be approved, such as an agent flow or a product set to Every purchase, refuse to bind without an approved review.
This check confirms the customer approved the quote with that reference. It doesn’t compare the quote’s contents. With the embed, the quote the customer sees comes from quoteDetails in the browser, so build it from the quote your server holds, and issue a new quote reference whenever the details change. For the strongest assurance, create the review from your server so the quote never passes through the browser: see Server and agent flows.
Related
- Server and agent flows: create the check from your server, so the quote never passes through the browser.
- Keys and environments: publishable keys, secret keys and review tokens.