cXML PunchOutSetupResponse: example and element reference
The PunchOutSetupResponse is your synchronous answer to a PunchOutSetupRequest. It does one of two things: hands back a start URL for the shopping session, or tells the procurement system why it cannot have one.
Where it fits
- Your setup endpoint receives a PunchOutSetupRequest from the buyer’s procurement system and authenticates it.
- In the body of the same HTTP response you return a PunchOutSetupResponse. On success it has
Status code="200"and aStartPageURL for a new session. - The procurement system opens the
StartPageURL in the buyer’s browser. The URL is the only thing that ties the browser to the session you just created, so make it single-use and short-lived. - On failure you return a
Statuswith the relevant code (400,401,500) and noPunchOutSetupResponseelement. The procurement system shows the buyer an error.
A successful PunchOutSetupResponse from Nordwind Supplies (cXML 1.2.061).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.061/cXML.dtd">
<cXML payloadID="1793610901.9a4f3c@punchout.example.com" timestamp="2026-11-02T08:15:01.204Z" xml:lang="en-US">
<Response>
<Status code="200" text="OK"/>
<PunchOutSetupResponse>
<StartPage>
<URL>https://punchout.example.com/nordwind-supplies/?session=q7Wm2xT9vLr4KpZs</URL>
</StartPage>
</PunchOutSetupResponse>
</Response>
</cXML> The elements that matter
| Name | Needed? | Meaning |
|---|---|---|
cXML/@payloadID | Required | A new unique ID for your response. Do not reuse the request’s payloadID. |
cXML/@timestamp | Required | When you produced the response, in ISO 8601. |
cXML/@xml:lang | Optional | Language of the document, for example en-US. |
Response | Required | Wraps the answer. A response has no Header: the HTTP connection already identifies both parties. |
Status/@code | Required | 200 on success. Use 400 for a request you parsed but will not accept, 401 for credentials you do not recognise, 500 for a failure on your side. |
Status/@text | Required | The short name of the code, such as OK or Unauthorized. |
Status (content) | Optional | A human-readable explanation of an error. Buyers’ support teams read this, so make it specific. |
PunchOutSetupResponse | Conditional | Present on success only. |
StartPage/URL | Conditional | The URL the buyer’s browser is sent to. Include a session token so you can find the BuyerCookie and return URL later. |
Mistakes that get it rejected
Status/@code. A response with a StartPage but a 4xx or 5xx code is treated as a failure, and a 200 without a StartPage leaves the buyer nowhere to go.StartPage URL works more than once, anyone who sees it in a log or browser history can shop as that buyer. Expire it after first use or after a short window.& in the start URL must be written & inside URL, or the whole response is not well-formed XML and is rejected.Have a PunchOutSetupResponse that a buyer rejected? Paste it into the free cXML and OCI tester; it checks structure in your browser.
PunchOutSetupResponse questions
What HTTP status should the PunchOutSetupResponse use?
Buyer systems read the outcome from the cXML Status element. QuickPunchOut returns HTTP 200 with the real outcome in Status, including for errors, so the procurement system always receives a document it can parse.
Does the response need a Header element?
No. In cXML, Response documents carry no Header; From, To and Sender only appear on Request and Message documents.
Rather not hand-build this?
The free PunchOut shop handles the PunchOutSetupResponse side of the round trip for you: upload your catalogue from Excel, test a cXML or OCI round trip and invite your buyer. Free until your buyer goes live.
Start free Send us the document