Skip to main content

GET/guest_purchase_order/{purchaseOrderId}

Note: The Order API (v2) currently only supports the guest payment/checkout flow. If you need to support member payment/checkout flow, use the v1_beta version of the Order API.

Important! Limited Release(Limited Release) This method is only available to select developers approved by business units.


This method retrieves the details about a specific guest purchase order. It returns the line items, including purchase order status, dates created and modified, item quantity and listing data, payment and shipping information, and prices, taxes, discounts and credits.

The purchaseOrderId is passed in as a URI parameter and is required.

Note: The purchaseOrderId value is returned in the call-back URL that is sent through the new eBay pay widget. For more information about eBay managed payments and the new Order API payment flow, see Order API in the Buying Integration Guide.
You can use this method to not only get the details of a purchase order, but to check the value of the purchaseOrderPaymentStatus field to determine if the order has been paid for. If the order has been paid for, this field will return PAID.

For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.

Input

Resource URI

GET https://api.ebay.com/buy/order/v2/guest_purchase_order/{purchaseOrderId}

This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com root URI with api.sandbox.ebay.com

URI parameters

ParameterTypeDescription
purchaseOrderIdstringThis path parameter specifies the unique identifier of a purchase order made by a guest buyer, for which details are to be retrieved.

Note: This value is returned in the response URL that is sent through the new eBay pay widget. For more information about eBay managed payments and the new Order API payment flow, see Order API in the Buying Integration Guide.

Occurrence: Required

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
X-EBAY-C-ENDUSERCTXstringThis header is used to specify the deviceId for the device/user attempting to make the call.

It contains an alphanumeric string that allows a payment gateway to track an API call attempt and confirm that it is a verified payment attempt by a device/user.

Occurrence: Conditional

X-EBAY-C-MARKETPLACE-IDstringThis header identifies the eBay marketplace where the order will occur.

Note: For this method, this value must match the X-EBAY-C-MARKETPLACE-ID used when the associated checkout session was created.
See HTTP request headers for the marketplace ID values.

Occurrence: Conditional

OAuth scope

This request requires an access token created with the client credentials grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope/buy.guest.order

See OAuth access tokens for more information.

Request payload

This call has no payload.

Request fields

This call has no field definitions.

Output

HTTP response headers

This call has no response headers.

Response payload

This call has no payload.

Response fields

This call has no field definitions.

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200OK
403Access Forbidden
404Not Found
500Internal Server Error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
16001API_ORDERAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
16002API_ORDERREQUESTThe purchase order ID was not found.
16003API_ORDERREQUESTAccess to the purchase order is not authorized.

Warnings

This call has no warnings.

Samples

This call has no samples.