CurrencyCloud/currencycloud-java

The API "authorisePayment" responses me 400

Closed this issue · 2 comments

@org.junit.Test public void authroizePayment() { List<String> paymentIdList = new ArrayList<>(); paymentIdList.add("fec2f9c4-7f92-4d11-ac96-39e441aafbc9"); PaymentAuthorisations paymentAuthorisations = currencyCloud.authorisePayment(paymentIdList); for (PaymentAuthorisation paymentAuthorisation : paymentAuthorisations.getPaymentAuthorisations()) { System.err.println(paymentAuthorisation.toString()); } }

response
`BadRequestException

platform: "Java 1.8.0_202 (Oracle Corporation)"
request:
parameters:
paymentIds[]: "fec2f9c4-7f92-4d11-ac96-39e441aafbc9"
verb: "post"
url: "https://devapi.currencycloud.com/v2/payments/authorise?paymentIds[]=fec2f9c4-7f92-4d11-ac96-39e441aafbc9"
response:
status_code: 400
date: "Tue, 16 Jul 2019 06:51:10 GMT"
request_id: "c03afe4d-7884-4cfc-9b3c-1e6aa51cb665"
error_code: "invalid_extra_parameters"
errors:

  • field: "base"
    code: "invalid_extra_parameters"
    message: "Invalid extra parameters:'{:paymentIds=>["fec2f9c4-7f92-4d11-ac96-39e441aafbc9"
    ]}'"
    params:
    parameters:
    paymentIds:
    - "fec2f9c4-7f92-4d11-ac96-39e441aafbc9"`

How can I deal with this? Is there the server or SDK error? I use sdk 3.2.2

Hi @conkeyn, to enable payments (or conversions) authorizations the main account and its associated sub-accounts first need to be configured. This is achieved via the Currencycloud Direct web interface.

Instructions on how to do this are available in Multi-Level Authorization but if you run into any issues you are welcome to contact our Technical Support team who will be glad to help

No activity for over 30 days. Please open a new issue if problem persists