QR codes

Generate USPS® QR codes to offer your merchants a more convenient, printerless shipping option. By requesting a USPS QR code you will allow your merchants a digital solution to print labels at the Post Office™. The merchant simply needs to bring their prepackaged shipment to a USPS retail location and the digital QR code. The USPS Retail Associate at the Retail Counter will take care of the rest.

In order to stay in compliance with USPS, QR codes should be generated on behalf of merchants and sellers that intend to use QR codes; ideally the merchant or seller will be able to “opt-in” to always receive QR codes upon label creation. This will 1) guarantee a high rate of adoption (QR codes actually scanned for label printing in store) and 2) reduce QR code generation costs and maintenance with regard to USPS label broker systems.

All Shippo API users and third party integrators are subject to the Label Broker terms and conditions below: https://www.usps.com/terms-conditions/label-broker.htm

To create a QR code for printerless shipping, you will need to

  1. make sure the merchant requests it and
  2. specify qr_code_requested as the Shipment extra field
curl https://api.goshippo.com/shipments/ \
    -H "Authorization: ShippoToken shippo_test_831a7a042784f523b95db65444e6e084b636764b" \
    -d address_from="d799c2679e644279b59fe661ac8fa488" \
    -d address_to="42236bcf36214f62bcc6d7f12f02a849" \
    -d parcels=["defeb0a3a84949d390c94159ceb39bc6"] \
    -d extra='{"qr_code_requested": true}' \
    -d async=false

In the response you’ll get your usual Shipment object with all of the available rates. You can then use any rate object_id that was returned to create a transaction and get your shipping label and QR code:

curl https://api.goshippo.com/transactions \
    -H "Authorization: ShippoToken shippo_test_831a7a042784f523b95db65444e6e084b636764b" \
    -d rate="cf6fea899f1848b494d9568e8266e076"
    -d label_file_type="PNG"
    -d async=false

The Transaction API provides a qr_code_url as a response if the Shipment has a qr_code_requested flag and the carrier provides such an option.

   "object_state": "VALID",
   "status": "SUCCESS",
   "object_created": "2022-11-23T18:26:07.753Z",
   "object_updated": "2022-11-23T18:26:13.472Z",
   "object_id": "1cb8f204c01044d8b80ebffe9e8ada7c",
   "object_owner": "shippotle@shippo.com",
   "test": true,
   "rate": "3f7479c81fbd44dea767ad7569b0a5e9",
   "tracking_number": "92055901755477000000000015",
   "tracking_status": "UNKNOWN",
   "eta": null,
   "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=92055901755477000000000015",
   "label_url": "https://shippo-delivery-east.s3.amazonaws.com/1cb8f204c01044d8b80ebffe9e8ada7c.png?Signature=r609rRqZbsiV%2Fy2mQG4CMHbsSnI%3D&Expires=1700763970&AWSAccessKeyId=AKIAJKHBTIO2YQPYZSEA&versionId=Xw8i1.ut9lrHOKonttu2lwV67NnA7uka",
   "commercial_invoice_url": null,
   "messages": [],
   "order": null,
   "metadata": "",
   "parcel": "defeb0a3a84949d390c94159ceb39bc6",
   "billing": {
       "payments": []
   "qr_code_url": "https://shippo-delivery-east.s3.amazonaws.com/1cb8f204c01044d8b80ebffe9e8ada7c_qr_code.png?Signature=EMf5A3hYzUi1t35tkgha1rCRnXY%3D&Expires=1700763973&AWSAccessKeyId=AKIAJKHBTIO2YQPYZSEA&versionId=Qhg_FflYWTHkLQeBaxMSaCuJ7zx3gALr"

Please share instructions so that everyone acquiring a Label Broker QR Code will know what to do with it. A text/email with the QR Code that the customer receives must be clear enough so that they can (1) find a participating Post Office, and (2) have the item already packaged and ready-to-ship. The Retail Associate at the Retail Counter will take care of the rest.

Sample QR code instructions

[Friendly introduction (e.g.: Hi first name)]

[Merchant info about outbound shipment here (e.g.: items, order #, RMA #, date, etc.]

For your convenience, you can print your outbound label at participating USPS® Post Offices®. Simply bring your packaged and ready-to-ship item and show the Label Broker code below to the USPS Retail Associate at the Retail Counter.

QR code sample

You can find participating locations here: https://www.usps.com/business/label-broker.htm

You can also use this website for instructions on how to print your label at home.