Page MenuHomePhabricator

endpoint monitoring for adyen endpoints
Closed, ResolvedPublic

Description

We aren't yet doing any endpoint monitoring for Adyen APIs because, iirc, we didn't find a GET and http auth config that was monitorable with our basic endpoint checker. This needs to be revisited.

Related Objects

Event Timeline

According to the API explorer at https://docs.adyen.com/api-explorer/#/CheckoutService/v67/overview there's only one service available on the new API via a GET request. I think it has to do with the pay-by-link service, as the endpoint is <apibase>/paymentLinks/<linkId>. If you're OK requesting a bogus link ID and getting an expected error message we might be able to use that one.

If we're able to use a POST method somehow the /paymentMethods endpoint might be a good candidate. That endpoint is used to look up available payment methods for a given currency / country / amount.

If we're able to use a POST method somehow the /paymentMethods endpoint might be a good candidate. That endpoint is used to look up available payment methods for a given currency / country / amount.

I can look into extending the endpoint checker to POST, should be feasible. What would the HTTP request include?

The simplest valid POST to that endpoint just has this for body:

{
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
}

And at least these headers:

content-type: application/json
x-API-key: YOUR_API_KEY

Values for the placeholders here can be found in the settings repo under SmashPig/local-config/adyen/main.yaml:
YOUR_MERCHANT_ACCOUNT: first key under 'accounts' top-level key
YOUR_API_KEY: value of ws-api-key under the merchant account

See https://docs.adyen.com/api-explorer/#/CheckoutService/v67/post/paymentMethods for expected results

Change 710113 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/SmashPig@master] Script to test Adyen connectivity

https://gerrit.wikimedia.org/r/710113

Jgreen claimed this task.
Jgreen moved this task from Up Next to Done on the fundraising-tech-ops board.

I configured monitoring of the /paymentMethods endpoint per @ Ejegg's suggestion, for now only the civicrm servers will poll due to restricted outbound access from the other roles.

Change 710113 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Script to test Adyen connectivity

https://gerrit.wikimedia.org/r/710113