From 8c90ec104aa26708598001cfe5c55c774258599b Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Wed, 18 Oct 2023 16:01:35 +0200 Subject: [PATCH] spec release --- json/ManagementNotificationService-v3.json | 551 +++++++++++++++++++++ json/ManagementService-v3.json | 2 +- yaml/ManagementNotificationService-v3.yaml | 487 ++++++++++++++++++ yaml/ManagementService-v3.yaml | 2 +- 4 files changed, 1040 insertions(+), 2 deletions(-) diff --git a/json/ManagementNotificationService-v3.json b/json/ManagementNotificationService-v3.json index 3a0116e1..428e33d0 100644 --- a/json/ManagementNotificationService-v3.json +++ b/json/ManagementNotificationService-v3.json @@ -12,15 +12,127 @@ } }, "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" : [ @@ -177,6 +289,252 @@ }, "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.\n\nPossible values:\n\n* **pending**: Adyen is running the verification.\n\n* **invalid**: The verification failed. Check if the `errors` array contains more information.\n\n* **valid**: The verification was successful.\n\n* **rejected**: Adyen checked the information and found reasons to not allow the capability.\n", + "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.\n\nPossible values:\n\n* **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments.\n* **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.\n* **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.\n* **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled.\n* **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.\n\nPossible values:\n\n* **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments.\n* **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.\n* **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.\n* **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled.\n* **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.\n\nPossible 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.\n\nPossible 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.\n\nPossible 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.\n\nPossible 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" : { @@ -305,6 +663,86 @@ } }, "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.\n\nPossible 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.\n\nPossible 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" : { @@ -320,6 +758,119 @@ "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" : { diff --git a/json/ManagementService-v3.json b/json/ManagementService-v3.json index 1af165e5..f317c247 100644 --- a/json/ManagementService-v3.json +++ b/json/ManagementService-v3.json @@ -9,7 +9,7 @@ "version" : "3", "x-publicVersion" : true, "title" : "Management API", - "description" : "Configure and manage your Adyen company and merchant accounts, stores, and payment terminals.\n## Authentication\nEach request to the Management API must be signed with an API key. [Generate your API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key) in the Customer Area and then set this key to the `X-API-Key` header value.\n\nTo access the live endpoints, you need to generate a new API key in your live Customer Area.\n## Versioning\n\nManagement API handles versioning as part of the endpoint URL. For example, to send a request to version 1 of the `/companies/{companyId}/webhooks` endpoint, use:\n\n```text\nhttps://management-test.adyen.com/v3/companies/{companyId}/webhooks\n```\n\n## Going live\n\nTo access the live endpoints, you need an API key from your live Customer Area. Use this API key to make requests to:\n\n```text\nhttps://management-live.adyen.com/v3\n```", + "description" : "Configure and manage your Adyen company and merchant accounts, stores, and payment terminals.\n## Authentication\nEach request to the Management API must be signed with an API key. [Generate your API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key) in the Customer Area and then set this key to the `X-API-Key` header value.\n\nTo access the live endpoints, you need to generate a new API key in your live Customer Area.\n## Versioning\n\nManagement API handles versioning as part of the endpoint URL. For example, to send a request to this version of the `/companies/{companyId}/webhooks` endpoint, use:\n\n```text\nhttps://management-test.adyen.com/v3/companies/{companyId}/webhooks\n```\n\n## Going live\n\nTo access the live endpoints, you need an API key from your live Customer Area. Use this API key to make requests to:\n\n```text\nhttps://management-live.adyen.com/v3\n```", "termsOfService" : "https://www.adyen.com/legal/terms-and-conditions", "contact" : { "name" : "Adyen Developer Experience team", diff --git a/yaml/ManagementNotificationService-v3.yaml b/yaml/ManagementNotificationService-v3.yaml index b7b814c7..acc967bf 100644 --- a/yaml/ManagementNotificationService-v3.yaml +++ b/yaml/ManagementNotificationService-v3.yaml @@ -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: diff --git a/yaml/ManagementService-v3.yaml b/yaml/ManagementService-v3.yaml index cf5ba8af..392a4cf0 100644 --- a/yaml/ManagementService-v3.yaml +++ b/yaml/ManagementService-v3.yaml @@ -22,7 +22,7 @@ info: Management API handles versioning as part of the endpoint URL. For example, to - send a request to version 1 of the `/companies/{companyId}/webhooks` endpoint, + send a request to this version of the `/companies/{companyId}/webhooks` endpoint, use: