/payment_methods
Target audience: Developers
1 | Release version: 4.2.0 |
Introduction¶
This endpoint returns Adyen payment methods available for purchase.
Attention
This API gives access to Adyen related endpoints. Since this section is quite specific it has it's own section of documentation. See here for more information.
URI¶
Environment | URI |
---|---|
Stage | https://payway-api.stage.adeprimo.se/external/api/v1/adyen/payment_methods |
Production | https://backend.worldoftulo.com/external/api/v1/adyen/payment_methods |
Requirements¶
Identity | Scope |
---|---|
No | /external/adyen/r |
Curl Examples¶
Period id¶
Return Adyen payment method setup for supplied period id.
1 2 3 4 | curl --request GET \ --url https://payway-api.stage.adeprimo.se/external/api/v1/adyen/payment_methods?period_id=585a4768edce2c5e6f000001&product_code=adeprimo_digital&origin=http://purchase.example.com \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' |
Parameter | Description | Required | Format | Type |
---|---|---|---|---|
period_id | Id of the payment period | Yes | Size range ..24 Allowed values: "/^[a-f\d]{24}$/i" |
String |
product_code | The product code for a package/campaign. | Yes | Size range ..100 Allowed values: "/^[a-f\d]{100}$/i" |
String |
origin | URI where purchase is performed (E.g. https://purchase.example.org) | Yes | Size range: ..1024 Allowed values: uri regex that is too long to show here. Must be absolute | String |
Product code¶
Returns all Adyen payment methods for package or campaign.
1 2 3 4 | curl --request GET \ --url https://payway-api.stage.adeprimo.se/external/api/v1/adyen/payment_methods?product_code=adeprimo_digital&origin=http://purchase.example.com \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' |
Parameters
Parameter | Description | Required | Format | Type |
---|---|---|---|---|
product_code | The product code for a package/campaign. | Yes | Size range ..100 Allowed values: "/^[a-f\d]{100}$/i" |
String |
origin | URI where purchase is performed (E.g. https://purchase.example.org) | Yes | Size range: ..1024 Allowed values: uri regex that is too long to show here. Must be absolute | String |
Order Id¶
Returns all Adyen payment methods based on order id. Most often used for 0 amount verification transactions.
1 2 3 4 | curl --request GET \ --url https://payway-api.stage.adeprimo.se/external/api/v1/adyen/payment_methods?order_id=ADEPRIMOSE-123&origin=http://purchase.example.com \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' |
Parameters
Parameter | Description | Required | Format | Type |
---|---|---|---|---|
order_id | The payway order id | Yes | Size range: ..1024 and match format /\A[A-Z]+[-{1}]\d+/ | String |
origin | URI where purchase is performed (E.g. https://purchase.example.org) | Yes | Size range: ..1024 Allowed values: uri regex that is too long to show here. Must be absolute | String |
Response¶
Example response¶
1 2 3 4 5 6 7 8 9 10 11 | HTTP 200 { "items": [ { "details": [], "name": "Credit Card", "type": "scheme" } ... ] } |
The result is used to initiate the Adyen drop-in widget. The contents of "items", not the entire result.
Errors¶
The error response is sent as application/JSON and will have an HTTP status code ranging between 400-500.
An error message will contain these properties in every response. Some error responses will add additional data for troubleshooting. Third-party errors from Adyen for example.
Error example
1 2 3 4 5 6 | { "code": "error_code", "field": "field", "message": "error message", "correlation_id": "correlation_id only available for third party errors" } |