#Kontrolol-Coupon

1 messages · Page 1 of 1 (latest)

deft jolt
edgy agate
#

my object to create the coupon looks like this

#

{
"percent_off": "100",
"duration": "once",
"name": "test1t1M",
"applies_to": [
"prod_Ipbr624ezZMKYD",
"prod_InoTXypItr3LQT"
],
"metadata[owner]": "cus_KhmdDsKVdUrpRT"
}

deft jolt
#

applies_to will need products -> arrays of ids

edgy agate
#

so: "applies_to": {
"products": [ "", ""]
}

#

?

deft jolt
#

yes, I think so. Not familiar with the language, but can you try?

#

From the doc:

edgy agate
#

yeah, its not clear

#

I understood it initially as using : applies_to.products as the property

#

and then i used an array directly in applies_to, and its not working. let me try the different strucure

#

"percent_off": "100",
"duration": "once",
"name": "test1t1M",
"applies_to": {
"products": [
"prod_Ipbr624ezZMKYD",
"prod_InoTXypItr3LQT"
]
},
"metadata[owner]": "cus_KhmdDsKVdUrpRT"

#

not working

#

whats the structure of applies_to supposed to be?

deft jolt
#

hmm

#

can you find your request id(req_xxx)?

#

Is that Python?

edgy agate
#

ok, I can see they worked

deft jolt
#

Glad to hear it worked!

edgy agate
#

thanks for your help