v2

latestSwagger 2.02026-08-0610101.9 MB
Payments

Search payments

Returns a list of payments which reference or scheme ID match the search-query supplied in the request.

post/v0/organizations/{organization-id}/payments/search

Path parameters

organization-idstring required

Query parameters

includestring[]

For each payment returned, include its bank account, latest submission (if one exists), rejecting user (if one exists), and/or creating user (if one exists) in the response under the included attribute.

Request body

search-querystring required

Response

OK

Example response

{
  "search-results": [
    {
      "creditor": {
        "iban": "GB42GFNB12345612345678",
        "uk-domestic-sort-code": "123456",
        "bic": "GFNBGB22",
        "account-number": "12345678",
        "bank-id": "123456",
        "bban": "GFNB12345612345678",
        "uk-domestic-account-number": "12345678",
        "other-account-identification": "ABC123",
        "other-institution-identification": "ABC123"
      },
      "latest-submission-url": "/v0/submissions/ps.ICAgc3VibWlzc2lvbi1pZA",
      "rejected-by-url": "/v0/users/ur.ICAgICAgICAgdXNlci1pZA",
      "created-by-url": "/v0/users/ur.ICAgICAgICAgdXNlci1pZA",
      "payment-url": "/v0/payments/pm.ICAgICAgcGF5bWVudC1pZA",
      "payment-reference": "test reference",
      "payment-amount": {
        "currency": "GBP",
        "value": "1000.00"
      },
      "ultimate-debtor": {
        "iban": "GB42GFNB12345612345678",
        "uk-domestic-sort-code": "123456",
        "bic": "GFNBGB22",
        "account-number": "12345678",
        "bank-id": "123456",
        "bban": "GFNB12345612345678",
        "uk-domestic-account-number": "12345678",
        "other-account-identification": "ABC123",
        "other-institution-identification": "ABC123"
      },
      "payment-admissions-url": "/v0/payments/pm.ICAgICAgcGF5bWVudC1pZA/admissions",
      "payment-submissions-url": "/v0/payments/pm.ICAgICAgcGF5bWVudC1pZA/submissions",
      "debtor": {
        "iban": "GB42GFNB12345612345678",
        "uk-domestic-sort-code": "123456",
        "bic": "GFNBGB22",
        "account-number": "12345678",
        "bank-id": "123456",
        "bban": "GFNB12345612345678",
        "uk-domestic-account-number": "12345678",
        "other-account-identification": "ABC123",
        "other-institution-identification": "ABC123"
      }
    }
  ],
  "included": {
    "accounts": [
      {
        "controller-url": "/v0/legal-persons/lp.IGxlZ2FsLXBlcnNvbi1pZA",
        "accrued-interest": {
          "currency": "GBP",
          "value": "1000.00"
        },
        "available-balance": {
          "currency": "GBP",
          "value": "1000.00"
        },
        "bank-addresses": [
          {
            "bank-id": "123456",
            "account-number": "12345678"
          }
        ],
        "account-balance": {
          "currency": "GBP",
          "value": "1000.00"
        }
      }
    ],
    "submissions": [
      {
        "created-by-url": "/v0/users/ur.ICAgICAgICAgdXNlci1pZA",
        "payment-url": "/v0/payments/pm.ICAgICAgcGF5bWVudC1pZA",
        "unique-scheme-identifier": "PGIT2IS7AJG77D2HK23020240212826NatWes     ",
        "submission-url": "/v0/submissions/ps.ICAgc3VibWlzc2lvbi1pZA"
      }
    ],
    "users": [
      {
        "user-email": "user@example.com",
        "user-url": "/v0/users/ur.ICAgICAgICAgdXNlci1pZA",
        "user-username": "user@example.com"
      }
    ]
  }
}