SubscriptionAPI:Australia Valid Postcode got error "Delivery method shipping address zip is invalid"

Jiazhen
Shopify Partner
20 1 0

Hi, We are trying to use Shopify Subscription API to create a subscription. We are based in Australia. When trying with a postcode 3380

It returns error

data: { subscriptionContractCreate: { draft: null, userErrors: [ { field: [Array], message: 'Delivery method shipping address zip is invalid' }, [length]: 1 ] } },

How come the 3380 is not a valid zip code?

Thanks

Look forward to hearing from you

Replies 5 (5)
Jason
Shopify Expert
10966 196 2214

You'd want to confirm the data you're sending first to be 100% sure that you're sending what you hope you are. I've seen many cases when the payload is not what was intended so they get errors back.

Not sure if you can share the payload here given it will have potentially private data so that could slow things down.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
Jiazhen
Shopify Partner
20 1 0

Hi, payload is

```

customerId: 'gid://shopify/Customer/xxxxx',
currencyCode: 'AUD',
nextBillingDate: '2022-11-27',
contract: {
nextBillingDate: '2022-11-27',
customAttributes: [
{ key: 'isGiftCard', value: 'true' },
],
status: 'ACTIVE',
paymentMethodId: 'gid://shopify/CustomerPaymentMethod/oooooo',
billingPolicy: { interval: 'MONTH', intervalCount: 6, minCycles: 1, maxCycles: 6 },
deliveryPolicy: { interval: 'MONTH', intervalCount: 1 },
deliveryMethod: {
shipping: {
address: {
address1: 'Pipetrack Rd',
address2: null,
city: 'Stawell',
provinceCode: 'ACT',
phone: 'privateprivate',
zip: '3380',
countryCode: 'AU',
firstName: 'firstname',
lastName: 'lastname'
}
}
},
deliveryPrice: 0
}
}

```

I hide the private information. The zip is valid postcode!

Jiazhen
Shopify Partner
20 1 0

Did you see any obvious error on the payload?

Thanks

Jiazhen
Shopify Partner
20 1 0

Any update @shopify? please, I've been advised by Shopify Plus support to ask here!

ShopifyDevSup
Shopify Staff
Shopify Staff
141 24 18

Hi @Jiazhen 👋

 

Would you kindly share the `X-Request-ID`(+timestamp) from posting the `subscriptionContractCreate` mutation?

Shopify 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