The Merchant Solutions order format consists of key-value pairs delivered in real time in an HTTP POST request to a secure web server. It can be decoded by standard CGI script libraries, just as if the fields were coming from a form.
Order delivery is reliable: that is, the system will keep trying until the order is acknowledged by the receiver. Successful delivery is indicated by returning a HTTP status 200 return code.
The easiest way to get started is to modify this Perl script
Order fields are:
- ID
-
A unique order identifier including the store account name, such as acme-451 or yhst-1234567891011-451
- Date
-
Standard date format, in GMT
- {Ship,Bill}-Name, -Firstname, -Lastname
-
These fields are always defined. If your store is configured to have separate first and last name fields on the order page, then -Name will be the concatenation of them. If it is configured to have a single entry field, then the split into Firstname and Lastname will be a guess.
If you have custom fields, they will appear here too. The field names look like "Ship-Pack in dry ice" for an extra shipping field, and similarily for a billing field.
- {Ship,Bill}-Address1, -Address2, -City, -State, -Zip, -Country, -Phone, -Email
-
The shipping and billing address. Both will be filled in, and will be the same if the user only gave one address
- Card-Name, -Number, -Expiry
-
Credit card info
- Item-Id-N, -Code-N, -Quantity-N, -Unit-Price-N, -Description-N, -Url-N
-
For values of N from 1 to Item-Count, the relevant attributes of each item are given. The example Perl script contains code to separate these into an array of hash refs.
Code is from the "Code" field when editing the item, typically an SKU or ISBN
Unit-Price takes any quantity pricing into account
- Shipping
-
Shipping method info
- Tax-Charge, Shipping-Charge, Total
-
Extra charges, and the order total
- Coupon-Description, -Id, -Value
-
Coupon discount
- Gift-Certificate-Code, -Order-Id, -Redeemed-Value
-
Gift certificate redemption. Gift-Certificate-Order-Id is the order in which the gift certificate was purchased.
- Yahoo-Network-Order
-
Whether this order is a Yahoo network order (Yes or No)
- PayPal-Auth, -TxID, -Merchant-Email, -Payer-Status, -Address-Status
-
PayPal values for orders with PayPal as the payment method:
- PayPal-Auth - displays the PayPal Authorization ID.
- PayPal-TxID - displays the PayPal Transaction ID.
- PayPal-Merchant-Email - displays the email address used by you to log in to PayPal.
- PayPal-Payer-Status - displays the PayPal Account status of the buyer, verified or unverified.
- PayPal-Address-Status - displays confirmed or unconfirmed according to the PayPal Address selected during checkout.