mirror of
https://github.com/gcatanese/adyen-openapi.git
synced 2026-03-10 08:01:24 +00:00
spec release
This commit is contained in:
@@ -19,11 +19,82 @@ info:
|
||||
name: Adyen Developer Experience team
|
||||
url: https://github.com/Adyen/adyen-openapi
|
||||
x-groups:
|
||||
- Merchant account
|
||||
- Payment method
|
||||
tags:
|
||||
- name: Merchant account
|
||||
- name: Payment method
|
||||
x-staticResponse: response.json
|
||||
webhooks:
|
||||
merchant.created:
|
||||
post:
|
||||
tags:
|
||||
- Merchant account
|
||||
summary: Merchant account created
|
||||
description: A merchant account [was created](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants).
|
||||
x-addedInVersion: '1'
|
||||
operationId: post-merchant.created
|
||||
x-groupName: Merchant account
|
||||
x-sortIndex: 1
|
||||
x-methodName: merchantAccountCreated
|
||||
security:
|
||||
- BasicAuth: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
merchant.created:
|
||||
$ref: '#/components/examples/post-merchant.created-merchant.created'
|
||||
schema:
|
||||
$ref: '#/components/schemas/MerchantCreatedNotificationRequest'
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
merchant.created:
|
||||
$ref: '#/components/examples/WebhookAck'
|
||||
schema:
|
||||
$ref: '#/components/schemas/AccountNotificationResponse'
|
||||
description: OK - the request has succeeded.
|
||||
merchant.updated:
|
||||
post:
|
||||
tags:
|
||||
- Merchant account
|
||||
summary: Merchant account capability updated
|
||||
description: There were changes to the verification status and capabilities
|
||||
of a [merchant account](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants).
|
||||
If the verification fails, this webhook includes the errors and the actions
|
||||
that you can take to resolve them.
|
||||
x-addedInVersion: '1'
|
||||
operationId: post-merchant.updated
|
||||
x-groupName: Merchant account
|
||||
x-sortIndex: 2
|
||||
x-methodName: merchantAccountCapabilityUpdated
|
||||
security:
|
||||
- BasicAuth: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
merchant-updated-valid:
|
||||
$ref: '#/components/examples/post-merchant.updated-merchant-updated-valid'
|
||||
merchant-updated-with-errors:
|
||||
$ref: '#/components/examples/post-merchant.updated-merchant-updated-with-errors'
|
||||
schema:
|
||||
$ref: '#/components/schemas/MerchantUpdatedNotificationRequest'
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
merchant-updated-valid:
|
||||
$ref: '#/components/examples/WebhookAck'
|
||||
merchant-updated-with-errors:
|
||||
$ref: '#/components/examples/WebhookAck'
|
||||
schema:
|
||||
$ref: '#/components/schemas/AccountNotificationResponse'
|
||||
description: OK - the request has succeeded.
|
||||
paymentMethod.created:
|
||||
post:
|
||||
tags:
|
||||
@@ -123,6 +194,283 @@ webhooks:
|
||||
description: OK - the request has succeeded.
|
||||
components:
|
||||
schemas:
|
||||
AccountCapabilityData:
|
||||
properties:
|
||||
allowed:
|
||||
description: Indicates whether the capability is allowed. Adyen sets this
|
||||
to **true** if the verification is successful.
|
||||
type: boolean
|
||||
allowedLevel:
|
||||
description: 'The allowed level of the capability. Some capabilities have
|
||||
different levels which correspond to thresholds. Higher levels may require
|
||||
additional checks and increased monitoring.Possible values: **notApplicable**,
|
||||
**low**, **medium**, **high**.'
|
||||
type: string
|
||||
capability:
|
||||
description: The name of the capability. For example, **sendToTransferInstrument**.
|
||||
type: string
|
||||
problems:
|
||||
description: List of entities that has problems with verification. The information
|
||||
includes the details of the errors and the actions that you can take to
|
||||
resolve them.
|
||||
items:
|
||||
$ref: '#/components/schemas/CapabilityProblem'
|
||||
type: array
|
||||
requested:
|
||||
description: Indicates whether you requested the capability.
|
||||
type: boolean
|
||||
requestedLevel:
|
||||
description: 'The level that you requested for the capability. Some capabilities
|
||||
have different levels which correspond to thresholds. Higher levels may
|
||||
require additional checks and increased monitoring.Possible values: **notApplicable**,
|
||||
**low**, **medium**, **high**.'
|
||||
type: string
|
||||
verificationStatus:
|
||||
description: 'The status of the verification checks for the capability.
|
||||
|
||||
|
||||
Possible values:
|
||||
|
||||
|
||||
* **pending**: Adyen is running the verification.
|
||||
|
||||
|
||||
* **invalid**: The verification failed. Check if the `errors` array contains
|
||||
more information.
|
||||
|
||||
|
||||
* **valid**: The verification was successful.
|
||||
|
||||
|
||||
* **rejected**: Adyen checked the information and found reasons to not
|
||||
allow the capability.
|
||||
|
||||
'
|
||||
type: string
|
||||
required:
|
||||
- requestedLevel
|
||||
- requested
|
||||
type: object
|
||||
AccountCreateNotificationData:
|
||||
properties:
|
||||
capabilities:
|
||||
additionalProperties:
|
||||
$ref: '#/components/schemas/AccountCapabilityData'
|
||||
description: Key-value pairs that specify the actions that the merchant
|
||||
account can do and its settings. The key is a capability. For example,
|
||||
the **sendToTransferInstrument** is the capability required before you
|
||||
can pay out funds to the bank account. The value is an object containing
|
||||
the settings for the capability.
|
||||
type: object
|
||||
companyId:
|
||||
description: The unique identifier of the company account.
|
||||
type: string
|
||||
legalEntityId:
|
||||
description: The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).
|
||||
type: string
|
||||
merchantId:
|
||||
description: The unique identifier of the merchant account.
|
||||
type: string
|
||||
status:
|
||||
description: 'The status of the merchant account.
|
||||
|
||||
|
||||
Possible values:
|
||||
|
||||
|
||||
* **PreActive**: The merchant account has been created. Users cannot access
|
||||
the merchant account in the Customer Area. The account cannot process
|
||||
payments.
|
||||
|
||||
* **Active**: Users can access the merchant account in the Customer Area.
|
||||
If the company account is also **Active**, then payment processing and
|
||||
payouts are enabled.
|
||||
|
||||
* **InactiveWithModifications**: Users can access the merchant account
|
||||
in the Customer Area. The account cannot process new payments but can
|
||||
still modify payments, for example issue refunds. The account can still
|
||||
receive payouts.
|
||||
|
||||
* **Inactive**: Users can access the merchant account in the Customer
|
||||
Area. Payment processing and payouts are disabled.
|
||||
|
||||
* **Closed**: The account is closed and this cannot be reversed. Users
|
||||
cannot log in. Payment processing and payouts are disabled.'
|
||||
type: string
|
||||
required:
|
||||
- merchantId
|
||||
- companyId
|
||||
- status
|
||||
- capabilities
|
||||
type: object
|
||||
AccountNotificationResponse:
|
||||
properties:
|
||||
notificationResponse:
|
||||
description: Respond with **HTTP 200 OK** and `[accepted]` in the response
|
||||
body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
|
||||
type: string
|
||||
type: object
|
||||
AccountUpdateNotificationData:
|
||||
properties:
|
||||
capabilities:
|
||||
additionalProperties:
|
||||
$ref: '#/components/schemas/AccountCapabilityData'
|
||||
description: Key-value pairs that specify what you can do with the merchant
|
||||
account and its settings. The key is a capability. For example, the **sendToTransferInstrument**
|
||||
is the capability required before you can pay out the funds of a merchant
|
||||
account to a [bank account](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments).
|
||||
The value is an object containing the settings for the capability.
|
||||
type: object
|
||||
legalEntityId:
|
||||
description: The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).
|
||||
type: string
|
||||
merchantId:
|
||||
description: The unique identifier of the merchant account.
|
||||
type: string
|
||||
status:
|
||||
description: 'The status of the merchant account.
|
||||
|
||||
|
||||
Possible values:
|
||||
|
||||
|
||||
* **PreActive**: The merchant account has been created. Users cannot access
|
||||
the merchant account in the Customer Area. The account cannot process
|
||||
payments.
|
||||
|
||||
* **Active**: Users can access the merchant account in the Customer Area.
|
||||
If the company account is also **Active**, then payment processing and
|
||||
payouts are enabled.
|
||||
|
||||
* **InactiveWithModifications**: Users can access the merchant account
|
||||
in the Customer Area. The account cannot process new payments but can
|
||||
still modify payments, for example issue refunds. The account can still
|
||||
receive payouts.
|
||||
|
||||
* **Inactive**: Users can access the merchant account in the Customer
|
||||
Area. Payment processing and payouts are disabled.
|
||||
|
||||
* **Closed**: The account is closed and this cannot be reversed. Users
|
||||
cannot log in. Payment processing and payouts are disabled.'
|
||||
type: string
|
||||
required:
|
||||
- merchantId
|
||||
- status
|
||||
- capabilities
|
||||
type: object
|
||||
CapabilityProblem:
|
||||
properties:
|
||||
entity:
|
||||
description: The ID and the type of entity that has verification errors.
|
||||
$ref: '#/components/schemas/CapabilityProblemEntity'
|
||||
verificationErrors:
|
||||
description: List of verification errors.
|
||||
items:
|
||||
$ref: '#/components/schemas/VerificationError'
|
||||
type: array
|
||||
type: object
|
||||
CapabilityProblemEntity:
|
||||
properties:
|
||||
documents:
|
||||
description: List of document IDs to which the verification errors related
|
||||
to the capabilities correspond to.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
id:
|
||||
description: The ID of the entity.
|
||||
type: string
|
||||
owner:
|
||||
description: The owner of the entity that has an error. For example, if
|
||||
the `entity.type` is **BankAccount**, then the `owner` contains the details
|
||||
of the legal entity that owns the bank account.
|
||||
$ref: '#/components/schemas/CapabilityProblemEntity-recursive'
|
||||
type:
|
||||
description: 'The type of entity.
|
||||
|
||||
|
||||
Possible values: **LegalEntity**, **BankAccount**, or **Document**.'
|
||||
enum:
|
||||
- BankAccount
|
||||
- Document
|
||||
- LegalEntity
|
||||
type: string
|
||||
type: object
|
||||
CapabilityProblemEntity-recursive:
|
||||
properties:
|
||||
documents:
|
||||
description: List of document IDs to which the verification errors related
|
||||
to the capabilities correspond to.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
id:
|
||||
description: The ID of the entity.
|
||||
type: string
|
||||
type:
|
||||
description: 'The type of entity.
|
||||
|
||||
|
||||
Possible values: **LegalEntity**, **BankAccount**, or **Document**.'
|
||||
enum:
|
||||
- BankAccount
|
||||
- Document
|
||||
- LegalEntity
|
||||
type: string
|
||||
required: []
|
||||
type: object
|
||||
MerchantCreatedNotificationRequest:
|
||||
properties:
|
||||
createdAt:
|
||||
description: Timestamp for when the webhook was created.
|
||||
format: date-time
|
||||
type: string
|
||||
data:
|
||||
description: Contains event details.
|
||||
$ref: '#/components/schemas/AccountCreateNotificationData'
|
||||
environment:
|
||||
description: 'The environment from which the webhook originated.
|
||||
|
||||
|
||||
Possible values: **test**, **live**.'
|
||||
type: string
|
||||
type:
|
||||
description: Type of notification.
|
||||
enum:
|
||||
- merchant.created
|
||||
type: string
|
||||
required:
|
||||
- environment
|
||||
- createdAt
|
||||
- data
|
||||
- type
|
||||
type: object
|
||||
MerchantUpdatedNotificationRequest:
|
||||
properties:
|
||||
createdAt:
|
||||
description: Timestamp for when the webhook was created.
|
||||
format: date-time
|
||||
type: string
|
||||
data:
|
||||
description: Contains event details.
|
||||
$ref: '#/components/schemas/AccountUpdateNotificationData'
|
||||
environment:
|
||||
description: 'The environment from which the webhook originated.
|
||||
|
||||
|
||||
Possible values: **test**, **live**.'
|
||||
type: string
|
||||
type:
|
||||
description: Type of notification.
|
||||
enum:
|
||||
- merchant.updated
|
||||
type: string
|
||||
required:
|
||||
- environment
|
||||
- createdAt
|
||||
- data
|
||||
- type
|
||||
type: object
|
||||
MidServiceNotificationData:
|
||||
properties:
|
||||
allowed:
|
||||
@@ -254,6 +602,69 @@ components:
|
||||
body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
|
||||
type: string
|
||||
type: object
|
||||
RemediatingAction:
|
||||
properties:
|
||||
code:
|
||||
description: The remediating action code.
|
||||
type: string
|
||||
message:
|
||||
description: A description of how you can resolve the verification error.
|
||||
type: string
|
||||
type: object
|
||||
VerificationError:
|
||||
properties:
|
||||
code:
|
||||
description: The verification error code.
|
||||
type: string
|
||||
message:
|
||||
description: The verification error message.
|
||||
type: string
|
||||
remediatingActions:
|
||||
description: The actions that you can take to resolve the verification error.
|
||||
items:
|
||||
$ref: '#/components/schemas/RemediatingAction'
|
||||
type: array
|
||||
subErrors:
|
||||
description: More granular information about the verification error.
|
||||
items:
|
||||
$ref: '#/components/schemas/VerificationError-recursive'
|
||||
type: array
|
||||
type:
|
||||
description: 'The type of verification error.
|
||||
|
||||
|
||||
Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**.'
|
||||
enum:
|
||||
- dataMissing
|
||||
- invalidInput
|
||||
- pendingStatus
|
||||
type: string
|
||||
type: object
|
||||
VerificationError-recursive:
|
||||
properties:
|
||||
code:
|
||||
description: The verification error code.
|
||||
type: string
|
||||
message:
|
||||
description: The verification error message.
|
||||
type: string
|
||||
type:
|
||||
description: 'The type of verification error.
|
||||
|
||||
|
||||
Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**.'
|
||||
enum:
|
||||
- dataMissing
|
||||
- invalidInput
|
||||
- pendingStatus
|
||||
type: string
|
||||
remediatingActions:
|
||||
description: The actions that you can take to resolve the verification error.
|
||||
items:
|
||||
$ref: '#/components/schemas/RemediatingAction'
|
||||
type: array
|
||||
required: []
|
||||
type: object
|
||||
securitySchemes:
|
||||
BasicAuth:
|
||||
scheme: basic
|
||||
@@ -263,6 +674,82 @@ components:
|
||||
summary: Acknowledge Webhook
|
||||
value:
|
||||
notificationResponse: '[accepted]'
|
||||
post-merchant.created-merchant.created:
|
||||
summary: Merchant account created
|
||||
description: Example webhook when a merchant account was created
|
||||
value:
|
||||
type: merchant.created
|
||||
environment: test
|
||||
createdAt: '2022-08-12T10:50:01+02:00'
|
||||
data:
|
||||
capabilities:
|
||||
sendToTransferInstrument:
|
||||
requested: true
|
||||
requestedLevel: notApplicable
|
||||
companyId: YOUR_COMPANY_ID
|
||||
merchantId: MC3224X22322535GH8D537TJR
|
||||
status: PreActive
|
||||
post-merchant.updated-merchant-updated-valid:
|
||||
summary: Merchant account verified
|
||||
description: Example webhook when verification is succesful
|
||||
value:
|
||||
type: merchant.updated
|
||||
environment: test
|
||||
createdAt: '2022-09-20T13:42:31+02:00'
|
||||
data:
|
||||
capabilities:
|
||||
receivePayments:
|
||||
allowed: true
|
||||
requested: true
|
||||
requestedLevel: notApplicable
|
||||
verificationStatus: valid
|
||||
legalEntityId: LE322KH223222F5GNNW694PZN
|
||||
merchantId: YOUR_MERCHANT_ID
|
||||
status: PreActive
|
||||
post-merchant.updated-merchant-updated-with-errors:
|
||||
summary: Merchant account verification failed
|
||||
description: Example webhook when verification fails
|
||||
value:
|
||||
type: merchant.updated
|
||||
environment: test
|
||||
createdAt: '2022-09-20T13:41:12+02:00'
|
||||
data:
|
||||
capabilities:
|
||||
receivePayments:
|
||||
allowed: false
|
||||
requested: true
|
||||
requestedLevel: notApplicable
|
||||
problems:
|
||||
- entity:
|
||||
id: LE322KH223222F5GNNW694PZN
|
||||
type: LegalEntity
|
||||
verificationErrors:
|
||||
- code: '2_8064'
|
||||
message: '''UBO through ownership'' was missing.'
|
||||
remediatingActions:
|
||||
- code: '2_123'
|
||||
message: Add 'organization.entityAssociations' of type 'uboThroughOwnership'
|
||||
to legal entity
|
||||
type: dataMissing
|
||||
- code: '1_30'
|
||||
message: Individual details couldn't be verified
|
||||
remediatingActions:
|
||||
- code: '1_300'
|
||||
message: Update individual details
|
||||
subErrors:
|
||||
- code: '1_3000'
|
||||
message: The user couldn't be verified
|
||||
remediatingActions:
|
||||
- code: '1_300'
|
||||
message: Update individual details
|
||||
- code: '1_301'
|
||||
message: Upload an ID document
|
||||
type: invalidInput
|
||||
type: invalidInput
|
||||
verificationStatus: invalid
|
||||
legalEntityId: LE322KH223222F5GNNW694PZN
|
||||
merchantId: YOUR_MERCHANT_ID
|
||||
status: PreActive
|
||||
post-paymentMethod.created-paymentMethod.created:
|
||||
summary: Payment method Visa created
|
||||
value:
|
||||
|
||||
Reference in New Issue
Block a user