Transparent Commerce purchase flow
Understand the Transparent Commerce purchase flow.
Use Transparent Commerce™ to instantly purchase a product on behalf of a customer during an authenticated customer session. This API bypasses calling the Apply Shopper and Submit Cart resources separately and instantly purchases a single product. A typical example of a product purchased via this resource is an auto-renewal, such as a subscription.
The product direct purchase API performs the following actions with one Shopper call:
Adds a product to the cart.
Applies the default customer address to the cart.
Applies the default payment option to the cart.
Submits the cart.
Creates an order.
Prerequisite: The request must be made with a valid full-access token.
Send the POST shoppers/me/products/{productId}/purchase
request with the specific product ID for the product the customer wants to purchase.
The following example purchases a product with a product ID of 291233200
. The response header contains a Location
header, as shown in line 4, to the order created for the transaction. The ID of the order is 1234567890
. The request and response bodies are empty.
No further calls are required. If applicable, you can make follow-up calls to get the order by its ID or the order history for the customer.
Last updated