openapi: 3.2.0 info: version: v1 title: Weavr Embedded Payment Run Transactions Webhooks API license: name: private url: https://weavr.io x-logo: url: https://weavr-cdn.s3.eu-central-1.amazonaws.com/weavr-payment-run-logo.png backgroundColor: '#FFFFFF' altText: Weavr description: "Weavr Payment Run Plug-in API provides a simple and flexible way for Embedders to add payment execution capabilities in their application.\n\nBy integrating Weavr Payment Run plug-in API in your application, you can embed banking and payment capabilities within your app to boost productivity for your users in a seamless experience.\n\n# Authentication\nEach request to the API must include an `api_key` that represents your account. You can obtain an API Key by registering for a Embedder account [here](https://portal.weavr.io/register/?plugin=payment-run).\n\nAlmost all endpoints require a secondary authentication token `auth_token` that represents the user for whom the request is being executed.\n\n# Postman Collection\nTo help you get started with your integration, you can download the [Postman](https://postman.com) collection [here](https://sandbox.weavr.io/payment-run/v1/postman). The collection includes the steps you’ll need to follow to integrate Embedded Payment Run within your app. \n\nThe collection makes use of environment variables to pre-fill details associated with your Sandbox account, such as your account’s API Key. You can download your Sandbox Account environment file from the [Sandbox Portal](https://portal.weavr.io/register/?plugin=payment-run).\n" servers: - url: https://sandbox.weavr.io/payment-run description: Sandbox security: - apiKey: [] authToken: [] tags: - name: Transactions Webhooks description: Notification that the status of a transaction has been updated. x-displayName: Transactions paths: {} webhooks: sweepingWatch: post: summary: Sweeping status update description: 'Notification that the sweeping status has been updated. Sweeping represents transactions that return money to the source account. It may be triggered by unmatched incoming transaction or by failed payment run payments. ' operationId: sweeping_watch security: [] tags: - Transactions Webhooks parameters: - name: call-ref in: header description: 'A call reference generated by the caller and unique to the caller to provide correlation between the caller and system with a maximum length of 255 ' required: false style: simple explode: false schema: type: string - name: published-timestamp in: header description: The timestamp, expressed in Epoch timestamp using millisecond precision, when this event was published. required: true style: simple explode: false schema: type: integer format: int64 - name: signature in: header description: The signature to verify the authenticity of this request. This is the base64 hash (HmacSHA256) of the `published-timestamp` using your API key. required: true style: simple explode: false schema: type: string - name: signature-v2 in: header description: The signature to verify the authenticity of this request. This is the base64 hash (HmacSHA256) of the `call-ref` header, the request body, and the `published-timestamp` header, all concatenated without spaces, and signed using your API key. required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: type: object required: - type - payload properties: type: type: string enum: - sweepingWatch payload: type: object required: - buyerId - sweepingId - transactionAmount - transactionDate - status - destination properties: buyerId: type: string description: Buyer id. sweepingId: type: string description: Sweeping id. example: 654cea294f19c7598987cc84 reference: type: string description: Sweeping transaction reference. transactionDate: type: string format: date-time example: 2023-09-23T11:34:45Z00 description: Date for when sweeping transaction happened transactionAmount: description: Sweeping transaction amount required: - currency - amount type: object properties: currency: type: string description: The currency expressed in ISO-4217 code. maxLength: 3 minLength: 3 enum: - GBP - EUR amount: type: integer format: int64 example: 454321 description: 'The monetary amount, scaled to the lowest denomination of the currency. Example, an amount of 1000 for a GBP currency is actually 1000 pennies or GBP 10.00. ' status: type: string description: 'The status of the sweeping transaction, as follows: - SUBMITTED: Sweeping has been initiated. - REJECTED: Sweeping submitted was rejected. - APPROVED: Sweeping submission was approved. - FAILED: There was an issue with the sweeping, and the transaction has failed. - COMPLETED: The requested funds have been sent. - RETURNED: Sweeping has been returned to the sender ' enum: - SUBMITTED - REJECTED - APPROVED - FAILED - COMPLETED - RETURNED destination: description: Sweeping destination bank account details type: object required: - linkedAccountId - bankAccountDetails properties: linkedAccountId: description: The unique identifier of the linked account type: string pattern: ^[0-9a-fA-F]{24}$ example: 652d25b73541d8084a88a38d bankAccountDetails: description: Details of the destination bank account, depending on the type of linked account. oneOf: - title: SepaBankDetails required: - iban type: object description: Bank details used in case the wire transfer is executed over SEPA. properties: iban: type: string minLength: 15 maxLength: 34 pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$ description: International Bank Account Number, required for wire transfer over SEPA. bankIdentifierCode: type: string minLength: 8 maxLength: 11 pattern: ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$ description: BIC, for wire transfer over SEPA. - title: FasterPaymentsBankDetails required: - accountNumber - sortCode type: object description: Bank details used in case the wire transfer is executed over Faster Payments. properties: accountNumber: type: string minLength: 8 maxLength: 8 pattern: ^[0-9]{8}$ description: Account number, required for wire transfer over Faster Payments. sortCode: type: string minLength: 6 maxLength: 6 pattern: ^[0-9]{6}$ description: Sort code, required for wire transfer over Faster Payments. secondaryReference: type: string description: Secondary reference data if applicable. required: true responses: '200': description: Return a 200 status to indicate that the data was received successfully components: securitySchemes: apiKey: name: api-key type: apiKey in: header description: The API Key representing your Weavr account. You can find your API Key in your Weavr Portal in the API Credentials page. authToken: type: http description: The authentication token representing the user. This will be included in the login response object. scheme: bearer bearerFormat: JWT x-tagGroups: - name: Authentication tags: - Tokens - Passwords - name: Authorisation tags: - Additional Factors - Step up - name: Identities tags: - Buyers - Buyer Authorised Users - name: Payment runs tags: - Payment runs - name: Instruments tags: - Linked Accounts - name: Institutions tags: - Institutions - name: Simulators tags: - Simulator - name: Events tags: - Buyers Webhooks - Payment runs Webhooks - Linked Accounts Webhooks - Tokens Webhooks - Stepup Webhooks - Authentication Factors Webhooks - Transactions Webhooks