Can't update billing address with API

I followed instructions in docs, but billing can’t be updated, only email.

This works:

async function fillBill() {
	try {
		await Snipcart.api.cart.update({
			email: 'tester.doe@example.com'
		});
	} catch (error) {
		console.log(error);
	}
};

But this does not work:

async function fillBill() {
	try {
		await Snipcart.api.cart.update({
			email: 'tester.doe@example.com',
			billingAddress:{
				name: 'Tester',
				address1: '55 Test Street',
				city: 'Melbs',
				country: 'Australia',
				province: 'Victoria',
				postalCode: '3000'
			}
		});
	} catch (error) {
		console.log(error);
	}
};

Can you please tell me what is wrong with the second function? No data makes it to the billing fields, including email when I use the second function. No errors in browser console.

Any ideas? Alternate methods?

Thanks.

Hi there,

Can you try using the 2-letter country code?
In your case, AU should work fine.

We can definitely make this clearer in our documentation.

Let me know if this works,
Cheers!

Thanks, that did it!