# Generate Label Webhook Dev

**URL:** <https://community.shiphero.com/t/generate-label-webhook-dev/1974>\
**Category:** Getting Started\
**Created:** [April 27, 2022, 10:52pm UTC](https://community.shiphero.com/t/generate-label-webhook-dev/1974 "2022-04-27T22:52:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jose](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jose](https://community.shiphero.com/u/jose)\
**Post date:** [April 27, 2022, 10:52pm UTC](https://community.shiphero.com/t/generate-label-webhook-dev/1974/1 "2022-04-27T22:52:24Z")

</div>

Hi there, I would like to see where the payload of this webhook comes from and where to configure it, specially currency and country, we are using Shiphero from México.

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [May 2, 2022, 2:52pm UTC](https://community.shiphero.com/t/generate-label-webhook-dev/1974/2 "2022-05-02T14:52:16Z")

</div>

Hello @Jose!  
Welcome to the SHipHero Public-API Community!

You will need to set up an endpoint to receive it, and you will need to provide a response with a specific payload.  
You can find more information here: [Webhooks – Developer Resources | ShipHero](https://developer.shiphero.com/webhooks#generate-label-webhook). In that link, you will find the payloads and the process to set it up.

What specifics are you looking for regarding currency and country?

Kind regards,  
TomasFD

---

<div class="post-metadata">

**Author:** ![jose](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jose](https://community.shiphero.com/u/jose)\
**Post date:** [May 4, 2022, 9:31pm UTC](https://community.shiphero.com/t/generate-label-webhook-dev/1974/3 "2022-05-04T21:31:04Z")

</div>

We want to configure MEX for México and MXN for mexican pesos.  
Another question is how to get the verification ` x-shiphero-hmac-sha256` header,  
we look for it were the doc points to find it but we didn’t see it.

---

<div class="post-metadata">

**Author:** ![jose](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jose](https://community.shiphero.com/u/jose)\
**Post date:** [May 5, 2022, 4:51pm UTC](https://community.shiphero.com/t/generate-label-webhook-dev/1974/4 "2022-05-05T16:51:02Z")

</div>

How can I test it? here is my verification method:

```auto
export default function verify(secret, data, hmac_signature){
	const digest = crypto.createHmac('sha256', secret).update(data).digest('hex');
const calculated_signature = digest.toString('base64');
let verified = true;
	console.log("hmac: ", hmac_signature);
	console.log("calculated: ", calculated_signature);
  if(calculated_signature != hmac_signature){
  	verified = false;
  }
	return verified;

};

```

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [May 5, 2022, 6:58pm UTC](https://community.shiphero.com/t/generate-label-webhook-dev/1974/5 "2022-05-05T18:58:00Z")

</div>

> [@jose](#):
>
> We want to configure MEX for México and MXN for mexican pesos.

Hello @jose!

This information comes from the order.

Country comes from the warehouse profile information in the `from_address` and from the shipping address in the `to_address`

Currency is also from the order and comes from the default currency of your account. If you need to handle different currencies, you can do so by using Order Tags and automation rules. to set the currency. For example, you could use an order tag named MXN and create an automation rule as follows:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/c5dfe3e51bf4ac934b64ee19398b15d4d55cb941.png)

Best,  
TomasFD

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [May 5, 2022, 8:23pm UTC](https://community.shiphero.com/t/generate-label-webhook-dev/1974/6 "2022-05-05T20:23:08Z")

</div>

> [@jose](#):
>
> How can I test it? here is my verification method:

Hello @Jose!

To test it, you should go to [https://app.shiphero.com/dashboard/settings/api](https://app.shiphero.com/dashboard/settings/api) and find the API secret corresponding to the default row.

The data you need to pass is the whole payload in raw format, not prettified with enters and/or tabs.

Kind regards,  
TomasFD

---

<div class="post-metadata">

**Author:** ![jose](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jose](https://community.shiphero.com/u/jose)\
**Post date:** [May 6, 2022, 6:54pm UTC](https://community.shiphero.com/t/generate-label-webhook-dev/1974/7 "2022-05-06T18:54:21Z")

</div>

Whe we call the webhook the method in shiphero is operationName: “PrintLabel”,  
we’re receiving the payload but not the header: ‘x-shiphero-hmac-sha256’.  
Do we need some extra step to make shiphero send it?

---

<div class="post-metadata">

**Author:** ![jose](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jose](https://community.shiphero.com/u/jose)\
**Post date:** [May 16, 2022, 5:40pm UTC](https://community.shiphero.com/t/generate-label-webhook-dev/1974/9 "2022-05-16T17:40:45Z")

</div>

Thanks Tomas,  
now we want to generate labels for products where the SKU is present in the barcode.  
Here is my question in the community forum:  
[https://community.shiphero.com/t/inventory-api-labels/1994](https://community.shiphero.com/t/inventory-api-labels/1994)
