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"}