#jim19779
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
hard to say without seeing the full context of the code.
ok...give me a second or 2
locale='el',
success_url="XXX",
mode="subscription",
line_items=[
{
"price":"XXX",
"quantity": 1,
},
],
subscription_data = [
{'trial_settings' : {'end_behavior' : {'missing_payment_method' : 'cancel'}}},
{'trial_period_days' : 3},
],
)```
well subscription_data is not supposed to be an array ([ .. ]), it's an object.
so it's more like
subscription_data = {
'trial_settings' : {'end_behavior' : {'missing_payment_method' : 'cancel'}},
'trial_period_days' : 3,
},
I'd suggest carefully reading the API reference for the types of arguments
I have already tried what you suggest and I got this error:
unhashable type: 'dict'
that's more of a Python-specific problem, I'll look in a little while.
yeah the code is python
maybe
subscription_data = {
trial_settings = {end_behavior = {'missing_payment_method' : 'cancel'}},
trial_period_days= 3,
},
not sure, I'd need to spin up a Python environment and test things out, you can likely do it faster than I can since you're a Python developer and can try different versions of things, but I'll have a look when I have time