Unknown field: cardToken
pcoenen opened this issue · comments
Pieter-Jan Coenen commented
Specifications
- API Version: 1.2.0
Describe the issue
I was trying the following code example from your documentation, but it always returns an error: Mollie.API.Error.Error: Error executing API call (request): Unknown field: cardToken.
from mollie.api.client import Client
mollie_client = Client()
mollie_client.set_api_key('live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM')
payment = mollie_client.payments.create({
'method': 'creditcard',
'amount': {
'currency': 'EUR',
'value': '10.00'
},
'description': 'Order #12345',
'redirectUrl': 'https://webshop.example.org/order/12345/',
'webhookUrl': 'https://webshop.example.org/payments/webhook/',
'cardToken': 'tkn_UqAvArS3gw'
})
...
Florian Bender commented
Hey @pcoenen,
That looks like Python code - but Version 1.2.0 is quite old. Also, this is the repository for the PHP API Client. Could you check you're using a more recent version, and if the error persists open a ticket in the Python API Client Repository?
Pieter-Jan Coenen commented
Thanks a lot, sorry for picking the wrong repo, I'm a big fan and using both API's at the same time, therefore the confusion.