Best answer

Webhook Digistore24

  • 12 August 2022
  • 8 replies
  • 116 views

Userlevel 1
Badge

This post has been edited by a moderator to remove personal information. Please remember that this is a public forum and to remove any sensitive information prior to posting.

Hi fellow experts,

 

could you help me with a webhook?

I want do create a voucher in digistore24.

Here are the API basics: https://dev.digistore24.com/en/articles/3-api-basics

That’s the documentation about createVoucher: https://dev.digistore24.com/en/articles/27-createvoucher

I used Webhook - POST

But I get the error that the first parameter data[code] is missing.

I don’t see what I am doing wrong. Could anybody give me a hint?

 

Cheers

Sandra

icon

Best answer by CraigNet3 15 August 2022, 22:28

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

8 replies

Userlevel 4
Badge +1

Hi Sandra,

Did you include the headers?

Userlevel 1
Badge

Hi John,

 

I included the API Key as mentioned above. Didn't screenshot it because of personal data. Is there something else I must include? Authentification seems to be fine though.

Userlevel 1

A couple of things I notice:

 

  • expires_at MAY work, but their documentation only gives examples of Point Of Time being 24 hours… not sure if they use that as an example and truly support any number of hours. https://dev.digistore24.com/en/articles/4
  • The error code returned indicates it is currently erroring at your `code` variable. Parameter Fehlt is german for parameter missing. Fix this issue first before addressing the note above.
Userlevel 1
Badge

Hi,

 

I wrote to Digistore24 directly as I can’t find the mistake. There’s a code so I don’t know why they tell me it’s missing.

 

I’ll keep you posted!

Userlevel 1

Hi,

 

I wrote to Digistore24 directly as I can’t find the mistake. There’s a code so I don’t know why they tell me it’s missing.

 

I’ll keep you posted!

If I recall directly that field needs to be an array. So your key should be code[]. 

Userlevel 1
Badge

Hi,

 

I wrote to Digistore24 directly as I can’t find the mistake. There’s a code so I don’t know why they tell me it’s missing.

 

I’ll keep you posted!

If I recall directly that field needs to be an array. So your key should be code[]. 

I’ve tried this as well. It’s not working either.

 

Userlevel 4
Badge +4

Hi @Sandra Hoffmann, I believe the issue is with the parameter names you are using. Since they all should be part of the “data” array you need to send them as such. For example the parameter for code that you set on the left side in Zapier should be data[code] not just code. The same goes for all the other parameters. They should all be sent as keys in the data array:

data[product_ids]

data[expires_at]

etc.

 

Userlevel 1
Badge

I could finally solve it. There were two problems: I used POST but it’s GET.

 

And as @CraigNet3 said the data must be in array.

 

Now it’s working. 😎