Payment gateway attribute when generating label

Our carrier requires payment gateway or method in order to generate a label. Is it possible to count with this info when using the label generation webhook? https://shipheropublic.docs.apiary.io/#reference/webhooks/generate-label-webhook-url/generate-label-update-webhook-url

Hi @Ricardo
Would having different shipping methods work for you?
That way you could associate each payment gateway with different methods for example
Thanks in advance!
Tom

Hi Tomas, unfortunately our current Shopify plan is not Plus, so as far as I know, they won’t allow us to configure a conditional logic between shipping methods and payment gateways.

Oh I see, so you would need to be able to define a payment gateway/method at the moment of generating the label through the webhook, is that correct?

Or would it be always the same payment gateway/method and you just need a field for this?

It won’t always be the same payment gateway. Ideally, we need to receive from the shiphero API the payment gateway/method field containing the method chosen by the customer when placing the order.

Thanks for clarifying that @Ricardo !
So based on the example on apiary we currently have this payload when we request the label to your endpoint:

{
  "shipping_name": "Manual Order Shipping Method",
  "to_address": {
    "city": "SAN FRANCISCO",
    "state": "CA",
    "zip": "94105",
    "name": "test order",
    "address_2": "",
    "country": "US",
    "address_1": "123 MAIN ST",
    "email": "none@none.com",
    "phone": "",
    "company_name": ""
  },
  "shipping_method": "My Carrier",
  "order_id": "83478763",
  "packages": [
    {
      "width": 10,
      "weight_in_oz": 11,
      "length": 10,
      "line_items": [
        {
          "tariff_code": "0",
          "price": "0.00",
          "customs_description": null,
          "customs_value": "0.00",
          "line_item_id": "225458557",
          "barcode_exists": "0",
          "partner_line_item_id": "MO114-265348960",
          "sku": "yellow-kit",
          "barcode_scanned": "0",
          "name": "Yellow Kit",
          "ignore_on_customs": false,
          "product_name": "Yellow Kit",
          "quantity": "2"
        }
      ],
      "height": 10
    }
  ],
  "order_number": "MO114",
  "partner_order_id": "MO114",
  "from_address": {
    "city": "Garnerville",
    "state": "NY",
    "zip": "10923",
    "name": "ShipHero Apparel",
    "address_2": "",
    "country": "US",
    "address_1": "123 Main St",
    "email": "hello@shiphero.com",
    "phone": "11111111111",
    "company_name": ""
  }
}

And this request would be to add one field called, for example, "payment_gateway": "Payment Method1" and will be on the payload here:

{
  "shipping_name": "Manual Order Shipping Method",
  "to_address": {
    "city": "SAN FRANCISCO",
    "state": "CA",
    "zip": "94105",
    "name": "test order",
    "address_2": "",
    "country": "US",
    "address_1": "123 MAIN ST",
    "email": "none@none.com",
    "phone": "",
    "company_name": ""
  },
  "shipping_method": "My Carrier",
  "payment_gateway": "Payment Method1"
  "order_id": "83478763",
  "packages": [
    {
      "width": 10,
      "weight_in_oz": 11,
      "length": 10,
      "line_items": [
        {
          "tariff_code": "0",
          "price": "0.00",
          "customs_description": null,
          "customs_value": "0.00",
          "line_item_id": "225458557",
          "barcode_exists": "0",
          "partner_line_item_id": "MO114-265348960",
          "sku": "yellow-kit",
          "barcode_scanned": "0",
          "name": "Yellow Kit",
          "ignore_on_customs": false,
          "product_name": "Yellow Kit",
          "quantity": "2"
        }
      ],
      "height": 10
    }
  ],
  "order_number": "MO114",
  "partner_order_id": "MO114",
  "from_address": {
    "city": "Garnerville",
    "state": "NY",
    "zip": "10923",
    "name": "ShipHero Apparel",
    "address_2": "",
    "country": "US",
    "address_1": "123 Main St",
    "email": "hello@shiphero.com",
    "phone": "11111111111",
    "company_name": ""
  }
}

Is that correct?

Correct, that would solve our issue, because we would be able to send our carrier this information they are requesting when generating a label.

Hi @Ricardo
I apologize for the delay in my response.
What I think its that it may not be possible, because there is no way from the UI, to specify a Payment method (we only configure the carrier and the Method).
Thats why I was thinking that maybe you could use Method, and then “Map” this method on your side to a specific Payment method, for example:

Shipping Method 1 --> Patyment Gateway 1
Shipping Method 2 --> Patyment Gateway 2

Let me know if this still would not work for you and I’ll create a feature requests anyways.
Thanks again for your patience in this,
Tom

Got it. Will try to make this work.

1 Like