How to get shipping origin address for a Bigcommerce store through API - bigcommerce

How to get the shipping origin of a BigCommerce store through the APIs available. I was able to retrieve the store information address but that differs from the shipping origin address I have configured for my development store

It's not documented, however you can use /stores/{{store_hash}}/v3/store/locations?is_default_shipping_origin=true to get this info. 😊

Related

Stripe retrive customer API also retrives card info (PCI ompliance)

I created customer in Stripe with Elements. Now I need to check if customer exists in my web app (with axios request). As far as I know the only way to check if customer exists is to retrive him: https://stripe.com/docs/api/customers/retrieve.
I don't want customer's card information to be present in my app because of PCI compliance. But https://stripe.com/docs/api/customers/retrieve API gives card information in response. Is there any method which checks customer's status?
Thank you!
If you use the stripe provided card collection functionality then the actual card details will not be sent to your server instead stripe handles it and then provide you a token which we cannot reverse to all card details. After that all the data stripe api is returning can be stored on your server. Since it doesn't contain any credentials which can be used to charge the card without Secret key stored in your server.
https://stripe.com/docs/security
Regarding what data you want to show on your front end:
When you are sending request to your server from front end (and server checks customer with stripe api), in response from your server you can omit any information which you don't want to send to your front end. So essentially what you will be doing is that only restrict user to only their customer data you have on your server.

shopify webhook - identify a different client

I would like to integrate my backend API with several shopify clients by using webhook created by shopify.
I read that webhook is a push notification triggered by shopify. If I give my server endpoint (receiving order/creating a new customer) to my several shopify clients, how will I identify a different notification?
Will there be a unique identifier(per client) in the notification sent by shopify? It's because if I receive an order notification, I need to identify this order notification with one of my clients in my db.
Please advise me about this use case.
Thanks.
Per the Shopify Webhook Documentation, each webhook from Shopify contains a JSON payload and HTTP headers that provide context.
The X-Shopify-Shop-Domain HTTP header includes the domain of the shop, e.g., johns-apparel.myshopify.com. You can use this to identify the shop.
Every Webhook comes to you from Shopify with security information that allows you to determine if the incoming Webhook is even valid and every Webhook also tells you the shop the Webhook is coming from.
So you can use the shop information to figure things out. Straightforward!

Shopify Carriers API assign services to countries

Shopify experts are not able to reply this. This question is about Shopify app development. This app is regarding adding custom carrier services to show real time shipping rates.
I added (Shopify API Documentation Ref: CarrierService):
url: store_url."/admin/carrier_services.json"
Posted Data:
{
"carrier_service": {
"name": "My Carrier",
"callback_url": "http:\/\/blablabla.com",
"service_discovery": true
}
}
Now, the carrier is created and returns quotes as well. Everything is working fine.
There is just one issue: When we add any custom carrier to the shipping zone. Either it shows invalid services list i.e. services of Shopify default USPS, FedEx, or UPS services list OR shows:
There are no available services for the country you have selected
Grammatically, there is no any way to add carriers to shipping zones. I am wondering: how Shopify decides what to show? This services list is also added in shipping zones, which is read only according to API.
Logically, it should either get services while creating a new carrier and show them, OR simply show any message which represents that custom carrier services will be available.
Invalid services from Shopify default carriers:
Invalid services from Shopify default carriers
No services & wrong message:
No services & wrong message
Set a static response on carrier service url (in this case "http://blablabla.com") it will set services automatically. Once they are visible in shipping zones then you can make them dynamic.

how to access shopify Products via API without api-key and password?

i want to develop a chrome extension to see stats for any store which develop in shopify, can i access any store products without API-Key and Password in shopify?
No, you cant access products json without using api-key or permanent token of the store.
But still you want to access the product details you atleast needs the handler of the product.
Lets say your store is "abc.myshopify.com" and handler of your product is "xyz", then you can product json of xyz by HTTP GET call in following url
https://www.abc.myshopify.com/products/xyz.json
in general
https://www.[storename]/products/[product-handle].json
You could try using the Shopify StoreFront API.
It allows to get information of your shop from from your own website or custom app. Although it doesn't need a API Password, it needs a Api Key that doesn't need to be a secret.
The documentation says this (the first point is the important):
Using the Storefront API, you can:
Fetch data about a single product or a collection of products to
display on any website or device.
Create unique checkout experiences
with full control over the shopping cart.
Create new customers or
modify existing ones, including address information.
Allow customers
to select unique product options.
There is no way shopify will provide store details (product list) without api authentication.
For your requirement, I would suggest to create a shopify app which will sync all product details to your storage and you can access data from there.

How do I get gateway Authcode from Shopify?

Shopify receives and stores information received from the gateway after a payment is made. It can be viewed in the orders page right at the bottom under Order History section. The words "customer successfully paid..." is a hyperlink. That information contains the authcode apart from some other credit card information. I just want the authcode. The webhook does not send this information in the xml data. Can you retrieve this through the API or is this not allowed? Thanks
Any gateway-specific info is provided through the receipt parameter on the Transactions API. If the token you're looking for isn't there, it's not available.
Thanks for your assistance. Apparently Shopify won't provide that information due to PCI compliance reasons. The payment provider that does the credit card processing will only send one response to Shopify and I was hoping I could get them to send me a response as well but that was wishful thinking on my part. The finance team will just have to log into Shopify and see that information if they need it.