Get Purchase Details

All purchase details are available in the Neon dashboard, which also contains information about conversion rates and Neon fees. In addition, you can use the Purchases API to get details about a purchase. There are a few ways of doing this.

First, you can call GET /purchases/search with an order number, which is the twelve-character code shown to the user in their confirmation email (e.g. ABCD-1234-EFGH):

curl --request GET \
     --url 'https://api.neonpay.com/purchases/search?orderNumber=<order number>' \
     --header 'X-API-KEY: <your API key>' \
     --header 'accept: application/json'

Alternatively, for standalone checkouts, you can search for a purchase using the checkout ID returned when you called POST /checkout:

curl --request GET \
     --url 'https://api.neonpay.com/purchases/search?checkoutId=<checkout ID>' \
     --header 'X-API-KEY: <your API key>' \
     --header 'accept: application/json'

(Note that this only returns completed checkouts. To get data about a checkout in progress, use the GET /checkout/{checkoutId} endpoint instead.)

Finally, you can call GET /purchase/{purchaseId} to find a purchase by its ID, which is the UUID returned via the webhook:

curl --request GET \
     --url 'https://api.neonpay.com/purchases/<purchase ID>' \
     --header 'X-API-KEY: <your API key>' \
     --header 'accept: application/json'