-1

I'm working on the Checkout.com API integration for golang. I chose checkout.com for several alternative providers like Sofort and iDEAL. There are a good documentation for both of them:

but code from the example returns the same error

curl https://sandbox.checkout.com/api2/v2/tokens/payment \
-H "Authorization: sk_test_..." \
-H "Content-Type: application/json" \
-X POST \
-d '{
"email" : "test@email.com",
    "value": 1000,
    "currency": "EUR",
    "chargeMode": "3",
    "successUrl": "http://mycustomerurl.com/order?result=pass",
    "failUrl": "http://mycustomerurl.com/order?result=fail"
}'

returns

{"id":"pay_tok_7A0B43FF-C418-4C54-811D-704279BB5AAA","liveMode":false}

after this payment token is used for

curl https://sandbox.checkout.com/api2/v2/charges/localpayment \
-H "Authorization: sk_test_..." \
-H "Content-Type: application/json" \
-X POST \
-d '{
    "email" : "test@email.com",
    "localPayment" : {
    "lppId" : "lpp_14",
    "userData" : {}
    },
   "paymentToken" : "pay_tok_7A0B43FF-C418-4C54-811D-704279BB5AAA"
}'

and here we are

{"errorCode":"81001","message":"Invalid payment currency","eventId":"11e5a092-425e-4db9-910e-f26024a0e007"}
dzyanis
  • 19
  • 5
  • What did you learn when you read the docs from checkout.com relating to that error message? – Jonathan Hall May 03 '18 at 06:53
  • That was a question! Actually, there is no good explanation what exactly is wrong. However, I've got a right answer! Thank you for you attention! @Flimzy – dzyanis May 03 '18 at 13:43

1 Answers1

1

To be able to test alternative payment methods these methods would need to be enabled on your Checkout.com Sandbox account. Only card payments are enabled by default.

To do so you need to get in touch with Checkout.com's support team and they will do the required configuration on your account.

n2oula
  • 26
  • 1