#Kumar-Shipping
1 messages · Page 1 of 1 (latest)
Hi there, you can update (https://stripe.com/docs/api/customers/update#update_customer-shipping) the customer's shipping property with null.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am trying with the below code but its not working var options = new Stripe.CustomerUpdateOptions
{
Shipping = null
};
var service = new Stripe.CustomerService();
Stripe.Customer customer = service.Update(stripeId.stripeCustomerId, options);
Can you send me the request ID?
Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_DLnSsxZBbTZvUe
This request returns 200. Can you send me the request ID that returns an error?
there is no request with error
all request returns 200
with post body is empty in this request req_fxKpaamWFSjs1E
*why?
then what do you mean by it's not working ?
I want to remove the shipping address but its not updating the shipping address with null
But if you check the response, the customer's shipping is already null.
OK, can you try setting the shipping to an empty String? (i.e., "")
Okay let me try
It won't let me set as "" string because it's a ShippingOptions object
Trying using an empty ShippingOptions object
I have already tried
nothing works
{
"shipping": {
"name": "",
"phone": "",
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"postal_code": "",
"state": ""
}
}
}
OK. I'm not familiar with .NET, but setting null with Stripe Node.js SDK can make the shipping null.
if I am using the above object then there is some data in the request POST body but if I am using null instead of empty string then there is nothing in request POST body
I guess the .NET SDK remove the data in POST body if the option object is null.
yes
Can you help report this issue in the dotnet SDK Github repo? https://github.com/stripe/stripe-dotnet/issues
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for stripe.com. - Issues · stripe/stripe-dotnet
I don't have another solution rather than finding a way to set shipping to null.
Okay, Thank you Jack!