Testing the REST API with Perl

I’m very new to trying to setup the online payment system and I’ve been testing it all night. However for some reason when I try to issue a payment within the Sandbox it is returning data for the last payment made via the API Explorer.

It’s not kicking back any error and I’m setting up a Nonce correctly and a unique idempotency_key.

I guess I’m a little stuck right now, not sure what I’m doing wrong.

I’m connecting to the REST API via HTTPS and my programming language is Perl.

Hi @Medeek welcome to the forums!

If it’s returning the same data, then most likely you’re using the same idempotency key? If you believe you’re not, though, then please share your Square app id and I can take a look at the logs on our side.

That seems to be the problem.

Such a word of advice for other users who are using Perl. You need to get the parameters into a JSON format before sending them to create the payment.

1 Like