1. Documentation /
  2. Stamps.com API Integration

Stamps.com API Integration

Our Stamps.com API Integration extension allows you to generate and print shipping labels for USPS via the backend order interface. However, it does not display shipping rates to customers during checkout on your site. If you would like the same USPS rates to be offered to customers that you see in the backend order interface, use this extension in combination with our USPS extension (separate purchase).

Requirements

↑ Back to top

  • A server with SOAP support prior to installation
  • A Stamps.com account with a monthly fee

Installation

↑ Back to top
  1. Unzip and upload the plugin folder to your /wp-content/plugins/ directory
  2. Activate the extension through the ‘Plugins’ menu in WordPress
  3. Go to: WooCommerce > Settings > Stamps.com to configure the plugin
More info at: Installing and Managing Plugins.

Setup and Configuration

↑ Back to top
Before you can make API calls, you need to enter your details on the settings page. Go to: WooCommerce > Settings > Stamps.com.

Stamps.com Account Settings

↑ Back to top
Input your Stamps.com credentials (username and password). This allow us to make requests on your behalf for label printing and balance top-ups.

Automatic Funding

↑ Back to top
Automatic Funding enables the extension to automatically purchase postage on your behalf when the balance reaches a certain threshold. This is useful if you have staff shipping products and do not want to keep purchasing postage for them, or if you want to keep a low balance and purchase additional postage as you go.
  • Threshold is the lowest balance you wish your account to keep. When this threshold is reached, the extension attempts to buy postage.
  • Purchase amount is the amount of postage the extension can purchase for you when triggered.

Label Settings

↑ Back to top
Default shipping date specifies the default shipping date when printing a shipping label. Image type specifies the image type for the returned label. Paper size (for PDF) specifies the page size of PDF labels. This value only applies to PDF. Paper layout (for PDF) specifies the spring layout for labels. This value only applies to PDF. Create Samples is used for testing purposes only, creating sample labels that cannot be used for posting items. No payments are taken if this option is enabled.

Shipping Return Address

↑ Back to top
This controls the ‘return address’ on your printed labels. Enter your origin address, which is used as the store location for calculating shipping quotes.

Viewing balance and Account Pages

↑ Back to top
Once installed and configured, the Admin menu bar displays a Stamps.com item on the right-hand side: Stamps.com menu item It shows the current balance and, if you hover over, links to account pages on Stamps.com that you can use.

Topping Up Your Account Balance

↑ Back to top
Click on the balance amount in the admin menu bar to be taken to the top-up page: Top up If you want to manually top up your account, enter an amount and submit the form. The top-up request processed, and your balance updated.

Printing Labels

↑ Back to top
Requesting and printing labels is done from the backend order pages. To get started, you first need to edit/view an order in the backend via the Shipping Labels meta box: Shipping Labels meta box This box guides you through the process of obtaining a label.

Validate Shipping Address

↑ Back to top
Before a label can be requested, the shipping address must be validated with USPS. Click Continue when viewing the Address step. Stamps.com attempts to match the given address, and provides you with a formatted version of the address that you can Accept (order is updated) or Continue without changes (warning: this may affect rates and deliverability). Address Once you have accepted the address, the page updates and stores the validated address.

Rate Request

↑ Back to top
After address verification you are presented with the rate request form. Rate Request Here you tell Stamps what type of package you are shipping and provide the package type, planned ship date, content value, weight and package dimensions. By default, value and weight are pre-populated with your line item combined values. Adjust as required, then select Get rates. A list of matching shipping rates appears: Rates Select a rate and any add-ons you require, then continue. The next step varies by destination. For domestic packages, you receive your label. For international packages, you proceed to Customs.

Customs Information

↑ Back to top
International packages require customs information before a label can be generated. Customs Enter your customs details (such as Certificate Number, if applicable), then click Add line for whatever you are shipping in your package. Line Items Each line item needs data to be entered for customs declaration forms. When you’re done, click Request label.

The Label

↑ Back to top
Once you request your label, one of two things will happen. For international labels, a View PDF link appears for labels to print: Label For domestic labels, a preview of the label to be printed appears. You can click it to see the full-sized version: Label Click View All Labels for the order, or to request another label. All shipping labels follow the same format as Stamps.com. You can view an example at: Shipping.

Refunding and Deleting Labels

↑ Back to top
When viewing your labels, you can hover over a label to see the Refund and Delete options. Delete and Refund

Troubleshooting

↑ Back to top

API Request does not work

↑ Back to top
If API requests are not working, check that:
  1. Your username and password is correctly input in settings
  2. Your server can talk to ours. Ensure that requests are not blocked by a firewall.
  3. Your server supports SOAP. This is a PHP module your host may need to enable.

I can’t activate the plugin, or after activation the dashboard is broken, why?

↑ Back to top
This is generally due to SOAP not being enabled on your server. In that case, you will have to contact your hosting company. You can check SOAP status in WooCommerce System Status.

Invalid SOAP message

↑ Back to top
The API returns an error containing the key that’s required and missing. For example, if the return address in Address Line 1 is missing or is not correct, the following error messages will appear:
  • Invalid SOAP message due to XML Schema validation failure.
  • The value ” is invalid according to its datatype
  • The actual length is less than the MinLength value.

FAQ

↑ Back to top

Will a tracking number be generated and auto-populate the appropriate field on the order form?

↑ Back to top
Tracking numbers are not currently stored within WooCommerce. We are working to add compatibility with our Shipment Tracking extension in order to auto-populate this data, but there is no ETA for this feature at this time. The Stamps.com XML File Extension allows you to select orders to export into an XML format for import into the Stamps.com client. This will allow you to use all the features on the Stamps.com website — this includes the ability to send a Stamps.com generated email with the tracking number.

Is there integration with the USB-connected scale that Stamps.com provides to their customers?

↑ Back to top
No, not at this time.

Does the Stamps.com API support Media Mail?

↑ Back to top
Yes.

Is there bulk label generation?

↑ Back to top
No. Labels are ordered and generated per order via the edit order page.

Is it possible to do multiple labels per page?

↑ Back to top
As there is no bulk ordering, you cannot print multiple labels per page.

Does this plugin work with the Ship to Multiple Addresses plugin?

↑ Back to top
These two plugins are incompatible at this time.