Query about Creating Gift Cards for Newly Created Customers

davi-mezencio
Visitor
2 0 0

Hey everyone,

 

I'm currently working on a process to create new customers via the Create Customer API, using the 'send_email_invite' option. This part is straightforward, but I have a question that comes up immediately after this step.

 

Once I get the customer ID (even before they've accepted the email invite), can I go ahead and create a gift card, associating it with this new customer ID?

 

My concern is whether the customer will receive the email containing the gift card even if they haven't accepted their account invite yet. Do they need to accept the invite first to receive the gift card email, or will it be sent regardless?

 

I'd appreciate any help with this,

 

Regards

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1317 216 456

Hey @davi-mezencio - as long as the customer's ID and record is created on the shop, you are able to associate it with a gift card, provided your app is a custom app and is installed on a Shopify Plus shop (more info on that restriction here). 

I just did a quick test on my end here and can confirm that even if the customer hasn't accepted their email invite to create an account or even had one sent out, you can still create a gift card, attach it to the newly created customer ID and have the Gift Card email be sent out, provided the customer record (not necessarily the account) is created on the shop. 

Hope this helps!

 

Al | Shopify Developer Support 

 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

dsoprea
Shopify Partner
11 0 2

Is gift-card API access only available on Shopify Plus? We're getting "Access denied" even though the correct scopes are enabled. We have a functional integration. Our store is years old. However, this is the first time we've used the gift-card API and also the first time an API has ever returned "Access denied" for us.

ShopifyDevSup
Shopify Staff
1317 216 456

Hi @dsoprea - you are correct here. At the moment, the gift card API is only available for custom/private apps installed on Plus shops. There is a bit more information in our dev docs here, but your shop would need to be on the Plus plan to access the Gift Card API currently. I do know this is an API that folks have been interested in outside of Plus, so I'm going to forward on your feedback here to our product team. I can't guarantee anything in terms of what their answer will be/if we can provide one through the forums, but I'm happy to advocate, I definitely see how widening access to the API would be super helpful. 

Al | Shopify Developer Support  

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog