> Agents can also search and read this documentation through its [MCP server](https://docs.papayaglobal.com/~gitbook/mcp).

# Introduction

Welcome to the Papaya Global payments API Reference documentation. This detailed guide provides developers with the necessary information to smoothly incorporate Papaya Global's workforce payment processing capabilities into their applications and websites. Whether you are developing an online service that necessitates secure and dependable payment processing, our APIs are the perfect solution.

The Papaya Global API is crafted to be adaptable, granting you authority over your beneficiaries, wallet payment instructions, and account management. We strongly advise you to review the API documentation to familiarize yourself with the functionalities and procedures linked to our product. If required, we can grant you access to a demo account.


# Real-Life Scenarios

### Real-life scenarios are depicted through an illustrative workflow overview. <a href="#real-lifescenarios-illustrativeworkflowoverview-real-lifescenariosaredepictedthroughanillustrativewo" id="real-lifescenarios-illustrativeworkflowoverview-real-lifescenariosaredepictedthroughanillustrativewo"></a>

Below is an illustrative workflow demonstrating how the Papaya Global Workforce Payments APIs function in real-world scenarios.

{% hint style="success" %}
You need to transfer $7,000 in USD to an individual beneficiary in the United States. The payment will be sourced from the available balance in your USD wallet account.
{% endhint %}

#### Before you begin working with the API, you must first complete two required steps:  <a href="#real-lifescenarios-illustrativeworkflowoverview-1.authentication" id="real-lifescenarios-illustrativeworkflowoverview-1.authentication"></a>

1. Establishing a legal entity (finishing the KYB procedure)
2. Open A Wallet (through the app)

<figure><img src="https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2FbFRvjzKS4kZPuZLNfpOb%2Fimage.png?alt=media&amp;token=7604c329-45a3-463a-963f-a9dc6d37f9d6" alt=""><figcaption><p>Open Wallet</p></figcaption></figure>

#### 1. Authentication <a href="#real-lifescenarios-illustrativeworkflowoverview-1.authentication" id="real-lifescenarios-illustrativeworkflowoverview-1.authentication"></a>

To get started, you must acquire an access token to access Papaya Global's Workforce Payments' various API endpoints. By utilizing your  `api_key` and `client_secret`, you can make a request to the Token API endpoint. Upon successful authentication, you will receive an access token.

**Request Example**

<mark style="color:green;">**`POST`**</mark>/token

```json
{
   "api_key": "82725488-22bf-40d1-ace6-9ea6ee42f870",
   "client_secret": "MySecret!",
   "token_name": "testEXP13"
}
```

**Response Example**

```json
{
   "valid_until": "2024-07-17T15:42Z",
   "token": "eyJ0eXAiOiJKV1QiLCJraWQiOiJBUElLRVkwIiwiYXBpX3Rva2VuX2lkIjoiNDIwNjJiMWMtOWRmYy00NzI2LTllYTAtYmM4MGI0MzcwOWJkIiwiYWxnIjoiUlMyNTYifQ.eyJpYXQiOjE3MjExMzA5NzMsImV4cCI6MTcyMTIzMDk3NCwic3ViIjoiYWNjZXNzIiwidXNlciI6eyJpZCI6IjgyNzI1NDg4LTIyYmYtNDBkMS1hY2U2LTllYTZlZTQyZjg3MCIsImVtYWlsIjoiZXlhbDEubmV0QGdtYWlsLmNvbSIsIm93bmVyIjp7ImlkIjoiMjAxMDAwIiwib3duZXJUeXBlIjoib3JnX2lkIn19fQ.YCV6m7jGAJBLY8HDtMK-1UkgM_DNS9JKLMojUNstQGoR7ZjMxcQ3aNb3HvvQpq-OaEAy99TjpI2XB_b7zu87J4AvPuHgM9rsHlZagwQt0M6LK0PsN7K8d8RKbPuaXsZvc3SQ4t0HqxfrD8nYC7C63ImPMsEYzvOvLYSoYXwmQ74vFzCXVi3vhWwth-07JhVAp8-S46zGqBNODhMkUPBnUXBkI6KL3A_ElKwaH3YI4ZFsCOKJu0DnZJvPUDqsJRz9l0Hics058eiCOqqs4ODDegHSLGrQyUsZVMyJ_InI9LSNtaw6dal1i4_3zPUAE04aXonMcZDt_Bv9fjoUoqf9Ew",
   "token_name": "testEXP13"
}
```

#### 2. Create a Payment Group <a href="#real-lifescenarios-illustrativeworkflowoverview-2.openawallet" id="real-lifescenarios-illustrativeworkflowoverview-2.openawallet"></a>

A group Allows the organization to consolidate and oversee payment requests effectively. A group is generated with a given wallet. Once created, you can supervise the group’s payment requests based on various criteria such as time, location, business unit, etc.

{% hint style="info" %}
The wallet ID can be obtained using the Get Wallets List API or from the application (under the View Wallet).
{% endhint %}

**Request Example**

<mark style="color:green;">**`POST`**</mark> /payments/groups

```json
{
    "description": "Demo Group",
    "wallet": "f6b2776d-53f4-404e-a690-c3766a91d43a",
    "name": "February USD cycle",
    "user_tags":{
      "cycle":"2024-02"
    }
  }
```

**Response Example**

```json
{
  "type": "group",
  "id": "b48c3f38-9278-41a3-b101-444f20fce982",
  "description": "Demo Group",
  "wallet": "f6b2776d-53f4-404e-a690-c3766a91d43a",
  "name": "February USD cycle",
  "user_tags": {
    "cycle":"2024-02"
  }
}
```

#### 3. Create Beneficiary <a href="#real-lifescenarios-illustrativeworkflowoverview-4.createbeneficiary" id="real-lifescenarios-illustrativeworkflowoverview-4.createbeneficiary"></a>

Before making a payment, it is necessary to create a beneficiary resource. The beneficiary refers to the person or organization receiving the payment, and their bank details and preferred payment method are recorded. Once registered, the beneficiary ID can be used to send payment instructions.

{% hint style="info" %}
Get insights on required fields and validation rules for beneficiary resource creation scenarios using the Get Schema Information API.
{% endhint %}

**Request Example**

<mark style="color:green;">**`POST`**</mark> /payments/beneficiaries

```json
{
   "type": "INDIVIDUAL",
   "country": "US",
   "currency": "USD",
   "user_tags": {
      "department": "R&D",
      "cost_center": "US"
   },
   "entity": {
      "individual_first_name": "Smith",
      "individual_last_name": "Johny",
      "date_of_birth": "1970-01-01",
      "address_line_1": "944 Fairfield Street",
      "address_city": "Los Angeles",
      "address_country": "US",
      "address_country_subdivision": "CA",
      "address_postal_code": "90210"
   },
   "bank_details": {
      "account_name": "John Smith",
      "account_number": "1234567",
      "bank_code": "123456789",
      "bank_name": "Bank of America ",
      "bank_identifier_code": "BOFAUS22XXX"
   }
}
```

**Response Example**

```json
{
   "type": "contact",
   "id": "GHXY5QuJRxSIrfkfcaBzUg",
   "currency": "USD",
   "country": "US",
   "bank_details": {
      "account_country": "US",
      "account_name": "John Smith",
      "account_number": "1234567",
      "bank_code": "123456789",
      "bank_identifier_code": "BOFAUS22XXX",
      "bank_name": "Bank of America "
   },
   "entity": {
      "address_city": "Los Angeles",
      "address_country": "US",
      "address_country_subdivision": "CA",
      "address_line_1": "944 Fairfield Street",
      "address_postal_code": "90210",
      "date_of_birth": "1970-01-01",
      "individual_first_name": "Smith",
      "individual_last_name": "Johny"
   },
   "user_tags": {
      "department": "R&D",
      "cost_center": "US"
   },
   "active": false
}
```

#### 4. Create Payment Instruction <a href="#real-lifescenarios-illustrativeworkflowoverview-5.createpaymentinstruction" id="real-lifescenarios-illustrativeworkflowoverview-5.createpaymentinstruction"></a>

Creating payment Instructions will enable you to transfer funds to the registered beneficiary. The response will return all requisite details on the transaction.

{% hint style="info" %}
Payment can be initiated by referencing the beneficiary ID generated through beneficiary resources. You can use the Get Beneficiaries List API to get the beneficiary ID.
{% endhint %}

**Request Example**

<mark style="color:green;">**`POST`**</mark> /payments/payments

```json
{
   "source": {
      "id": "7fb54ffb-0f1e-4df5-b81c-7046d2987df0",
      "type": "group"
   },
   "target": {
      "id": "GHXY5QuJRxSIrfkfcaBzUg",
      "type": "contact"
   },
   "execution": {
      "date": "2024-03-02T09:09:51.508859936Z",
      "type": "LAND",
      "margin": 4
   },
   "amount": {
      "amount": 1000,
      "type": "LAND",
      "currency": "USD"
   },
   "description": "Remittance instruction",
   "id": "66666",
   "signature": "<string>",
   "purpose": "SALA",
   "approved": true,
   "final": {
      "is_final": true,
      "expected": "2024-03-02T09:09:51.508859936Z"
   },
   "attachments": [
      {
         "url": "https://www.papayaglobal.com/",
         "title": "papayaglobal",
         "attachment_id": "123"
      },
      {
         "url": "https://docs.papayaglobal.com",
         "title": "Global payments API",
         "attachment_id": "456"
      }
   ],
   "user_tags": {
      "enimb5": "demo test payment"
   }
}
```

**Response Example**

```json
{
   "id": "66666",
   "description": "Remittance instruction",
   "purpose": "SALA",
   "source": {
      "id": "7fb54ffb-0f1e-4df5-b81c-7046d2987df0",
      "type": "group"
   },
   "target": {
      "type": "contact",
      "id": "GHXY5QuJRxSIrfkfcaBzUg"
   },
   "info": {
      "funding": {
         "amount": 0
      },
      "status": "PENDING",
      "credit": {
         "currency": "USD",
         "amount": 1000
      },
      "fees": 0
   },
   "amount": {
      "type": "LAND",
      "amount": 1000,
      "currency": "USD"
   },
   "execution": {
      "date": "2024-03-02T09:09:51Z",
      "margin": 4
   },
   "final": {
      "is_final": true
   },
   "attachments": [
      {
         "attachment_id": "123",
         "title": "papayaglobal",
         "url": "https://www.papayaglobal.com/"
      },
      {
         "attachment_id": "456",
         "title": "Global payments API",
         "url": "https://docs.papayaglobal.com"
      }
   ],
   "approved": true,
   "user_tags": {
      "enimb5": "demo test payment"
   }
}
```

#### 5. Check Wallet Balance <a href="#real-lifescenarios-illustrativeworkflowoverview-6.checkwalletbalance" id="real-lifescenarios-illustrativeworkflowoverview-6.checkwalletbalance"></a>

Retrieve wallet details and verify the balance associated with the wallet ID. If there are insufficient funds available, ensure you top up your wallet.

{% hint style="info" %}
The wallet ID can be obtained using the Get Wallets List API or the application (under the View Wallet).
{% endhint %}

**Request Example**

<mark style="color:blue;">**`GET`**</mark> /payments/wallets/?id=f6b2776d-53f4-404e-a690-c3766a91d43a

**Response Example**

```json
{
   "items": [
      {
         "id": "f6b2776d-53f4-404e-a690-c3766a91d43a",
         "currency": "USD",
         "name": "Demo USD Wallet",
         "type": "wallet",
         "owner": "entity://business/customer/demo:standalone:1709197789/legal/0d65c5cd-4896-45b9-b268-c431b82605af",
         "funding": {
            "name": "RONKIֹ LTD CMA - EUR",
            "country": "GB",
            "account_number": "UKNWBK60161529100024",
            "bic": "CHASGB2L",
            "iban": "UKNWBK60161529100024"
         },
         "balance": 120000,
         "user_tags": {
            "department": "sales"
         },
         "state": "ACTIVE"
      }
   ],
   "paging": {
      "skip": 0,
      "take": 0
   }
}
```

#### 6. Approve Payment Instruction <a href="#real-lifescenarios-illustrativeworkflowoverview-7.approvepaymentinstruction" id="real-lifescenarios-illustrativeworkflowoverview-7.approvepaymentinstruction"></a>

Review the payment instruction details and approve the transaction by indicating the IDs of the payment.

{% hint style="info" %}
Payment instructions can be obtained using the Get Payment Details API (if the payment ID is known) or by the Get Payments List API.
{% endhint %}

**Request Example**

<mark style="color:yellow;">**`PATCH`**</mark> /payments/payments/approve?id=1573c466-53ba-46e7-a7f2-b6d49c79716b

**Response Examples**

```json
{
  "items": [
    {
      "result": "Approved Successfully",
      "id": "1573c466-53ba-46e7-a7f2-b6d49c79716b",
      "type": "payment"
    }
  ]
}
```

#### &#x20;7. Check Payment Status <a href="#real-lifescenarios-illustrativeworkflowoverview-8.checkpaymentstatus" id="real-lifescenarios-illustrativeworkflowoverview-8.checkpaymentstatus"></a>

Obtain payment information and check the payment status by providing the payment ID.

**Request Example**

<mark style="color:blue;">**`GET`**</mark> /payments/payments/id=1573c466-53ba-46e7-a7f2-b6d49c79716b

**Response Examples**

```json
{
   "items": [
      {
         "id": "1573c466-53ba-46e7-a7f2-b6d49c79716b",
         "description": "Uk test in DM",
         "purpose": "SALA",
         "source": {
            "id": "01f5d-844c-4487-82d1-fc0faec0ab6d",
            "type": "group"
         },
         "target": {
            "type": "contact",
            "id": "8va9KENJSD2BbafQgDEecA"
         },
         "info": {
            "funding": {
               "date": "2024-07-08T05:00:00Z",
               "currency": "GBP",
               "amount": 834.32075
            },
            "status": "PENDING",
            "credit": {
               "currency": "USD",
               "amount": 1000
            },
            "rate": 1.21600101,
            "fees": 11.95302
         },
         "amount": {
            "type": "LAND",
            "amount": 1000
         },
         "execution": {
            "date": "2024-07-10T08:00:00Z"
         },
         "final": {
            "is_final": true,
            "expected": "2024-07-08T05:00:00Z"
         },
         "attachemnts": [],
         "approved": true,
         "user_tags": {}
      }
   ],
   "paging": {
      "take": 50,
      "skip": 0
   }
}
```

&#x20;


# API Reference


# API Essentials

The Papaya Global Workforce Payments API is organized around REST. The API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

#### **HTTP Methods** <a href="#apiessentials-httpmethods" id="apiessentials-httpmethods"></a>

The Workforce Payments API uses HTTP methods to perform operations on resources. The most commonly used methods are:

<figure><img src="https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2F50QfWWqxGEfCZHSgZkpT%2Fimage.png?alt=media&amp;token=2eb0adf2-9c67-492b-a0d7-1a09c6621be4" alt=""><figcaption></figcaption></figure>

#### **Data Types** <a href="#apiessentials-datatypes" id="apiessentials-datatypes"></a>

The Workforce Payments API consistently utilizes data types and formats.

| Data Types     | Description                                                                                  | Sample Use Cases                                                                     | Sample Values                    |
| -------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------- |
| Dates          | Dates are represented in the YYYY-MM-DD format without any time or timezone information      | `date_of_birth`                                                                      | `1970-01-01`                     |
| Time Stamps    | The format for representing date and time with timezone information is YYYY-MM-DDTHH:mm:ssZ. | <p><code>start\_date</code></p><p><code>end\_date</code></p><p><code>date</code></p> | `2024-03-02T09:09:51.508859936Z` |
| Country Codes  | Country codes in the ISO 3166-2 standard consist of two letters.                             | <p><code>address\_country</code></p><p><code>account\_country</code></p>             | `AU`                             |
| Currency Codes | Currency code in ISO 4217 with three letters.                                                | `currency`                                                                           | `AUD`                            |

#### **Response Codes** <a href="#apiessentials-responsecodes" id="apiessentials-responsecodes"></a>

The Papaya Global Workforce Payments API utilizes standard HTTP response codes to communicate the outcome of an API request. A status code falling within the 2xx range signifies success, while codes in the 4xx range point to errors caused by the input data (e.g., invalid parameters or missing information). Conversely, status codes in the 5xx range signal a server-related error.

| HTTP Status Codes                                    | Response Indication   | Description                                                                                                                                                      |
| ---------------------------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="background-color:green;">**200**</mark> | OK                    | The request has been successfully handled.                                                                                                                       |
| <mark style="background-color:green;">**201**</mark> | Created               | The request has been successfully processed, resulting in the creation of a new resource.                                                                        |
| <mark style="background-color:green;">**202**</mark> | Accepted              | The request has been approved for processing, however, the processing is still ongoing. The request's completion is uncertain until the processing is finalized. |
| <mark style="background-color:red;">**400**</mark>   | Bad Request           | The request lacks essential parameters, is in an improper format, or did not pass another validation test.                                                       |
| <mark style="background-color:red;">**401**</mark>   | Unauthorized          | The authentication token has been provided and is in a valid state.                                                                                              |
| <mark style="background-color:red;">**402**</mark>   | Request Failed        | Financial transaction was declined. Parameters were valid but request failed.                                                                                    |
| <mark style="background-color:red;">**403**</mark>   | Forbidden             | The web server acknowledges the request but declines to authorize it due to permission issues.                                                                   |
| <mark style="background-color:red;">**404**</mark>   | Not Found             | The specified endpoint is not available.                                                                                                                         |
| <mark style="background-color:red;">**405**</mark>   | Method Not Allowed    | The HTTP request sent by your browser is not permitted for the specified resource or URL.                                                                        |
| <mark style="background-color:red;">**429**</mark>   | Too Many Requests     | Indicates the user has sent too many requests in a given amount of time ("rate limiting").                                                                       |
| <mark style="background-color:red;">**500**</mark>   | Internal Server Error | The server has encountered an unforeseen circumstance that has hindered its ability to fulfill the request.                                                      |

#### **Errors Response** <a href="#apiessentials-errorsresponse" id="apiessentials-errorsresponse"></a>

The body of the Global Workforce Payments API error response typically includes the following fields:

| Attribute   | Type   | Description                                                                                                         |
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| Error       | String | Represents the high-level error message.                                                                            |
| Description | String | Provides a detailed description of the error.                                                                       |
| Error Code  | String | Specifies the HTTP error code or any custom error code associated with the error.                                   |
| Sub Code    | String | Optionally provides additional sub-codes for categorizing specific types of errors under the same high-level error. |

**Response** **Examples** **with Sub Code**

```json
{
  "error": "Error Message",
  "description": "Failed calling service",
  "error_code": "Error Code",
  "sub_code": "Sub Code",
  "error_info": { // Example for HTTP error
    "timestamp": "Timestamp",
    "status": "HTTP Status Code",
    "error": "Error Message",
    "path": "Request Path"
  }
}
```

```json
{
  "error": "not_found",
  "description": "Wallet not found",
  "error_code": 404,
  "sub_code": 1000,
  "error_info": {
    "timestamp": "2024-03-04T07:55:43.543Z",
    "status": 404,
    "error": "The specified wallet ID does not exist.",
    "path": "/v1/wallet"
  }
}
```

**Response** **Examples** **without Sub Code**

```json
{
  "error": "Error Message",
  "description": "Failed calling service",
  "error_code": "Error Code"
```

```json
{
  "error_code": 401, 
  "error": "Unauthorized", 
  "description": "Authorization failed. The server could not verify your credentials. Please check your configuration and try again."
}
```

#### Rate Limits <a href="#apiessentials-ratelimits" id="apiessentials-ratelimits"></a>

To ensure a responsive and fair usage environment for all our users, we enforce rate limits on our REST API. Each endpoint has an assigned request limit carefully calibrated to balance frequent access with system integrity and equitable resource distribution.

* **Standard Rate Limit**: Our standard rate limit is **500 requests per minute** per authenticated user. This applies to most endpoints unless otherwise specified.

{% hint style="info" %}
The rate limit is determined by the number of calls made, not the number of actions taken. Therefore, calling the bulk endpoints enables more actions to be performed within the rate limit.
{% endhint %}

* **Extended Limits**: Higher rate limits may be available depending on your subscription tier or upon request for specific use cases that require more frequent access.
* **Headers and Feedback**: Every API response includes HTTP headers that provide your current rate limit status:
  * `X-RateLimit-Limit`: The maximum number of requests permitted within the window.
  * `X-RateLimit-Remaining`: The remaining number of requests within the current rate limit window.
  * `X-Ratelimit-Used`: The total amount of requests you have made during the current rate limit interval.
  * `X-RateLimit-Reset`: When the current rate limit window resets in UTC epoch seconds.
  * `X-Ratelimit-Resource`: The resource against which the request was counted for rate-limiting purposes.
* **Best Practices**: We recommend implementing retry logic with exponential backoff and respecting the `Retry-After` header where applicable. This approach aids in efficiently utilizing rate limits and reduces the likelihood of encountering limits.
* **Exceeding Limits**: Attempts to exceed rate limits will result in a `429 Too Many Requests` response. Continuous overage may lead to temporary or permanent suspension of API access. We urge all users to architect their applications to handle such responses gracefully.
* **Changes and Notifications**: Rate limits are subject to change based on system performance and user demand. All changes will be communicated through our developer channels and API change log.&#x20;


# Payment Status

With Papaya Global REST API, you can gain transparency and efficiency in tracking payment status. Our dedicated endpoints allow you to retrieve real-time payment status information, making it effortless to process transactions, verify payment outcomes, or reconcile accounts.

<figure><img src="https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2FCOe4vTBQ2SeOUQEH827G%2Fimage.png?alt=media&amp;token=05499b5b-51c6-4c35-808d-39fdeafb662c" alt=""><figcaption></figcaption></figure>

**Payment Cycle**

As you initiate a payment, it goes through various statuses, with each step associated with a particular status and following a looped pattern.

| Payment Status          | Description                                                                                                                                                                                                                                                                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| PENDING                 | The payment is currently awaiting execution until it is approved or the execution date is reached.                                                                                                                                                                                                                                               |
| PROCESSING              | Once the transaction is executed, it enters the processing phase, marking an intermediate state before proceeding to any final states.                                                                                                                                                                                                           |
| PROCESSED               | Payment instructions have been forwarded to the partnered bank/service for completion. The transaction is either in progress at the bank or awaiting confirmation of its final status (SUCCESS/FAILURE).                                                                                                                                         |
| COMPLETED (Final State) | The partnered bank successfully completed the transaction, and the amount has been transferred to the customer's account.                                                                                                                                                                                                                        |
| FAILED (Final State)    | The payment could not be completed because of an error or decline. Keep in mind that this issue may arise due to reasons like insufficient funds, incorrect account or beneficiary information, and more. To prevent such occurrences, consider utilizing the Low Balance Alert Webhook and Verification APIs for better transaction management. |
| PARTIAL                 | Split payments (such as Yen > 1M) mark a partial completion of the multiple transactions within the payment.                                                                                                                                                                                                                                     |
| CANCELLED (Final State) | The user or system has canceled or deleted the payment prior to processing. This transition occurs only when the payout is in a PENDING state.                                                                                                                                                                                                   |

**Error Handling**: Should there be any issues retrieving the payment status, our API will return appropriate error codes and messages, enabling you to handle exceptions in your application accordingly.

Please ensure your systems handle all payment statuses for a smooth user experience. Subsequent sections of this documentation provide detailed information on each status type, webhook configuration, and error codes.


# Environments

**Environment URLs**

Below is a table displaying the URLs utilized in our demo and production (live) environments.

**Authentication API**

<table><thead><tr><th width="280.56640625">Environment</th><th>Environment URL</th></tr></thead><tbody><tr><td>Demo</td><td><a href="https://api.cust1.papaya-sandbox.com/token">https://api.cust1.papaya-sandbox.com/token</a></td></tr><tr><td>Production</td><td><a href="https://authentication-service.papayaglobal.com/token">https://authentication-service.papayaglobal.com/token</a></td></tr></tbody></table>

**Payment APIs**

<table><thead><tr><th width="281">Environment</th><th>Environment URL</th></tr></thead><tbody><tr><td>Demo</td><td><a href="https://payments.cust1.papaya-sandbox.com/">https://api.cust1.papaya-sandbox.com</a></td></tr><tr><td>Production</td><td><a href="https://api.papayaglobal.com/">https://api.papayaglobal.com</a></td></tr></tbody></table>


# Authentication API

Papaya Global ensures the secure authentication of requests by employing an API key and Client ID. It is crucial to avoid sharing these credentials in publicly accessible areas like GitHub or client-side code. A bearer token is necessary to authenticate all API requests. All API requests must be made over HTTPS, as requests made over plain HTTP will not be successful. Moreover, any API requests made without proper authentication will also fail. It is important to note that the sandbox and production environments have separate keys and client IDs. Used for authenticating with Papaya Global servers.

### Obtain Access Token <a href="#authenticationapi-obtainaccesstoken" id="authenticationapi-obtainaccesstoken"></a>

To acquire an access token, include your `api_key` and `client_secret` in the HTTP request header (Will be provided to you by the integration support). This token is essential for making calls to any other API endpoints, and the HTTP header must contain Authorization: Bearer \[token]. The access token remains valid for 24 hours and can be utilized multiple times for all other API endpoints until it expires. It is advisable to rely on the expiration time provided (valid\_until) in the response for a precise token expiration time.

<mark style="color:green;">**`POST`**</mark> [/token](https://authentication-service.staging.pay.papayaglobal.work/token)

**Body Parameters Request**

<table><thead><tr><th>Name</th><th>Type</th><th width="285.42578125">Description</th><th width="132.12890625">Required</th></tr></thead><tbody><tr><td>api_key</td><td>string</td><td>This is a unique identifier used to authenticate the client making the request (Will be provided to you by the integration support).</td><td>Yes</td></tr><tr><td>client_secret</td><td>string</td><td>This is a secret key associated with the API key. It acts as a password to provide an additional layer of security (Will be provided to you by the integration support).</td><td>Yes</td></tr><tr><td>token_name</td><td>string</td><td>This field specifies a name for the token being created. If provided, this name will be assigned to the token. If not provided, a new random UUID will be used as the token name</td><td>No</td></tr></tbody></table>

**Body parameters Response**

<table><thead><tr><th>Name</th><th>Type</th><th width="319.75">Description</th></tr></thead><tbody><tr><td>valid_until</td><td>ISO 8601 date-time format</td><td>This field indicates the expiration date and time of the token.</td></tr><tr><td>token</td><td>JWT</td><td>This field contains the JWT itself.</td></tr><tr><td>token_name</td><td>string</td><td>This field specifies the name of the token being created.</td></tr></tbody></table>

**Request Example**

`POST /token`

```json
{
   "api_key": "82725488-22bf-40d1-ace6-9ea6ee42f870",
   "client_secret": "MySecret!!!",
   "token_name": "82725488-22bf"
}
```

**Response**

{% tabs %}
{% tab title="201 - Created" %}

```json
{
   "valid_until": "2024-07-11T07:48Z",
   "token": "eyJ0eXAiOiJKV1QiLCJraWQiOiJBUElLRVkwIiwiYXBpX3Rva2VuX2lkIjoiYjZmMzhhN2QtMDc4MS00OGIyLWFhMTEtODUzMzA5NjEyNWFiIiwiYWxnIjoiUlMyNTYifQ.eyJpYXQiOjE3MjA1OTc3MTEsImV4cCI6MTcyMDY4NDExMSwic3ViIjoiYWNjZXNzIiwidXNlciI6eyJpZCI6IjgyNzI1NDg4LTIyYmYtNDBkMS1hY2U2LTllYTZlZTQyZjg3MCIsImVtYWlsIjoiZXlhbDEubmV0QGdtYWlsLmNvbSIsIm93bmVyIjp7ImlkIjoiMjAxMDAwIiwib3duZXJUeXBlIjoib3JnX2lkIn19fQ.gLmL4am5bro27H_ICzLT2OMxnh7MtyuenND9yR1J_jmZyxcnB_XbN1hTXLsqU4l-73UWLNWB9eMseFLVEVSx0z-XtDtDyPvwWHsicxTwC-PmZrhg1EvQRrRgEzUk5D-wJNqXRnfP5CNS78pPo6ZRHwW7N1t1fpop48gKnPdtyOt5m0w0apOyzgLPOWwsTHMKw8qCe5e5d6IumjKpxxeJUcgpzffEibUmaqGL9PFAS5Yky0ABFe37VFwdgj89muLW5RdaOz3HvYiZYLdtH91SIJYKhWMME38_xWSFb8wxoHZsRH3taBdyBUuU5zE8J7wfYQYsm_iA1BMlNZ9d73R71g"
   "token_name": "82725488-22bf"
}
```

{% endtab %}

{% tab title="401  - Authorization Required" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}


# Wallets Management

A wallet facilitates payments. It can be regarded as an account, allowing the terms wallet and account to be used interchangeably. The wallets belong to you, not to your beneficiaries. The wallet holds balances in the currency configured within the Legal Entity program. For example, if the Legal Entity program is set up to support USD, GBP, or EUR currencies, then a specific wallet can store balances in USD, GBP, or EUR currencies.

{% hint style="info" %}
**The Wallet Management API is responsible for managing wallet information through creating, updating, deleting, approving**, **and retrieving data.**
{% endhint %}


# Open A Wallet

#### Before you begin working with the API, you must first complete two required steps:  <a href="#real-lifescenarios-illustrativeworkflowoverview-1.authentication" id="real-lifescenarios-illustrativeworkflowoverview-1.authentication"></a>

1. Establishing a legal entity (finishing the KYB procedure).
2. Open A Wallet (through the app).

{% embed url="<https://youtu.be/FmlZcC4CzDI>" %}


# Get Wallets List

The API retrieves wallets' details and fetches comprehensive information about all the wallets associated with the organization account.

<mark style="color:blue;">**`GET`**</mark> /payments/wallets

**Body Parameters Request**

<table><thead><tr><th width="117">Name</th><th>Location</th><th>Type</th><th>Format / Values</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>url params</td><td>string</td><td></td><td>The id of the wallet</td></tr><tr><td>active_only</td><td>url params</td><td>boolean</td><td> </td><td>If active_only is set to true, only active wallets will be returned. If active_only is set to false, all existing wallets will be returned.</td></tr><tr><td>currency</td><td>url params</td><td>array</td><td>string:/^[A-Z]{3,3}$/</td><td>list of currency codes to filter by</td></tr><tr><td>tag:*</td><td>url params</td><td>object</td><td> </td><td>a key/values[] set of user tags to filter wallets by</td></tr><tr><td>skip</td><td>url params</td><td>integer</td><td> </td><td>number of items to skip in the result set</td></tr><tr><td>take</td><td>url params</td><td>integer</td><td> </td><td>number of items to return from result set (defaults to 50)</td></tr></tbody></table>

**Body Parameters Response**

| Name                | Type    | Format / Values                   | Description                                                                     |
| ------------------- | ------- | --------------------------------- | ------------------------------------------------------------------------------- |
| items               | array   | object                            |                                                                                 |
| items\[].type       | string  |                                   | Entity type (wallet)                                                            |
| items\[].id         | string  |                                   | Unique id of wallet                                                             |
| items\[].currency   | string  |                                   | 3 letter ISO currency code used by wallet                                       |
| items\[].name       | string  |                                   | User given name of wallet                                                       |
| items\[].owner      | string  |                                   | id of legal entity owning this wallet                                           |
| items\[].funding    | object  |                                   | Funding account information (banking info needed to send money to wallet)       |
| items\[].balance    | integer |                                   | If wallet state is ACTIVE, returns the current available ballance of the wallet |
| items\[].user\_tags | object  |                                   | A k/v part of user tags assigned to the wallet                                  |
| items\[].state      | string  | DISABLED, REQUIRES\_INPUT, ACTIVE | The current state of the wallet                                                 |
| paging              | object  |                                   |                                                                                 |
| paging.take         | integer |                                   | number of items requested to be returned from the result set                    |
| paging.skip         | integer |                                   | Number of items requested to skip from the result set                           |

**Response**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "items": [
      {
         "id": "1b15bd2e-2ccb-453e-a873-33eb1230a225",
         "currency": "USD",
         "name": "Demo USD Wallet",
         "type": "wallet",
         "owner": "entity://business/customer/demo:standalone:1708959835/legal/7ed4e296-3b8f-43f1-9e33-9de88cadc35a",
         "funding": {
            "name": "RONKIֹ LTD CMA - EUR",
            "country": "GB",
            "account_number": "UKNWBK60161529100039",
            "bic": "CHASGB2L",
            "iban": "UKNWBK60161529100039"
         },
         "balance": 120000,
         "user_tags": {
            "department": "sales"
         },
         "state": "ACTIVE"
      },
      {
         "id": "1fd071bc-df1e-4947-a162-d50c39629204",
         "currency": "GBP",
         "name": "Demo GBP Wallet",
         "type": "wallet",
         "owner": "entity://business/customer/demo:standalone:1708959835/legal/7ed4e296-3b8f-43f1-9e33-9de88cadc35a",
         "funding": {
            "country": "GB",
            "account_number": "GBAB1236bb7f",
            "iban": "GBAB1236bb7f",
            "coffee": "ES",
            "name": "RAUL LTD CMA - EUR",
            "bic": "CHASGB2L"
         },
         "balance": 120000,
         "user_tags": {},
         "state": "ACTIVE"
      },
      {
         "id": "bcc045d6-ea6f-4830-939e-a0e8b5e17f08",
         "currency": "EUR",
         "name": "Demo EUR Wallet",
         "type": "wallet",
         "owner": "entity://business/customer/demo:standalone:1708959835/legal/7ed4e296-3b8f-43f1-9e33-9de88cadc35a",
         "funding": {
            "name": "POIKN LTD CMA - EUR",
            "country": "GB",
            "account_number": "UKNWBK601614291000019",
            "bic": "CHASGB2L",
            "iban": "UKNWBK601614291000019"
         },
         "balance": 120000,
         "user_tags": {},
         "state": "ACTIVE"
      }
   ],
   "paging": {
      "skip": 0,
      "take": 50
   }
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: \"/^[A-Z]{3,3}$/\" at #/filter/currency/0 failed against #/properties/filter/properties/currency/items with \"Did not match pattern: ^[A-Z]{3,3}$\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Get Wallet Details

The API is utilized to retrieve wallet details and fetches comprehensive information by specifying the wallet ID.

<mark style="color:blue;">**`GET`**</mark> /payments/wallets/?id=\<wallet\_id>

**Body Parameters Request**

| Name | location | Type   | Description              | Required |
| ---- | -------- | ------ | ------------------------ | -------- |
| id   | url path | string | Wallet ID for retrieval. | Yes      |

**Body Parameters Response**

| id         | string             |                                   | the id of the wallet               |
| ---------- | ------------------ | --------------------------------- | ---------------------------------- |
| type       | string             |                                   | the type of entity (wallet)        |
| balance    | number             |                                   | The available amount in the wallet |
| funding    | Map(String,Object) |                                   | Account funding details            |
| owner      | string             |                                   | Legal entity id owning this wallet |
| state      | string             | DISABLED, REQUIRES\_INPUT, ACTIVE | current state of wallet            |
| user\_tags | object             |                                   |                                    |

**Request Example**

```
GET /payments/wallets/?id=f6b2776d-53f4-404e-a690-c3766a91d43a
```

**Response**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "id": "f6b2776d-53f4-404e-a690-c3766a91d43a",
   "currency": "USD",
   "name": "Demo USD Wallet",
   "type": "wallet",
   "owner": "entity://business/customer/demo:standalone:1709197789/legal/0d65c5cd-4896-45b9-b268-c431b82605af",
   "funding": {
      "name": "RONKIֹ LTD CMA - EUR",
      "country": "GB",
      "account_number": "UKNWBK60161529100024",
      "bic": "CHASGB2L",
      "iban": "UKNWBK60161529100024"
   },
   "balance": 120000,
   "user_tags": {
      "department": "sales"
   },
   "state": "ACTIVE"
}
```

{% endtab %}

{% tab title="405 - Method Not Allowed" %}

```json
{
   "error": "Method Not Allowed",
   "description": "Failed calling service",
   "error_code": 405,
   "sub_code": 1002,
   "error_info": {
      "timestamp": "2024-03-04T07:55:43.543Z",
      "status": 405,
      "error": "Method Not Allowed",
      "path": "/v1/"
   }
}
```

{% endtab %}
{% endtabs %}


# Get Wallet Statements

The Wallet Statement API is utilized to retrieve the pertinent transactions made in the Wallet. The API fetches transactions within the specified date range and provides the Wallet balance.

<mark style="color:blue;">**`GET`**</mark> /payments/wallets/{id}/statement

**Body Parameters Request**

| Name  | location      | Type    | Format / Values | Description                             | Required |
| ----- | ------------- | ------- | --------------- | --------------------------------------- | -------- |
| id    | url path      | string  |                 | Wallet ID for statements for retrieval. | Yes      |
| start | url parameter | string  | date-time       |                                         |          |
| end   | url parameter | string  | date-time       |                                         |          |
| skip  | url parameter | integer |                 | number of items to skip in result set   |          |
| take  | url parameter | integer |                 | max items to return in result set       |          |

**Body Parameters Response**

| Path                                                | Type    | Format / Values | Description                                                                          |
| --------------------------------------------------- | ------- | --------------- | ------------------------------------------------------------------------------------ |
| type                                                | string  | wallet          |                                                                                      |
| id                                                  | string  |                 |                                                                                      |
| start\_date                                         | string  | date-time       |                                                                                      |
| end\_date                                           | string  | date-time       |                                                                                      |
| items                                               | array   | object          |                                                                                      |
| items\[]                                            | object  |                 |                                                                                      |
| items\[].type                                       | string  |                 |                                                                                      |
| items\[].id                                         | string  |                 |                                                                                      |
| items\[].description                                | string  |                 |                                                                                      |
| items\[].execution\_id                              | string  |                 | the payment execution id                                                             |
| items\[].date                                       | string  | date-time       |                                                                                      |
| items\[].action                                     | string  | CREDIT, DEBIT   |                                                                                      |
| items\[].debit                                      | object  |                 | Amount debited from source                                                           |
| items\[].debit.amount                               | number  |                 |                                                                                      |
| items\[].debit.currency                             | string  |                 |                                                                                      |
| items\[].credit                                     | object  |                 | amount credited to target                                                            |
| items\[].credit.amount                              | number  |                 |                                                                                      |
| items\[].credit.currency                            | string  |                 |                                                                                      |
| items\[].fees                                       | number  |                 | total fees included                                                                  |
| items\[].rate                                       | number  |                 | fx rate used for conversion                                                          |
| items\[].balance                                    | number  |                 | walllet balance after transaction was completed                                      |
| items\[].counterpart                                | object  |                 | depending on the #action property contains info on the other party (sender/receiver) |
| items\[].counterpart.id                             | string  |                 |                                                                                      |
| items\[].counterpart.currency                       | string  |                 |                                                                                      |
| items\[].counterpart.bank\_details                  | object  |                 |                                                                                      |
| items\[].counterpart.bank\_details.account\_country | string  |                 |                                                                                      |
| items\[].counterpart.bank\_details.account\_name    | string  |                 |                                                                                      |
| items\[].counterpart.entity                         | object  |                 |                                                                                      |
| items\[].counterpart.active                         | boolean |                 |                                                                                      |
| items\[].counterpart.name                           | string  |                 |                                                                                      |
| items\[].counterpart.user\_tags                     | object  |                 |                                                                                      |
| items\[].user\_tags                                 | object  |                 |                                                                                      |
| items\[].tags                                       | object  |                 |                                                                                      |
| paging                                              | object  |                 |                                                                                      |
| paging.skip                                         | integer |                 | number of items to skip in result set                                                |
| paging.take                                         | integer |                 | max items to return in result set                                                    |

**Request Example**

```
GET /payments/wallets/f6b2776d-53f4-404e-a690-c3766a91d43a/statement?start=2023-02-28&take=1
```

**Response**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "type": "wallet",
   "id": "f6b2776d-53f4-404e-a690-c3766a91d43a",
   "start_date": "2023-02-28T00:00:00.000Z",
   "end_date": "2024-02-29T09:33:21.689Z",
   "items": [
      {
         "type": "payment",
         "id": "edde16fb-c485-474b-a467-fe2190d7372a",
         "description": "INCOMING MONEY XFR",
         "date": "2024-02-29T09:10:06.066Z",
         "action": "CREDIT",
         "debit": {
            "amount": 120000,
            "currency": "USD"
         },
         "credit": {
            "amount": 120000,
            "currency": "USD"
         },
         "fees": 0,
         "balance": 120000,
         "counterpart": {
            "currency": "USD",
            "id": "UKNWBK60161529100024",
            "type": "funding_method",
            "owner": "entity://business/customer/demo:standalone:1709197789/legal/0d65c5cd-4896-45b9-b268-c431b82605af"
         },
         "user_tags": {},
         "tags": {
            "external_swift": "CHASGB2L",
            "external_bank_ref": "3052935"
         }
      }
   ],
   "paging": {
      "skip": 0,
      "take": 1
   }
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
   "error": "bad_request",
   "description": "Validation errors: {\"org_id\":\"202000\",\"start_date\":\"2024-02-04T08:41:18.080Z... at root failed with \"Missing property id\"",
   "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Groups Management

### Group <a href="#group" id="group"></a>

Allows the organization to effectively consolidate and oversee payment requests based on various criteria such as time, location, business unit, and more.

{% hint style="info" %}
**The Payment Group Management API is responsible for managing payment group information through creating, updating, deleting, approving, and retrieving data.**
{% endhint %}


# Create A Payment Group

The API is utilized to create a payment group within the account. A group is generated with a given wallet. Once created, you can oversee the group’s payment requests based on various criteria such as time, location, business unit, etc.

<mark style="color:green;">`POST`</mark> /payments/groups

**Body Parameters Request**

| Name        | Type   | Description                                | Required |
| ----------- | ------ | ------------------------------------------ | -------- |
| description | string | A short description of the group           |          |
| wallet      | string | The Wallet ID linked to this group.        | Yes      |
| name        | string | A label to to identify the group.          | Yes      |
| user\_tags  | object | A set of k/v pairs to assign to the group. |          |

**Body parameters Response**

| Name        | Type    | Description                                             |
| ----------- | ------- | ------------------------------------------------------- |
| description | string  | Extended description of group                           |
| id          | string  | Unique id of group                                      |
| locked      | boolean | When locked, no new actions can be made                 |
| name        | string  | Visual name of group                                    |
| type        | string  | entity type (group)                                     |
| user\_tags  | object  | A set of k/v pairs of user tags to assign to this group |
| wallet      | string  | id of wallet this group is associated with              |

**Request Example**

```
POST /payments/groups
{
    "description": "Demo Group",
    "wallet": "f6b2776d-53f4-404e-a690-c3766a91d43a",
    "name": "February USD cycle",
    "user_tags":{
      "cycle":"2024-02"
    }
  }
```

**Response**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
  "type": "group",
  "id": "b48c3f38-9278-41a3-b101-444f20fce982",
  "description": "Demo Group",
  "wallet": "f6b2776d-53f4-404e-a690-c3766a91d43a",
  "name": "February USD cycle",
  "user_tags": {
    "cycle":"2024-02"
  }
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"description\":\"EmanIntEUR\",\"org_id\":\"202000\",\"name\":\"Feb... at root failed with \"Missing property wallet\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Update A Payment Group

The API is utilized to modify the Payment Group information.

<mark style="color:orange;">**`PUT`**</mark> /payments/groups/{id}

**Body Parameters Request**

| Name        | Location | Type   | Description                                | Required |
| ----------- | -------- | ------ | ------------------------------------------ | -------- |
| id          | url path | string | Existing Group ID.                         | Yes      |
| name        | body     | string | An updated name to give the group.         |          |
| description | body     | string | An updated description to give the group.  |          |
| user\_tags  | body     | object | A set of k/v pairs to assign to the group. |          |

**Body parameters Response**

| Name        | Type    | Description                                             |
| ----------- | ------- | ------------------------------------------------------- |
| description | string  | Extended description of group                           |
| id          | string  | Unique id of group                                      |
| locked      | boolean | When locked, no new actions can be made                 |
| name        | string  | Visual name of group                                    |
| type        | string  | entity type (group)                                     |
| user\_tags  | object  | A set of k/v pairs of user tags to assign to this group |
| wallet      | string  | id of wallet this group is associated with              |

**Request Example**

```json
PUT /payments/groups/b48c3f38-9278-41a3-b101-444f20fce982
{  
  "description": "An updated description",  
  "user_tags": {
    "cycle":"2024-02",
    "approved_by":"John Doe"
  }
}
```

**Response**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
  "type": "group",
  "id": "b48c3f38-9278-41a3-b101-444f20fce982",
  "description": "An updated description",
  "wallet": "f6b2776d-53f4-404e-a690-c3766a91d43a",
  "name": "February USD cycle",
  "user_tags": {
    "cycle": "2024-02",
    "approved_by": "John Doe"
  }
}
```

{% endtab %}

{% tab title="404 - - Not Found" %}

```json
{
   "error": "not_found",
   "description": "Could not find entity with id 98453dfb-fac7",
   "error_code": 404,
   "sub_code": 1000,
   "error_info": {
      "error": "not_found",
      "description": "Could not find entity with id 98453dfb-fac7",
      "error_code": 404,
      "sub_code": 1000
   }
}
```

{% endtab %}
{% endtabs %}


# Get Payment Group Details

The API is utilized to retrieve the payment group’s details and fetches comprehensive information by specifying the group ID.

<mark style="color:blue;">**`GET`**</mark> /payments/groups/{id}

**Body Parameters Request**

| Name | Location | Type   | Description                 | Required |
| ---- | -------- | ------ | --------------------------- | -------- |
| id   | url path | string | Goup ID for info retrieval. | Yes      |

**Body parameters Response**

| Name                            | Type    | Description                                                                            |
| ------------------------------- | ------- | -------------------------------------------------------------------------------------- |
| type                            | string  | the entity type (group)                                                                |
| id                              | string  | Unique id of group                                                                     |
| description                     | string  | Extended description of group                                                          |
| name                            | string  | Visual name of group                                                                   |
| locked                          | boolean | When locked, no new payments can be added                                              |
| user\_tags                      | object  | A set of k/v pairs of user tags assigned to this group                                 |
| wallet                          | object  | Holds info on the wallet this group is associated with                                 |
| wallet.type                     | string  | Entity type (wallet)                                                                   |
| wallet.id                       | string  | The unique id of this wallet                                                           |
| wallet.currency                 | string  | The 3 letter ISO code of the currency this wallet holds                                |
| wallet.name                     | string  | Visual name of this wallet                                                             |
| wallet.balance                  | integer | When the wallet is active, returns the available balance                               |
| wallet.owner                    | string  | The legal entity id ownling this wallet                                                |
| info                            | object  | Extended information abount payment in this group                                      |
| info.funding                    | object  | Info on the next funding                                                               |
| info.funding.next               | string  | The next funding date                                                                  |
| info.funding.missing\_funds     | number  | The amount of funds missing for the next payout date                                   |
| info.payments                   | object  | Extended information refarding payments in the group                                   |
| info.payments.total             | integer | Total number of payments in this group                                                 |
| info.payments.pending           | integer | Number of payments pending to be executed                                              |
| info.payments.pending\_approval | integer | Number of payments that have not been approved yet                                     |
| info.payments.issues            | integer | Number of payments with issues that require user attention                             |
| info.payments.completed         | integer | Number of payments that have been completed                                            |
| info.payments.failed            | integer | Number of payments that have failed                                                    |
| info.payments.routing           | integer | Number of payments that have started their execution and are in the bank routing stage |
| info.payments.next              | string  | The next expected payout date                                                          |
| info.payments.amount            | object  | Information about the total amount to be sent from this group                          |
| info.payments.amount.amount     | number  | The total amount of charges this group holds                                           |
| info.payments.amount.currency   | string  | The currency these payments are charged in                                             |

**Request Example**

```
GET /payments/groups/490f23cf-c6f3-4f83-9aed-8dff619735ba
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "type": "group",
   "id": "490f23cf-c6f3-4f83-9aed-8dff619735ba",
   "description": "Demo Group",
   "name": "March USD cycle",
   "locked": false,
   "user_tags": {},
   "wallet": {
      "type": "wallet",
      "id": "fb306785-d3bb-44f0-88ef-b0dc07d294a0",
      "currency": "USD",
      "name": "Demo USD Wallet",
      "balance": 120000,
      "owner": "entity://business/customer/demo:standalone:1709465100/legal/a01b75a8-8069-4691-a299-11a9477f8899"
   },
   "info": {
      "funding": {
         "next": "2024-03-02",
         "missing_funds": 86555.24172
      },
      "payments": {
         "total": 20,
         "pending": 15,
         "pending_approval": 0,
         "issues": 15,
         "completed": 0,
         "failed": 5,
         "routing": 0,
         "next": "2024-03-02",
         "amount": {
            "amount": 118652.06667,
            "currency": "USD"
         }
      }
   }
}
```

{% endtab %}

{% tab title="404 - Not Found" %}

```json
{
  "error": "group_not_found",
  "description": "The requested group could not be found",
  "error_code": 404,
  "sub_code": 100
}
```

{% endtab %}
{% endtabs %}


# Get Payment Groups List

The API is utilized to retrieve Payment Groups' details and fetch comprehensive information about all the groups associated with the organization account, with optional filters. Results are paginated, with a default list limit of 50 results.

<mark style="color:blue;">**`GET`**</mark> /payments/groups

**Body Parameters Request**

| Name        | Location       | Type    | Description                                                      | Example                                          |
| ----------- | -------------- | ------- | ---------------------------------------------------------------- | ------------------------------------------------ |
| id          | Url parameters | array   | a list of group id's to filter by                                | ?id=aaa\&id=bbb                                  |
| description | Url parameters | string  | description of group to filter by (*description*)                | ?description=Cycle                               |
| name        | Url parameters | string  | name of group to filter by (*name*)                              | ?name=test                                       |
| locked      | Url parameters | array   |                                                                  | ?locked=true\&locked=false                       |
| wallet      | Url parameters | array   | a list of wallet id's to filter by                               | ?wallet=wallet\_1\&wallet=wallet\_2              |
| tag         | Url parameters | array   | a key/values\[] dictionary to filter results based on their tags | ?tag:department=sales\&tag:department=operations |
| skip        | Url parameters | integer | the number of items to skip in the result set                    |                                                  |
| take        | Url parameters | integer | the maximum number of items to return in the result set          |                                                  |

**Body parameters Response**

| Name                                     | Type    | Format / Values | Description                                                                            |
| ---------------------------------------- | ------- | --------------- | -------------------------------------------------------------------------------------- |
| items                                    | array   | object          |                                                                                        |
| items\[]                                 | object  |                 |                                                                                        |
| items\[].type                            | string  |                 | the entity type (group)                                                                |
| items\[].id                              | string  |                 | Unique id of group                                                                     |
| items\[].description                     | string  |                 | Extended description of group                                                          |
| items\[].name                            | string  |                 | Visual name of group                                                                   |
| items\[].locked                          | boolean |                 | When locked, no new payments can be added                                              |
| items\[].user\_tags                      | object  |                 | A set of k/v pairs of user tags assigned to this group                                 |
| items\[].wallet                          | object  |                 | Holds info on the wallet this group is associated with                                 |
| items\[].wallet.type                     | string  |                 | Entity type (wallet)                                                                   |
| items\[].wallet.id                       | string  |                 | The unique id of this wallet                                                           |
| items\[].wallet.currency                 | string  |                 | The 3 letter ISO code of the currency this wallet holds                                |
| items\[].wallet.name                     | string  |                 | Visual name of this wallet                                                             |
| items\[].wallet.balance                  | integer |                 | When the wallet is active, returns the available balance                               |
| items\[].wallet.owner                    | string  |                 | The legal entity id owning this wallet                                                 |
| items\[].info                            | object  |                 | Extended information amount payment in this group                                      |
| items\[].info.funding                    | object  |                 | Info on the next funding                                                               |
| items\[].info.funding.next               | string  | date            | The next funding date                                                                  |
| items\[].info.funding.missing\_funds     | number  |                 | The amount of funds missing for the next payout date                                   |
| items\[].info.payments                   | object  |                 | Extended information regarding payments in the group                                   |
| items\[].info.payments.total             | integer |                 | Total number of payments in this group                                                 |
| items\[].info.payments.pending           | integer |                 | Number of payments pending to be executed                                              |
| items\[].info.payments.pending\_approval | integer |                 | Number of payments that have not been approved yet                                     |
| items\[].info.payments.issues            | integer |                 | Number of payments with issues that require user attention                             |
| items\[].info.payments.completed         | integer |                 | Number of payments that have been completed                                            |
| items\[].info.payments.failed            | integer |                 | Number of payments that have failed                                                    |
| items\[].info.payments.routing           | integer |                 | Number of payments that have started their execution and are in the bank routing stage |
| items\[].info.payments.next              | string  | date            | The next expected payout date                                                          |
| items\[].info.payments.amount            | object  |                 | Information about the total amount to be sent from this group                          |
| items\[].info.payments.amount.amount     | number  |                 | The total amount of charges this group holds                                           |
| items\[].info.payments.amount.currency   | string  |                 | The currency these payments are charged in                                             |
| paging                                   | object  |                 |                                                                                        |
| paging.skip                              | integer |                 | Number of items to skip in the result set                                              |
| paging.take                              | integer |                 | Number of items to return from the result set                                          |

**Request Example**

```json
GET /payments/groups?take=2
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "items": [
      {
         "type": "group",
         "id": "b9eabf6f-2292-4f84-ba65-eb4507cf18db",
         "description": "Demo Group",
         "name": "March EUR cycle",
         "locked": false,
         "user_tags": {},
         "wallet": {
            "type": "wallet",
            "id": "f5a6c2d7-8c59-415e-8684-3c4a27b42cba",
            "currency": "EUR",
            "name": "Demo EUR Wallet",
            "balance": 120000,
            "owner": "entity://business/customer/demo:standalone:1709465100/legal/a01b75a8-8069-4691-a299-11a9477f8899"
         },
         "info": {
            "funding": {
               "next": "2024-03-02",
               "missing_funds": 110786.74181
            },
            "payments": {
               "total": 20,
               "pending": 20,
               "pending_approval": 0,
               "issues": 20,
               "completed": 0,
               "failed": 0,
               "routing": 0,
               "next": "2024-03-02",
               "amount": {
                  "amount": 110786.74181,
                  "currency": "EUR"
               }
            }
         }
      },
      {
         "type": "group",
         "id": "9ae49428-89c7-4893-9d41-4ccdd9b9b229",
         "description": "Demo Group",
         "name": "March GBP cycle",
         "locked": false,
         "user_tags": {},
         "wallet": {
            "type": "wallet",
            "id": "a8aa4b6a-fc6c-4de5-b99e-ae155d9a154c",
            "currency": "GBP",
            "name": "Demo GBP Wallet",
            "balance": 120000,
            "owner": "entity://business/customer/demo:standalone:1709465100/legal/a01b75a8-8069-4691-a299-11a9477f8899"
         },
         "info": {
            "funding": {
               "next": "2024-03-02",
               "missing_funds": 93529.20039
            },
            "payments": {
               "total": 20,
               "pending": 20,
               "pending_approval": 0,
               "issues": 20,
               "completed": 0,
               "failed": 0,
               "routing": 0,
               "next": "2024-03-02",
               "amount": {
                  "amount": 93529.20039,
                  "currency": "GBP"
               }
            }
         }
      }
   ],
   "paging": {
      "skip": 0,
      "take": 2
   }
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"filters\":{\"id\":[\"cf54388a-bf7b-4d0b-aa1b-7a33dfbc26df\"]... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Lock Payment Group

The API is utilized to lock a group and block any additional payments from being included.

<mark style="color:yellow;">**`PATCH`**</mark> /payments/groups/{id}/lock

**Body parameters Request**

| Name | Location | Type   | Description | Required |
| ---- | -------- | ------ | ----------- | -------- |
| id   | url path | string | Group ID    | Yes      |

**Body Parameters Response**

| Name        | Title       | Type    | Description                                               |
| ----------- | ----------- | ------- | --------------------------------------------------------- |
| description | description | string  | Extended description of group                             |
| id          | id          | string  | Unique id of group                                        |
| locked      |             | boolean | When locked, no new actions can be made                   |
| name        | name        | string  | Visual name of group                                      |
| type        |             | string  | entity type (group)                                       |
| user\_tags  |             | object  | A set of K/v pairs of tags set for the group              |
| wallet      | id          | string  | The id of the owning wallet this group is associated with |

**Request Example**

```json
PATCH /payments/groups/b48c3f38-9 278-41a3-b101-444f20fce982/lock
```

**Response Examples**

{% tabs %}
{% tab %}

```json
{
   "id": "b48c3f38-9 278-41a3-b101-444f20fce982",
   "type": "group",
   "locked": true,
   "user_tags": {
      "approved_by": "John Doe",
      "cycle": "2024-02"
   },
   "wallet": "f6b2776d-53f4-404e-a690-c3766a91d43a",
   "name": "February USD cycle",
   "description": "An updated description"
}
```

{% endtab %}

{% tab title="404 - Not foun" %}

```json
{
   "error": "Not Found",
   "description": "No message available",
   "error_code": 404,
   "error_info": {
      "timestamp": "2024-03-04T14:10:04.116Z",
      "status": 404,
      "error": "Not Found",
      "message": "No message available",
      "path": "/groups/"
   }
}
```

{% endtab %}
{% endtabs %}


# UnLock Payment Group

The API unlocks a lock group and allows for additional payments to be processed.

<mark style="color:red;">**`DELETE`**</mark> /payments/groups/{id}/lock

**Body parameters Request**

| id | url path | string | Group ID | Yes |
| -- | -------- | ------ | -------- | --- |

**Body Parameters Response**

| description | description | string  | Extended description of group                             |
| ----------- | ----------- | ------- | --------------------------------------------------------- |
| id          | id          | string  | Unique id of group                                        |
| locked      |             | boolean | When locked, no new actions can be made                   |
| name        | name        | string  | Visual name of group                                      |
| type        |             | string  | entity type (group)                                       |
| user\_tags  |             | object  | A set of K/v pairs of tags set for the group              |
| wallet      | id          | string  | The id of the owning wallet this group is associated with |

**Request Example**

```json
DELETE /payments/groups/b48c3f38-9278-41a3-b101-444f20fce982/lock
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "id": "b48c3f38-9 278-41a3-b101-444f20fce982",
   "type": "group",
   "locked": false,
   "user_tags": {
      "approved_by": "John Doe",
      "cycle": "2024-02"
   },
   "wallet": "f6b2776d-53f4-404e-a690-c3766a91d43a",
   "name": "February USD cycle",
   "description": "An updated description"
}
```

{% endtab %}

{% tab title="404 - Not foun" %}

```json
{
  "error": "Not Found",
  "description": "No message available",
  "error_code": 404,
  "error_info": {
    "timestamp": "2024-03-04T14:18:15.749Z",
    "status": 404,
    "error": "Not Found",
    "message": "No message available",
    "path": "/groups/"
  }
}
```

{% endtab %}
{% endtabs %}


# Delete Payment Group

The API is utilized to remove a payment group that is already saved on the platform.

{% hint style="info" %}
A group cannot be removed if it contains already executed payments.
{% endhint %}

<mark style="color:red;">**`DELETE`**</mark> /payments/groups/{id}?clear=true

**Body Parameters Request**

| Name  | Location       | Type    | Description                                                                                                                                 | Required |
| ----- | -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| id    | Url path       | string  | Group ID to be deleted.                                                                                                                     | Yes      |
| clear | url parameters | boolean | A group can only be deleted if empty, if it has non executed payments setting this to true will remove all pending payments and then delete |          |

**Body Parameters Response**

| Name             | Type    | Format / Values | Description                |
| ---------------- | ------- | --------------- | -------------------------- |
| group            | object  |                 | The group that was deleted |
| group.id         | string  |                 |                            |
| group.result     | boolean |                 |                            |
| payments         | array   | object          | List of payments removed   |
| payments\[]      | object  |                 |                            |
| payments\[].type | string  |                 |                            |
| payments\[].id   | string  |                 |                            |

**Request Example**

```json
DELETE /payments/groups/490f23cf-c6f3-4f83-9aed-8dff619735ba?clear=true
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "group": {
      "id": "490f23cf-c6f3-4f83-9aed-8dff619735ba",
      "result": true
   },
   "payments": [
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::-0vYeZkmSgSKX9dXClw-jQ"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::aBueWQPmT8eW1YPU2o8kIA"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::j_VJN0FJSaulsbhsVu3h2Q"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::srjoRbmcTc6ugHBzj-htBg"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::XUgmQZcZROm71poyAIs6QQ"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::zSGY89j3Rsebf9WC8PdNLQ"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::7S1DQ9bRQ0aRl67QU7iFgQ"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::fC_aAQ1zSUaYMbKnpl77zw"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::UVa7xjklRnurlJym9eNjIg"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::_k2jfAKrR4KVxqQ9S99ONQ"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::-8jfveMJQ92hfY3FpVj6dQ"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::cv3FLOYVS5yau6OY2gODlg"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::DQNbilghS-m2UNiaNmkvNw"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::jkIiWe9zTDCqIkaSB3r1gA"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::jst0R9i7SgKIZS_WSlEaAA"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::KCmRAYlJRU-8BQIq9TEBDA"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::OwqH_kgzQyGuvdWmyh0ZQg"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::RSmsds1rRYiJQR6cPFosbA"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::YK6Y7hbESqaOtoh2ookXFA"
      },
      {
         "type": "payment",
         "id": "demo:standalone:1709465100::yP3P2DelSjKFUcaTowH6pQ"
      }
   ]
}
```

{% endtab %}

{% tab title="404 - Not foun" %}

```json
{
  "error": "Not Found",
  "description": "No message available",
  "error_code": 404,
  "error_info": {
    "timestamp": "2024-03-04T14:18:15.749Z",
    "status": 404,
    "error": "Not Found",
    "message": "No message available",
    "path": "/groups/"
  }
}
```

{% endtab %}
{% endtabs %}


# Beneficiaries Management

### Beneficiaries <a href="#beneficiaries" id="beneficiaries"></a>

Before making a payment, it is necessary to create a beneficiary resource. The beneficiary refers to the person or organization receiving the payment, and their bank details and preferred payment method are recorded. Upon creation, a beneficiary ID is generated, which can then be used to initiate a payment through a payment resource.

{% hint style="info" %}
**The Beneficiary Management API is responsible for managing beneficiary information through creating, updating, deleting, and retrieving data.**
{% endhint %}


# Get Schema Information

The API schema outlines each scenario's necessary fields and validation rules. A payment scenario includes the beneficiary's entity type and country, bank country code, and the account currency.

<mark style="color:blue;">**`GET`**</mark> /payments/beneficiaries/schema/{entity\_type}/{country}/{currency}?entity\_country={entity\_country}

**Body Parameters Request**

| Name            | Type   | Format / Values       | Description                                                  | Required |
| --------------- | ------ | --------------------- | ------------------------------------------------------------ | -------- |
|                 | object |                       |                                                              | Yes      |
| currency        | string | /^\[A-Z]{3,3}$/       | Account currency (3-letter ISO 4217 currency code).          | Yes      |
| country         | string | /^\[A-Z]{2,2}$/       | Bank country code (2-letter ISO 3166-2 country code).        | Yes      |
| entity\_country | string | /^\[A-Z]{2,2}$/       | Beneficiary country code (2-letter ISO 3166-2 country code). |          |
| entity\_type    | string | INDIVIDUAL / BUSINESS | The beneficiary's type.                                      |          |

**Body Parameters Response**

| Name         | Type   | Format / Values       | Description                                                  |
| ------------ | ------ | --------------------- | ------------------------------------------------------------ |
| currency     | string |                       | The 3 letter ISO coude this schema relates to                |
| country      | string |                       | The 2 letter ISO account country code this schema relates to |
| entity\_type | string | INDIVIDUAL / BUSINESS | The type of beneficiary this schema relates to               |
| schema       | object |                       | The JSONSchema definition                                    |

**Request Example**

```json
Get /payments/beneficiaries/schema/INDIVIDUAL/US/USD
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "currency": "USD",
   "country": "US",
   "entity_type": "INDIVIDUAL",
   "schema": {
      "schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
         "entity": {
            "$ref": "#/definitions/entity"
         },
         "bank_details": {
            "$ref": "#/definitions/bank_details"
         }
      },
      "definitions": {
         "bank_details": {
            "type": "object",
            "properties": {
               "account_country": {
                  "$target": [
                     "bank.bank_details.account_country",
                     "legal.attributes.BankCountry"
                  ],
                  "anyOf": [
                     {
                        "enum": [
                           "US"
                        ],
                        "title": "United States"
                     }
                  ],
                  "default": "US",
                  "pattern": "^[A-Z]{2}$",
                  "title": "Account Country",
                  "type": "string"
               },
               "account_name": {
                  "$target": [
                     "bank.bank_details.name",
                     "legal.attributes.BankAccountName",
                     "legal.attributes.FullName"
                  ],
                  "$ui": {
                     "errorMessage": "Account name has to be from 1 to 70 letters",
                     "placeholder": "Enter the full name associated with the account"
                  },
                  "max_length": 70,
                  "minLength": 1,
                  "pattern": "^.{1,70}$",
                  "title": "Account Name",
                  "type": "string"
               },
               "account_number": {
                  "$target": [
                     "bank.bank_details.local.account_number",
                     "legal.attributes.BankAccountNumber"
                  ],
                  "$ui": {
                     "errorMessage": "Account number has to be 1 or up to 26 digits or chars",
                     "placeholder": "Enter a valid account number"
                  },
                  "pattern": "^[0-9A-Za-z]{1,26}$",
                  "title": "Account Number",
                  "type": "string"
               },
               "bank_code": {
                  "$target": [
                     "bank.bank_details.local.bank_code",
                     "legal.attributes.BankCode"
                  ],
                  "$ui": {
                     "errorMessage": "Bank\\ABA code has to be 9 digits only",
                     "placeholder": "Enter Bank\\ABA code"
                  },
                  "maxLength": 9,
                  "minLength": 1,
                  "pattern": "^[0-9]{9}$",
                  "title": "Bank\\ABA code",
                  "type": "string"
               },
               "bank_identifier_code": {
                  "$target": [
                     "bank.bank_details.bic"
                  ],
                  "$ui": {
                     "errorMessage": "Enter according to the format AAAAUSBBYYY (A is chars only, US, B is chars or digits, Y is chars or digits(Optionally))",
                     "placeholder": "Enter a valid SWIFT\\BIC code"
                  },
                  "pattern": "^[A-Z]{4}US[A-Z0-9]{2}([A-Z0-9]{3})?$",
                  "title": "SWIFT\\BIC Code",
                  "type": "string"
               },
               "bank_name": {
                  "$target": [
                     "bank.bank_details.local.bank_name",
                     "legal.attributes.BankName"
                  ],
                  "$ui": {
                     "errorMessage": "Bank name has to be from 1 to 70 letters",
                     "placeholder": "Enter a valid bank name"
                  },
                  "pattern": "^.{1,70}$",
                  "title": "Bank name",
                  "type": "string"
               }
            },
            "required": [
               "bank_name",
               "account_country",
               "account_number",
               "account_name",
               "bank_identifier_code"
            ]
         },
         "entity": {
            "type": "object",
            "properties": {
               "address_city": {
                  "$target": [
                     "bank.bank_details.address.city",
                     "legal.attributes.AddressCity"
                  ],
                  "$ui": {
                     "errorMessage": "City name has to be from 1 to 70 letters",
                     "placeholder": "Enter City name"
                  },
                  "pattern": "^.{1,70}$",
                  "title": "City",
                  "type": "string"
               },
               "address_country": {
                  "$target": [
                     "bank.bank_details.address.country",
                     "legal.attributes.AddressCountry",
                     "legal.attributes.CountryOfResidence"
                  ],
                  "$ui": {
                     "errorMessage": "Country has to be selected",
                     "hide": true
                  },
                  "anyOf": [
                     {
                        "enum": [
                           "US"
                        ],
                        "title": "United States"
                     }
                  ],
                  "default": "US",
                  "pattern": "^[A-Z]{2}$",
                  "title": "Address Country",
                  "type": "string"
               },
               "address_country_subdivision": {
                  "$target": [
                     "bank.bank_details.address.country_subdivision",
                     "legal.attributes.AddressState"
                  ],
                  "anyOf": [
                     {
                        "enum": [
                           "AL"
                        ],
                        "title": "Alabama"
                     },
                     {
                        "enum": [
                           "AK"
                        ],
                        "title": "Alaska"
                     },
                     {
                        "enum": [
                           "AS"
                        ],
                        "title": "American Samoa"
                     },
                     {
                        "enum": [
                           "AZ"
                        ],
                        "title": "Arizona"
                     },
                     {
                        "enum": [
                           "AR"
                        ],
                        "title": "Arkansas"
                     },
                     {
                        "enum": [
                           "CA"
                        ],
                        "title": "California"
                     },
                     {
                        "enum": [
                           "CO"
                        ],
                        "title": "Colorado"
                     },
                     {
                        "enum": [
                           "CT"
                        ],
                        "title": "Connecticut"
                     },
                     {
                        "enum": [
                           "DE"
                        ],
                        "title": "Delaware"
                     },
                     {
                        "enum": [
                           "DC"
                        ],
                        "title": "District of Columbia"
                     },
                     {
                        "enum": [
                           "FL"
                        ],
                        "title": "Florida"
                     },
                     {
                        "enum": [
                           "GA"
                        ],
                        "title": "Georgia"
                     },
                     {
                        "enum": [
                           "GU"
                        ],
                        "title": "Guam"
                     },
                     {
                        "enum": [
                           "HI"
                        ],
                        "title": "Hawaii"
                     },
                     {
                        "enum": [
                           "ID"
                        ],
                        "title": "Idaho"
                     },
                     {
                        "enum": [
                           "IL"
                        ],
                        "title": "Illinois"
                     },
                     {
                        "enum": [
                           "IN"
                        ],
                        "title": "Indiana"
                     },
                     {
                        "enum": [
                           "IA"
                        ],
                        "title": "Iowa"
                     },
                     {
                        "enum": [
                           "KS"
                        ],
                        "title": "Kansas"
                     },
                     {
                        "enum": [
                           "KY"
                        ],
                        "title": "Kentucky"
                     },
                     {
                        "enum": [
                           "LA"
                        ],
                        "title": "Louisiana"
                     },
                     {
                        "enum": [
                           "ME"
                        ],
                        "title": "Maine"
                     },
                     {
                        "enum": [
                           "MD"
                        ],
                        "title": "Maryland"
                     },
                     {
                        "enum": [
                           "MA"
                        ],
                        "title": "Massachusetts"
                     },
                     {
                        "enum": [
                           "MI"
                        ],
                        "title": "Michigan"
                     },
                     {
                        "enum": [
                           "MN"
                        ],
                        "title": "Minnesota"
                     },
                     {
                        "enum": [
                           "MS"
                        ],
                        "title": "Mississippi"
                     },
                     {
                        "enum": [
                           "MO"
                        ],
                        "title": "Missouri"
                     },
                     {
                        "enum": [
                           "MT"
                        ],
                        "title": "Montana"
                     },
                     {
                        "enum": [
                           "NE"
                        ],
                        "title": "Nebraska"
                     },
                     {
                        "enum": [
                           "NV"
                        ],
                        "title": "Nevada"
                     },
                     {
                        "enum": [
                           "NH"
                        ],
                        "title": "New Hampshire"
                     },
                     {
                        "enum": [
                           "NJ"
                        ],
                        "title": "New Jersey"
                     },
                     {
                        "enum": [
                           "NM"
                        ],
                        "title": "New Mexico"
                     },
                     {
                        "enum": [
                           "NY"
                        ],
                        "title": "New York"
                     },
                     {
                        "enum": [
                           "NC"
                        ],
                        "title": "North Carolina"
                     },
                     {
                        "enum": [
                           "ND"
                        ],
                        "title": "North Dakota"
                     },
                     {
                        "enum": [
                           "MP"
                        ],
                        "title": "Northern Mariana Islands"
                     },
                     {
                        "enum": [
                           "OH"
                        ],
                        "title": "Ohio"
                     },
                     {
                        "enum": [
                           "OK"
                        ],
                        "title": "Oklahoma"
                     },
                     {
                        "enum": [
                           "OR"
                        ],
                        "title": "Oregon"
                     },
                     {
                        "enum": [
                           "PA"
                        ],
                        "title": "Pennsylvania"
                     },
                     {
                        "enum": [
                           "PR"
                        ],
                        "title": "Puerto Rico"
                     },
                     {
                        "enum": [
                           "RI"
                        ],
                        "title": "Rhode Island"
                     },
                     {
                        "enum": [
                           "SC"
                        ],
                        "title": "South Carolina"
                     },
                     {
                        "enum": [
                           "SD"
                        ],
                        "title": "South Dakota"
                     },
                     {
                        "enum": [
                           "TN"
                        ],
                        "title": "Tennessee"
                     },
                     {
                        "enum": [
                           "TX"
                        ],
                        "title": "Texas"
                     },
                     {
                        "enum": [
                           "UM"
                        ],
                        "title": "United States Minor Outlying Islands"
                     },
                     {
                        "enum": [
                           "UT"
                        ],
                        "title": "Utah"
                     },
                     {
                        "enum": [
                           "VT"
                        ],
                        "title": "Vermont"
                     },
                     {
                        "enum": [
                           "VI"
                        ],
                        "title": "Virgin Islands, U.S."
                     },
                     {
                        "enum": [
                           "VA"
                        ],
                        "title": "Virginia"
                     },
                     {
                        "enum": [
                           "WA"
                        ],
                        "title": "Washington"
                     },
                     {
                        "enum": [
                           "WV"
                        ],
                        "title": "West Virginia"
                     },
                     {
                        "enum": [
                           "WI"
                        ],
                        "title": "Wisconsin"
                     },
                     {
                        "enum": [
                           "WY"
                        ],
                        "title": "Wyoming"
                     }
                  ],
                  "pattern": "^[A-Z]{2}$",
                  "title": "State/Province",
                  "type": "string"
               },
               "address_line_1": {
                  "$target": [
                     "bank.bank_details.address.address_line1",
                     "legal.attributes.AddressLine1"
                  ],
                  "$ui": {
                     "errorMessage": "Address has to be from 1 to 70 letters",
                     "placeholder": "Enter Address Line 1"
                  },
                  "pattern": "^.{1,70}$",
                  "title": "Address Line 1",
                  "type": "string"
               },
               "address_line_2": {
                  "$target": [
                     "bank.bank_details.address.address_line2",
                     "legal.attributes.AddressLine2"
                  ],
                  "$ui": {
                     "errorMessage": "Address has to be from 1 to 70 letters",
                     "placeholder": "Enter Address Line 2"
                  },
                  "pattern": "^.{1,70}$",
                  "title": "Address Line 2",
                  "type": "string"
               },
               "address_postal_code": {
                  "$target": [
                     "bank.bank_details.address.postal_code",
                     "legal.attributes.AddressPostCode"
                  ],
                  "$ui": {
                     "errorMessage": "Postal code has to be 5 digits or 5 digits dash (-) 4 digits",
                     "placeholder": "Enter Postal code"
                  },
                  "pattern": "^[0-9]{5}(?:-[0-9]{4})?$",
                  "title": "Postal code",
                  "type": "string"
               },
               "date_of_birth": {
                  "$target": [
                     "legal.attributes.BirthDate",
                     "bank.tags.date_of_birth"
                  ],
                  "$ui": {
                     "errorMessage": "Date Of Birth has to be YYYY-MM-DD",
                     "placeholder": "Enter according to the format YYYY-MM-DD"
                  },
                  "format": "date",
                  "pattern": "^(19|20|30)\\d{2}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
                  "title": "Date Of Birth",
                  "type": "string"
               },
               "individual_first_name": {
                  "$target": [
                     "legal.attributes.FirstName",
                     "bank.tags.first_name"
                  ],
                  "$ui": {
                     "errorMessage": "First name is a mandatory field",
                     "placeholder": "Enter First name"
                  },
                  "title": "First Name",
                  "type": "string"
               },
               "individual_last_name": {
                  "$target": [
                     "bank.tags.last_name",
                     "legal.attributes.LastName"
                  ],
                  "$ui": {
                     "errorMessage": "Last name is a mandatory field",
                     "placeholder": "Enter Last name"
                  },
                  "title": "Last Name",
                  "type": "string"
               }
            },
            "required": [
               "individual_first_name",
               "individual_last_name",
               "address_line_1",
               "address_country",
               "address_city",
               "address_country_subdivision",
               "address_postal_code",
               "date_of_birth"
            ]
         }
      },
      "required": [
         "entity",
         "bank_details"
      ]
   }
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: \"\" at #/currency failed against #/properties/currency with \"Did not match pattern: ^[A-Z]{3,3}$\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Create A Beneficiary

The API is utilized to create a beneficiary within the account. Once registered, the beneficiary ID can be used to send payment instructions.

<mark style="color:green;">**`POST`**</mark> /payments/beneficiaries

**Body Parameters Request**

| Name          | Type   | Format / Values      | Description                                                                                      | Required |
| ------------- | ------ | -------------------- | ------------------------------------------------------------------------------------------------ | -------- |
| entity\_type  | string | BUSINESS, INDIVIDUAL | The beneficiary's type.                                                                          |          |
| id            | string |                      | The beneficiary ID serves as the unique identifier for this beneficiary contact on the platform. |          |
| country       | string | /^\[A-Z]{2,2}$/      | Bank country code (2-letter ISO 3166-2 country code).                                            | Yes      |
| currency      | string | /^\[A-Z]{3,3}$/      | Account currency (3-letter ISO 4217 currency code).                                              | Yes      |
| tags          | object |                      |                                                                                                  |          |
| user\_tags    | object |                      |                                                                                                  |          |
| entity        | object |                      |                                                                                                  | Yes      |
| bank\_details | object |                      |                                                                                                  | Yes      |

**Body Parameters Response**

| Name          | Type    | Description                                                                        |
| ------------- | ------- | ---------------------------------------------------------------------------------- |
| active        | boolean | Is this beneficiary active                                                         |
| name          | string  | A custom display name                                                              |
| bank\_details | object  | Bank account attributes                                                            |
| country       | string  | The 2 letter ISO country code this beneficiaries account is located in             |
| currency      | string  | The 3 letter ISO currency code this beneficiaries bank account is setup to receive |
| entity        | object  | Beneficiary owning entity attributes                                               |
| id            | string  | Unique id of beneficiary                                                           |
| type          | string  | Entity type (contact)                                                              |
| user\_tags    | object  | A set of K/V pairs the beneficiary has been tagged with                            |

**Request Example**

```json
POST /payments/beneficiaries
{
   "entity_type": "INDIVIDUAL",
   "country": "US",
   "currency": "USD",
   "user_tags": {
      "department": "R&D",
      "cost_center": "US"
   },
   "entity": {
      "individual_first_name": "Smith",
      "individual_last_name": "Johny",
      "date_of_birth": "1970-01-01",
      "address_line_1": "944 Fairfield Street",
      "address_city": "Los Angeles",
      "address_country": "US",
      "address_country_subdivision": "CA",
      "address_postal_code": "90210"
   },
   "bank_details": {
      "account_name": "John Smith",
      "account_number": "1234567",
      "bank_code": "123456789",
      "bank_name": "Bank of America ",
      "bank_identifier_code": "BOFAUS22XXX"
   }
}
```

**Response Examples**

{% tabs %}
{% tab title="201 - Created" %}

```json
{
   "type": "contact",
   "id": "GHXY5QuJRxSIrfkfcaBzUg",
   "currency": "USD",
   "country": "US",
   "bank_details": {
      "account_country": "US",
      "account_name": "John Smith",
      "account_number": "1234567",
      "bank_code": "123456789",
      "bank_identifier_code": "BOFAUS22XXX",
      "bank_name": "Bank of America "
   },
   "entity": {
      "address_city": "Los Angeles",
      "address_country": "US",
      "address_country_subdivision": "CA",
      "address_line_1": "944 Fairfield Street",
      "address_postal_code": "90210",
      "date_of_birth": "1970-01-01",
      "individual_first_name": "Smith",
      "individual_last_name": "Johny"
   },
   "user_tags": {
      "department": "R&D",
      "cost_center": "US"
   },
   "active": false
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Update Beneficiary Details

The API creates or modifies existing beneficiary records with the provided beneficiary ID.

You can only update a key’s owner record when you call with a beneficiary Key.

<mark style="color:orange;">**`PUT`**</mark> /payments/beneficiaries/{id}

**Body Parameters Request**

| Name          | Type   | Format / Values      | Description                                                                                      | Required |
| ------------- | ------ | -------------------- | ------------------------------------------------------------------------------------------------ | -------- |
| type          | string | BUSINESS, INDIVIDUAL | The beneficiary's type.                                                                          |          |
| id            | string |                      | The beneficiary ID serves as the unique identifier for this beneficiary contact on the platform. |          |
| country       | string | /^\[A-Z]{2,2}$/      | Bank country code (2-letter ISO 3166-2 country code).                                            | Yes      |
| currency      | string | /^\[A-Z]{3,3}$/      | Account currency (3-letter ISO 4217 currency code).                                              | Yes      |
| tags          | object |                      |                                                                                                  |          |
| user\_tags    | object |                      |                                                                                                  |          |
| entity        | object |                      |                                                                                                  | Yes      |
| bank\_details | object |                      |                                                                                                  | Yes      |

**Body Parameters Response**

| Name          | Type    | Description                                                                        |
| ------------- | ------- | ---------------------------------------------------------------------------------- |
| active        | boolean | Is this beneficiary active                                                         |
| name          | string  | A custom display name                                                              |
| bank\_details | object  | Bank account attributes                                                            |
| country       | string  | The 2 letter ISO country code this beneficiaries account is located in             |
| currency      | string  | The 3 letter ISO currency code this beneficiaries bank account is setup to receive |
| entity        | object  | Beneficiary owning entity attributes                                               |
| id            | string  | Unique id of beneficiary                                                           |
| type          | string  | Entity type (contact)                                                              |
| user\_tags    | object  | A set of K/V pairs the beneficiary has been tagged with                            |

**Request Example**

```json
PUT /payments/beneficiaries/my_id_22
{
   "type": "INDIVIDUAL",
   "country": "US",
   "currency": "USD",
   "user_tags": {
      "department": "R&D",
      "cost_center": "US"
   },
   "entity": {
      "individual_first_name": "Smith",
      "individual_last_name": "Johny",
      "date_of_birth": "1970-01-01",
      "address_line_1": "944 Fairfield Street",
      "address_city": "Los Angeles",
      "address_country": "US",
      "address_country_subdivision": "CA",
      "address_postal_code": "90210"
   },
   "bank_details": {
      "account_name": "John Smith",
      "account_number": "1234567",
      "bank_code": "123456789",
      "bank_name": "Bank of America "
   }
}
```

**Response Examples**

{% tabs %}
{% tab title="200 - Successful update" %}

```json
{
   "country": "US",
   "user_tags": {
      "cost_center": "US",
      "department": "R&D"
   },
   "bank_details": {
      "account_number": "1234567",
      "bank_code": "123456789",
      "account_name": "John Smith",
      "bank_name": "Bank of America ",
      "account_country": "US"
   },
   "active": false,
   "currency": "USD",
   "id": "my_id_22",
   "type": "contact",
   "entity": {
      "address_country": "US",
      "date_of_birth": "1970-01-01",
      "individual_last_name": "Johny",
      "address_line_1": "944 Fairfield Street",
      "individual_first_name": "Smith",
      "address_city": "Los Angeles"
   }
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Get Beneficiary Details

The API obtains beneficiary details and fetches comprehensive information by specifying the beneficiary ID.

<mark style="color:blue;">**`GET`**</mark> /payments/beneficiaries/{id}

**Body Parameters Request**

| Name | Type   | Format / Values | Description                                          | Required |
| ---- | ------ | --------------- | ---------------------------------------------------- | -------- |
| id   | string |                 | The Beneficiary 's ID on the platform (external\_id) | Yes      |

**Body Parameters Response**

| Name                    | Type    | Format / Values                                                    | Description                                                                            |
| ----------------------- | ------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| type                    | string  | contact                                                            | Entity type (contact)                                                                  |
| id                      | string  |                                                                    | Unique id of the beneficiary                                                           |
| bank\_details           | object  |                                                                    | Attributes for beneficiaries bank details                                              |
| entity                  | object  |                                                                    | Attributes for beneficiary entity details                                              |
| entity\_type            | string  | INDIVIDUAL, BUSINESS                                               | The legal type of the entity                                                           |
| name                    | string  |                                                                    | Display name of beneficiary                                                            |
| currency                | string  |                                                                    | The 3 letter ISO currency code the bank details are setup to receive                   |
| status                  | string  | ACTIVE, ACTIVATING, REQUIRES\_INPUT, REQUIRES\_ATTENTION, DISABLED | The current status of the beneficiary                                                  |
| active                  | boolean |                                                                    | true when the beneficiary is active for payments                                       |
| user\_tags              | object  |                                                                    | A set of key/value pairs of tags assigned to this beneficiary                          |
| payments                | object  |                                                                    | Extended information on payments made to this beneficiary                              |
| payments.total          | integer |                                                                    | Total number of payments for beneficiary                                               |
| payments.next           | object  |                                                                    | Information on the next upcoming payment for this beneficiary                          |
| payments.next.date      | string  | date-time                                                          | The date the next payment is scheduled to execute                                      |
| payments.next.amount    | integer |                                                                    | The amount to be paid in the next payment                                              |
| payments.next.currency  | string  |                                                                    | The currency the next payment will be credited in                                      |
| payments.last           | object  |                                                                    | Information on the last successful payment made to this beneficiary                    |
| payments.last.date      | string  | date-time                                                          | The date the last payment was executed                                                 |
| payments.last.amount    | integer |                                                                    | The amount credited in the last payment                                                |
| payments.last.currency  | string  |                                                                    | The currency the last payment was credited in                                          |
| payments.history        | object  |                                                                    | Information for all historical payments made to this beneficiary                       |
| payments.history.total  | integer |                                                                    | total number of payments made to this beneficiary                                      |
| payments.history.amount | integer |                                                                    | The total amount credited to this beneficiary so far                                   |
| issues                  | array   | object                                                             | A list of issues and severity asociated with this beneficiary that may affect payments |
| issues\[]               | object  |                                                                    |                                                                                        |
| issues\[].description   | string  |                                                                    | Human readable description of issue                                                    |
| issues\[].hint          | string  |                                                                    | Extended information on this issue                                                     |
| issues\[].action        | string  |                                                                    | Action required to fix issue (when available)                                          |
| issues\[].code          | string  |                                                                    | Issue code                                                                             |
| issues\[].severity      | string  | ERROR, WARNING, INFO                                               | Issue severity                                                                         |

**Request Example**

```json
GET /payments/beneficiaries/15
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "bank_details": {
      "account_country": "AU",
      "account_name": "Brooks Sophia",
      "account_number": "69851423",
      "bank_code": "306053",
      "bank_name": "BANK OF WESTERN AUSTRALIA LIMITED"
   },
   "entity": {
      "address_city": "SYDNEY",
      "address_country": "AU",
      "address_line_1": "777 Green Valley Crescent Chippendale",
      "date_of_birth": "1968-08-29",
      "individual_first_name": " Sophia",
      "individual_last_name": "Brooks"
   },
   "type": "contact",
   "id": "15",
   "entity_type": "INDIVIDUAL",
   "name": " Sophia Brooks",
   "currency": "AUD",
   "status": "ACTIVE",
   "active": true,
   "user_tags": {},
   "payments": {
      "total": 5000,
      "next": {
         "date": "2024-03-07T05:00:00Z",
         "amount": 5000,
         "currency": "AUD"
      },
      "last": {},
      "history": {
         "total": 0,
         "amount": 0
      }
   },
   "issues": [
      {
         "description": "Beneficiary has yet to have been sent a payment",
         "hint": "As no payments have yet to have been sent to this beneficiary, we can not be certain all details are correct",
         "action": "ADD_PAYMENT",
         "code": "NO_PAYMENTS",
         "severity": "WARNING"
      }
   ]
}
```

{% endtab %}

{% tab title="404 - Not found" %}

```json
{
   "error": "not_found",
   "description": "Beneficiary not found",
   "error_code": 404,
   "sub_code": 1000
}
```

{% endtab %}
{% endtabs %}


# Get Beneficiaries List

The API is utilized to retrieve beneficiaries' details and fetch comprehensive information about all the beneficiaries associated with the organization account, with optional filters. Results are paginated, with a default list limit of 50 results.

<mark style="color:blue;">**`GET`**</mark> /payments/beneficiaries

**Body Parameters Request**

| Name     | Location      | Type    | Format / Values            | Description                                                                                                                                                                                               | Example                                                     |
| -------- | ------------- | ------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| skip     | url parameter | integer |                            | The number of items to skip from result set                                                                                                                                                               | `?skip=3`                                                   |
| take     | url parameter | integer | default = 50               | The max number of items to return in the result set                                                                                                                                                       | `?take=50`                                                  |
| id       | url parameter | array   | string                     | an array of specific id’s to return                                                                                                                                                                       | `?id=15&id=34`                                              |
| country  | url parameter | array   | 2 letter ISO country code  | a list of country id’s to filter by                                                                                                                                                                       | `?country=US&country=GB&country=FR`                         |
| currency | url parameter | array   | 3 letter ISO currency code | a list of currency codes to filter by                                                                                                                                                                     | `?currency=EUR`                                             |
| tag      | url parameter | array   | tag:name={value}           | A list of tags and their values to filter by                                                                                                                                                              | `?tag:department=sales&tag:department=marketing`            |
| sort     | url parameter | array   | sort:field={direction}     | <p>List of fields to sort by.<br>includes:</p><ul><li><code>currency</code></li><li><code>bank\_details.account\_country</code></li><li><code>id</code></li><li><code>bank\_details.name</code></li></ul> | `?sort:currency=ASC&sort:bank_details.account_country=DESC` |

**Body Parameters Response**

| Name                       | Type        | Format / Values                                                    | Description                                                                                     |
| -------------------------- | ----------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
| facets                     | object      |                                                                    |                                                                                                 |
| facets.countries           | object      |                                                                    | Breakdown of countries and the count of beneficiaries mapping to them in the entire result set  |
| facets.currencies          | object      |                                                                    | Breakdown of currencies and the count of beneficiaries mapping to them in the entire result set |
| facets.user\_tags          | object      |                                                                    | Breakdown of user tags and the count of beneficiaries mapping to them in the entire result set  |
| items                      | array       | object                                                             |                                                                                                 |
| items\[]                   | object      |                                                                    |                                                                                                 |
| items\[].payee.source.type | string      | contact                                                            | Entity type (contact)                                                                           |
| items\[].id                | string      |                                                                    | Unique id of beneficiary                                                                        |
| items\[].entity\_type      | string      | INDIVIDUAL, BUSINESS                                               |                                                                                                 |
| items\[].name              |             |                                                                    |                                                                                                 |
| items\[].account\_country  | string      |                                                                    |                                                                                                 |
| items\[].currency          | string      | /^(\[A-Z]{3,3})$/                                                  | The 3 letter ISO currency code                                                                  |
| items\[].active            | boolean     |                                                                    | Is this beneficiary active for payments                                                         |
| items\[].status            | ActiveState | ACTIVE, ACTIVATING, REQUIRES\_INPUT, REQUIRES\_ATTENTION, DISABLED |                                                                                                 |
| items\[].user\_tags        | object      |                                                                    |                                                                                                 |
| paging                     | Paging      |                                                                    |                                                                                                 |
| paging.skip                | integer     |                                                                    | The number of items to skip in the result set                                                   |
| paging.take                | integer     |                                                                    | The max number of items to return in the result set                                             |
| paging.total               | integer     |                                                                    | The total number of results matching the filters                                                |

**Request Example**

```json
GET /payments/beneficiaries?currency=EUR&currency=USD&currency=AUD&sort:currency=ASC&sort:bank_details.account_country=DESC
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "facets": {
      "countries": {
         "AU": 10,
         "FR": 1,
         "US": 5
      },
      "currencies": {
         "AUD": 10,
         "EUR": 1,
         "USD": 5
      },
      "user_tags": {
         "department": 16
      }
   },
   "items": [
      {
         "type": "contact",
         "id": "6",
         "entity_type": "INDIVIDUAL",
         "name": "Jordan Anderson",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "R&D"
         }
      },
      {
         "type": "contact",
         "id": "12",
         "entity_type": "INDIVIDUAL",
         "name": "Brandon Taylor",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Marketing"
         }
      },
      {
         "type": "contact",
         "id": "8",
         "entity_type": "INDIVIDUAL",
         "name": "Oliver Reynolds",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Marketing"
         }
      },
      {
         "type": "contact",
         "id": "14",
         "entity_type": "INDIVIDUAL",
         "name": "Xavier Turner",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "R&D"
         }
      },
      {
         "type": "contact",
         "id": "10",
         "entity_type": "INDIVIDUAL",
         "name": "Caleb Rodriguez",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "R&D"
         }
      },
      {
         "type": "contact",
         "id": "7",
         "entity_type": "INDIVIDUAL",
         "name": "Natalie Clarke",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Operations"
         }
      },
      {
         "type": "contact",
         "id": "13",
         "entity_type": "INDIVIDUAL",
         "name": "Lily Chang",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Sales"
         }
      },
      {
         "type": "contact",
         "id": "9",
         "entity_type": "INDIVIDUAL",
         "name": "Maya Patel",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Sales"
         }
      },
      {
         "type": "contact",
         "id": "15",
         "entity_type": "INDIVIDUAL",
         "name": "Sophia Brooks",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Operations"
         }
      },
      {
         "type": "contact",
         "id": "11",
         "entity_type": "INDIVIDUAL",
         "name": "Stella Martinez",
         "account_country": "AU",
         "currency": "AUD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Operations"
         }
      },
      {
         "type": "contact",
         "id": "16",
         "entity_type": "INDIVIDUAL",
         "name": "Jean Dupont",
         "account_country": "FR",
         "currency": "EUR",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Marketing"
         }
      },
      {
         "type": "contact",
         "id": "2",
         "entity_type": "INDIVIDUAL",
         "name": "Jason Patel",
         "account_country": "US",
         "currency": "USD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "R&D"
         }
      },
      {
         "type": "contact",
         "id": "4",
         "entity_type": "INDIVIDUAL",
         "name": "Ethan Wang",
         "account_country": "US",
         "currency": "USD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Marketing"
         }
      },
      {
         "type": "contact",
         "id": "1",
         "entity_type": "INDIVIDUAL",
         "name": "Emily Anderson",
         "account_country": "US",
         "currency": "USD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Sales"
         }
      },
      {
         "type": "contact",
         "id": "3",
         "entity_type": "INDIVIDUAL",
         "name": "Olivia Garcia",
         "account_country": "US",
         "currency": "USD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Operations"
         }
      },
      {
         "type": "contact",
         "id": "5",
         "entity_type": "INDIVIDUAL",
         "name": "Sophia Rodriguez",
         "account_country": "US",
         "currency": "USD",
         "active": true,
         "status": "ACTIVE",
         "user_tags": {
            "department": "Sales"
         }
      }
   ],
   "paging": {
      "skip": 0,
      "take": 50,
      "total": 16
   }
}
```

{% endtab %}

{% tab title="404 - Not found" %}

```json
{
   "error": "not_found",
   "description": "Status standalone.api.job_202000_2662bee9-f30f-484e-b0a0-63689266bff6 could not be found",
   "error_code": 404,
   "error_info": {
      "error": "not_found",
      "description": "Status standalone.api.job_202000_2662bee9-f30f-484e-b0a0-63689266bff6 could not be found",
      "error_code": 404
   }
}
```

{% endtab %}
{% endtabs %}


# Bulk Import Beneficiary

The API generates a group of multiple beneficiaries by making a single request within the account. After registration, the beneficiary ID can be used to transmit payment instructions, and the job ID can be used on the status endpoint to check the job status.

<mark style="color:green;">**`POST`**</mark> /payments/beneficiaries/import

**Body Parameters Request**

| Name                   | Type    | Format / Values      | Description                                                                                                     | Required |
| ---------------------- | ------- | -------------------- | --------------------------------------------------------------------------------------------------------------- | -------- |
| update\_payments       | boolean |                      | When set to true, will update the beneficiary details for all pending payments created for the same beneficiary |          |
| signature              | string  |                      |                                                                                                                 |          |
| items                  | array   | object               |                                                                                                                 |          |
| items\[]               | object  |                      |                                                                                                                 |          |
| items\[].id            | string  |                      |                                                                                                                 |          |
| items\[].country       | string  | /^\[A-Z]{2,2}$/      |                                                                                                                 |          |
| items\[].currency      | string  | /^\[A-Z]{3,3}$/      |                                                                                                                 |          |
| items\[].entity\_type  | string  | INDIVIDUAL, BUSINESS |                                                                                                                 |          |
| items\[].bank\_details | object  |                      |                                                                                                                 |          |
| items\[].entity        | object  |                      |                                                                                                                 |          |

**Body Parameters Response**

| Name                                                    | Type    | Format / Values | Description                                           |
| ------------------------------------------------------- | ------- | --------------- | ----------------------------------------------------- |
| job\_id                                                 | string  |                 | The job id assigned to this import                    |
| started\_at                                             | string  | date-time       | The time the import job started                       |
| processed                                               | integer |                 | The total number of items processed so far            |
| total                                                   | integer |                 | Total number of items in bulk                         |
| processing                                              | integer |                 | The number of items currently being processed         |
| failed                                                  | integer |                 | Total number of failed items                          |
| status                                                  | string  | QUEUED, DONE    | The current job status                                |
| progress                                                | array   | object          | List of item progress                                 |
| progress\[]                                             | object  |                 |                                                       |
| progress\[].row                                         | integer |                 | The index of the item                                 |
| progress\[].error                                       | object  |                 | Information regarding error encountered for this item |
| progress\[].error.error\_info                           | object  |                 |                                                       |
| progress\[].error.error\_info.valid                     | boolean |                 | Is this item valid                                    |
| progress\[].error.error\_info.warnings                  | array   | object          | List of warnings encountered for this item            |
| progress\[].error.error\_info.warnings\[]               | object  |                 |                                                       |
| progress\[].error.error\_info.warnings\[].description   | string  |                 | Description of issue                                  |
| progress\[].error.error\_info.warnings\[].properties    | array   | string          | the properties this issue applies to                  |
| progress\[].error.error\_info.warnings\[].properties\[] | string  |                 |                                                       |
| progress\[].error.error\_info.errors                    | array   | object          | List of errors encountered for this item              |
| progress\[].error.error\_info.errors\[]                 | object  |                 |                                                       |
| progress\[].error.error\_info.errors\[].description     | string  |                 | Description of issue                                  |
| progress\[].error.error\_info.errors\[].properties      | array   | string          | the properties this issue applies to                  |
| progress\[].error.error\_info.errors\[].properties\[]   | string  |                 |                                                       |
| progress\[].error.error\_code                           | integer |                 | The error code associated with this issue             |
| progress\[].error.error                                 | string  |                 | error type encountered                                |
| progress\[].error.message                               | string  |                 | Human readable error information                      |
| progress\[].status                                      | string  | FAILED, SUCCESS | The status of this item's impo                        |

**Request Example**

```json
POST /payments/beneficiaries/import
{
   "items": [
      {
         "id": "1",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "account_number": "789456123012",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Anderson Emily"
         },
         "entity": {
            "individual_last_name": "Anderson",
            "address_country_subdivision": "TX",
            "individual_first_name": " Emily",
            "date_of_birth": "1985-06-05",
            "address_line_1": "1234 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         }
      },
      {
         "id": "2",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "BANK OF AMERICA",
            "account_number": "234567890567",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Patel Jason"
         },
         "entity": {
            "individual_last_name": "Patel",
            "address_country_subdivision": "TX",
            "individual_first_name": " Jason",
            "date_of_birth": "1986-12-02",
            "address_line_1": "1235 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         }
      },
      {
         "id": "3",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "Bank of America",
            "account_number": "654321098765",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Garcia Olivia"
         },
         "entity": {
            "individual_last_name": "Garcia",
            "address_country_subdivision": "TX",
            "individual_first_name": " Olivia",
            "date_of_birth": "1972-11-25",
            "address_line_1": "1236 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         }
      }
   ]
}
```

**Response Examples**

{% tabs %}
{% tab title="202 - Accepted" %}

```json
{
  "job_id": "TPy4DcQATiqZRRzTMEXt2Q",
  "started_at": "2024-03-04T10:56:51.126587470Z",
  "processed": 0,
  "total": 3,
  "processing": 2,
  "failed": 1,
  "status": "QUEUED"
  "progress": [
    {
      "row": 0,
      "error": {
        "error_info": {
          "valid": false,
          "warnings": [],
          "errors": [
            {
              "description": "Missing property bank_name",
              "properties": [
                "$.bank_details"
              ]
            }
          ]
        },
        "error_code": 422,
        "error": "unprocessable_entity",
        "message": "Payload object is invalid."
      },
      "status": "FAILED"
    }
  ] 
}
```

{% endtab %}

{% tab title="404 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: \"US\" at #/items/0/currency failed against #/properties/items/items/properties/currency with \"Did not match pattern: ^[A-Z]{3,3}$\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Bulk Import Beneficiary Status

The Bulk Import Beneficiary Job Status can be obtained by utilizing the API.

<mark style="color:blue;">**`GET`**</mark>/payments/beneficiaries/import/{job\_id}

**Body Parameters Request**

| Name    | Type   | Format / Values | Description                    | Required |
| ------- | ------ | --------------- | ------------------------------ | -------- |
| job\_id | string |                 | The job id to fetch status for | Yes      |

**Body Parameters Response**

| Name                                                    | Type    | Format / Values | Description                                           |
| ------------------------------------------------------- | ------- | --------------- | ----------------------------------------------------- |
| job\_id                                                 | string  |                 | The job id assigned to this import                    |
| started\_at                                             | string  | date-time       | The time the import job started                       |
| completed\_at                                           | string  | date-time       | The time the import job completed                     |
| processed                                               | integer |                 | The total number of items processed so far            |
| total                                                   | integer |                 | Total number of items in bulk                         |
| processing                                              | integer |                 | The number of items currently being processed         |
| failed                                                  | integer |                 | Total number of failed items                          |
| status                                                  | string  | QUEUED, DONE    | The current job status                                |
| progress                                                | array   | object          | List of item progress                                 |
| progress\[]                                             | object  |                 |                                                       |
| progress\[].row                                         | integer |                 | The index of the item                                 |
| progress\[].error                                       | object  |                 | Information regarding error encountered for this item |
| progress\[].error.error\_info                           | object  |                 |                                                       |
| progress\[].error.error\_info.valid                     | boolean |                 | Is this item valid                                    |
| progress\[].error.error\_info.warnings                  | array   | object          | List of warnings encountered for this item            |
| progress\[].error.error\_info.warnings\[]               | object  |                 |                                                       |
| progress\[].error.error\_info.warnings\[].properties    | array   | string          | the properties this issue applies to                  |
| progress\[].error.error\_info.warnings\[].properties\[] | string  |                 |                                                       |
| progress\[].error.error\_info.warnings\[].description   | string  |                 | Description of issue                                  |
| progress\[].error.error\_info.errors                    | array   | object          | List of errors encountered for this item              |
| progress\[].error.error\_info.errors\[]                 | object  |                 |                                                       |
| progress\[].error.error\_info.errors\[].properties      | array   | string          | the properties this issue applies to                  |
| progress\[].error.error\_info.errors\[].properties\[]   | string  |                 |                                                       |
| progress\[].error.error\_info.errors\[].description     | string  |                 | Description of issue                                  |
| progress\[].error.error\_code                           | integer |                 | The error code associated with this issue             |
| progress\[].error.error                                 | string  |                 | error type encountered                                |
| progress\[].error.message                               | string  |                 | Human readable error information                      |
| progress\[].status                                      | string  | FAILED, SUCCESS | The status of this item's import                      |

**Request Example**

```json
GET /payments/beneficiaries/import/TPy4DcQATiqZRRzTMEXt2Q
```

**Response Examples**

{% tabs %}
{% tab title="Status: 200 - OK" %}

```json
{
   "completed_at": "2024-03-04T10:56:53.396911923Z",
   "processed": 2,
   "total": 3,
   "job_id": "TPy4DcQATiqZRRzTMEXt2Q",
   "started_at": "2024-03-04T10:56:51.126587470Z",
   "processing": 0,
   "progress": [
      {
         "row": 0,
         "error": {
            "error_info": {
               "valid": false,
               "warnings": [],
               "errors": [
                  {
                     "description": "Missing property bank_name",
                     "properties": [
                        "$.bank_details"
                     ]
                  }
               ]
            },
            "error_code": 422,
            "error": "unprocessable_entity",
            "message": "Payload object is invalid"
         },
         "status": "FAILED"
      },
      {
         "row": 1,
         "status": "SUCCESS"
      },
      {
         "row": 2,
         "status": "SUCCESS"
      }
   ],
   "failed": 1,
   "status": "DONE"
}
```

{% endtab %}

{% tab title="404 - Not Found" %}

```json
{
   "error": "not_found",
   "description": "Status standalone.api.job_202000_OqIr2anOSien3wF4RbVN could not be found",
   "error_code": 404
}
```

{% endtab %}
{% endtabs %}


# Bulk Validate Beneficiary

The API validates the beneficiary details information (across multiple schemas). Upon receiving a beneficiary request, verify its validity and return any unsuccessful fields as issues in the response.

<mark style="color:blue;">**`GET`**</mark>/payments/beneficiaries/validate

**Body Parameters Request**

| Name                                     | Type   | Format / Values      | Description                                                                                    | Required |
| ---------------------------------------- | ------ | -------------------- | ---------------------------------------------------------------------------------------------- | -------- |
| items                                    | array  | object               | List of items to validate                                                                      |          |
| items\[]                                 | object |                      |                                                                                                |          |
| items\[].entity\_type                    | string | INDIVIDUAL, BUSINESS | The type of entity of the beneficiary                                                          |          |
| items\[].bank\_details                   | object |                      | Set of attributes mapping to the beneficary bank details (as specified in the relevant schema) | Yes      |
| items\[].bank\_details.account\_country  | string | /^\[A-Z]{2,2}$/      | The 2 letter ISO country code the beneficiary bank is located in                               | Yes      |
| items\[].bank\_details.account\_currency | string | /^\[A-Z]{3,3}$/      | The 3 letter ISO currency code the beneficiary bank accepts                                    | Yes      |
| items\[].entity                          | object |                      | Set of attributes mapping to the beneficary entity (as specified in the relevant schema)       | Yes      |

**Body Parameters Response**

| Name                         | Type    | Format / Values      | Description                                               |
| ---------------------------- | ------- | -------------------- | --------------------------------------------------------- |
| valid                        | array   | object               | List of items that are valid                              |
| valid\[]                     | object  |                      | Echo of the item sent in                                  |
| valid\[].entity\_type        | string  | INDIVIDUAL, BUSINESS | The entity type this beneficiary was validated as         |
| valid\[].currency            | string  | /^\[A-Z]{3}$/        | The 3 letter ISO currency code used to validate this item |
| valid\[].country             | string  | /^\[A-Z]{2}$/        | The 2 letter ISO country code used to validate this item  |
| invalid                      | array   | object               | List of items that did not validate                       |
| invalid\[]                   | object  |                      | Echo of the item sent in                                  |
| invalid\[].entity\_type      | string  | INDIVIDUAL, BUSINESS | The entity type this beenficiary was validated as         |
| invalid\[].currency          | string  | /^\[A-Z]{3}$/        | The 3 letter ISO currency code used to validate this item |
| invalid\[].country           | string  | /^\[A-Z]{2}$/        | The 2 letter ISO country code used to validate this item  |
| invalid\[].issues            | array   | object               | an array of issues found in this item's payload           |
| invalid\[].issues\[]         | object  |                      |                                                           |
| invalid\[].issues\[].field   | string  |                      | The json path to the field that has the issue             |
| invalid\[].issues\[].message | string  |                      | The issue encountered                                     |
| totals                       | object  |                      | Aggregated totals of this validation                      |
| totals.valid                 | integer |                      | number of items that have a valid payload                 |
| totals.count                 | integer |                      | total number of items processes                           |
| totals.schemas               | integer |                      | total number of schemas used to validate                  |
| totals.invalid               | integer |                      | number of items that are invalid and have issues          |

**Request Example**

```json
POST /payments/beneficiaries/validate
{
   "items": [
      {
         "id": "1",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "account_number": "789456123012",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Anderson Emily"
         },
         "entity": {
            "individual_last_name": "Anderson",
            "address_country_subdivision": "TX",
            "individual_first_name": " Emily",
            "date_of_birth": "1985-06-05",
            "address_line_1": "1234 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         }
      },
      {
         "id": "2",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "BANK OF AMERICA",
            "account_number": "234567890567",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Patel Jason"
         },
         "entity": {
            "individual_last_name": "Patel",
            "address_country_subdivision": "TX",
            "individual_first_name": " Jason",
            "date_of_birth": "1986-12-02",
            "address_line_1": "1235 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         }
      },
      {
         "id": "3",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "Bank of America",
            "account_number": "654321098765",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Garcia Olivia"
         },
         "entity": {
            "individual_last_name": "Garcia",
            "address_country_subdivision": "TX",
            "individual_first_name": " Olivia",
            "date_of_birth": "1972-11-25",
            "address_line_1": "1236 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         }
      }
   ]
}
```

**Response Examples**

{% tabs %}
{% tab title="Status: 200 - OK" %}

```json
{
   "totals": {
      "valid": 2,
      "count": 3,
      "schemas": 1,
      "invalid": 1
   },
   "valid": [
      {
         "id": "2",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "BANK OF AMERICA",
            "account_number": "234567890567",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Patel Jason"
         },
         "entity": {
            "individual_last_name": "Patel",
            "address_country_subdivision": "TX",
            "individual_first_name": " Jason",
            "date_of_birth": "1986-12-02",
            "address_line_1": "1235 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         },
         "currency": "USD",
         "country": "US"
      },
      {
         "id": "3",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "bank_name": "Bank of America",
            "account_number": "654321098765",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Garcia Olivia"
         },
         "entity": {
            "individual_last_name": "Garcia",
            "address_country_subdivision": "TX",
            "individual_first_name": " Olivia",
            "date_of_birth": "1972-11-25",
            "address_line_1": "1236 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         },
         "currency": "USD",
         "country": "US"
      }
   ],
   "invalid": [
      {
         "id": "1",
         "entity_type": "INDIVIDUAL",
         "bank_details": {
            "account_number": "789456123012",
            "bank_code": "111000025",
            "account_country": "US",
            "account_currency": "USD",
            "account_name": "Anderson Emily"
         },
         "entity": {
            "individual_last_name": "Anderson",
            "address_country_subdivision": "TX",
            "individual_first_name": " Emily",
            "date_of_birth": "1985-06-05",
            "address_line_1": "1234 Elm Street",
            "address_city": "Houston",
            "address_country": "US",
            "address_postal_code": "77001"
         },
         "currency": "USD",
         "country": "US",
         "issues": [
            {
               "field": "$.bank_details",
               "message": "Missing property bank_name"
            }
         ]
      }
   ]
}
```

{% endtab %}

{% tab title="404 - Not Found" %}

```json
{
   "error": "not_found",
   "description": "Status standalone.api.job_202000_OqIr2anOSien3wF4RbVN could not be found",
   "error_code": 404,
   "error_info": {
      "error": "not_found",
      "description": "Status standalone.api.job_202000_OqIr2anOSien3wF4RbVN could not be found",
      "error_code": 404
   }
}
```

{% endtab %}
{% endtabs %}


# Invite Beneficiary By Email

The API is utilised to send the invitation to a single user by email

<mark style="color:green;">**`POST`**</mark> /payments/beneficiaries/invite

**Body Parameters Request**

| Parameter       | Type   | Required | Description                                        |
| --------------- | ------ | -------- | -------------------------------------------------- |
| firstName       | string | Yes      | Beneficiary’s first name.                          |
| middleName      | string | No       | Middle name of the beneficiary.                    |
| lastName        | string | Yes      | Beneficiary’s last name.                           |
| email           | string | Yes      | Email address where the invite will be sent.       |
| beneficiaryId   | string | No       | Will Create new Id if not provided                 |
| payGroupId      | string | No       | ID of the payment group the user should belong to. |
| invoiceCurrency | string | No       | currency code e.g. ("EUR", "USD").                 |
| user\_tags      | object | No       | Custom metadata for the user (key-value pairs).    |

**Body Parameter Response**

| Parameter                  | Type         | Required | Description                                    | Example                               |
| -------------------------- | ------------ | -------- | ---------------------------------------------- | ------------------------------------- |
| invite.user\_id            | string       | Yes      | ID of the invited user                         | b8094933-639a-41dc-89e0-c9e432adf3b5  |
| invite.user\_psa\_status   | string       | Yes      | Status of the PSA invitation                   | INVITED                               |
| invite.invite\_expires\_at | string (ISO) | Yes      | Expiration datetime of the invite              | 2025-07-09T21:42:14                   |
| update                     | boolean      | Yes      | Indicates if this is an update operation       | true                                  |
| create                     | boolean      | Yes      | Indicates if this is a create operation        | true                                  |
| name.firstName             | string       | Yes      | Beneficiary’s first name                       | John                                  |
| name.middleName            | string       | No       | Middle name of the beneficiary                 | *(empty)*                             |
| name.lastName              | string       | Yes      | Beneficiary’s last name                        | Doe                                   |
| name.email                 | string       | Yes      | Email address where the invite is sent         | <johndoe1234@gmail.com>               |
| name.beneficiaryId         | string       | No       | Existing beneficiary ID                        | ab799704-26ed-4076-87fb-e1a88955a4d22 |
| name.payGroupId            | string       | No       | ID of the payment group                        | 98ec9c37-b60f-4722-ad13-8c974d95eadc  |
| name.invoiceCurrency       | string       | No       | Currency code (e.g., "EUR", "USD")             | EUR                                   |
| name.user\_tags            | object       | No       | Custom metadata for the user (key-value pairs) | {}                                    |
| name.org\_id               | string       | Yes      | Organization ID                                | 54309000                              |
| name.user\_id              | string       | Yes      | Internal user ID                               | 2debe167-8dd4-438a-9051-88597061af44  |
| name.roles                 | array        | Yes      | Roles assigned to the user                     | \["SA\_INVOICE\_SUBMISSION\_ADMIN"]   |

**Request Example**

```json
POST /beneficiaries/invite
{
  "firstName": "John",
  "middleName": "",
  "lastName": "Doe",
  "email": "johndoe1234@gmail.com",
  "beneficiaryId": "ab799704-26ed-4076-87fb-e1a88955a4d22", //optional 
  "payGroupId": "c5747ec7-a310-4be4-8648-a0ac26d3c5b5",//optional
  "invoiceCurrency": "EUR", //optional
  "user_tags": {} //optional
}
```

**Response Example**

{% tabs %}
{% tab title="200 - Sent" %}

```json
{
  "invite": {
    "user_id": "demo-user-1234",
    "user_psa_status": "INVITED",
    "invite_expires_at": "2025-07-09T21:42:14"
  },
  "update": true,
  "create": true,
  "name": {
    "firstName": "Alice",
    "middleName": "",
    "lastName": "Smith",
    "email": "alice.smith@example.com",
    "beneficiaryId": "demo-beneficiary-5678",
    "payGroupId": "demo-paygroup-001",
    "invoiceCurrency": "USD",
    "user_tags": {
      "department": "Finance",
      "region": "North America"
    },
    "org_id": "demo-org-1001",
    "user_id": "internal-user-9999",
    "payGroup": {
      "type": "group",
      "id": "demo-paygroup-001",
      "description": "Demo Pay Group for Testing",
      "name": "Demo USD Group",
      "locked": false,
      "user_tags": {},
      "wallet": {
        "type": "wallet",
        "id": "wallet-abc-123",
        "currency": "USD",
        "name": "Demo Wallet",
        "balance": 50000.00,
        "owner": "entity://business/customer/demo-org-1001/legal/demo-entity-789"
      },
      "info": {
        "funding": {
          "next": "2025-12-01",
          "missing_funds": 20000.00
        },
        "payments": {
          "total": 100,
          "pending": 20,
          "pending_approval": 10,
          "issues": 5,
          "completed": 75,
          "failed": 0,
          "routing": 2,
          "next": "2025-12-01",
          "amount": {
            "amount": 45000.00,
            "currency": "USD"
          }
        }
      }
    },
    "roles": [
      "SA_INVOICE_SUBMISSION_ADMIN"
    ],
    "owner": {
      "ownerId": "demo-org-1001",
      "ownerType": "org_id"
    }
  }
}
```

{% endtab %}

{% tab title="409 - BENEFICIARY\_ALREADY\_EXISTS" %}

```json
{
    "error": "BENEFICIARY_ALREADY_EXISTS",
    "description": "Beneficiary id already exists",
    "error_code": 400
}
```

{% endtab %}

{% tab title="409 - EMAIL\_ALREADY\_IN\_USE" %}

```json
{
    "error": "EMAIL_ALREADY_IN_USE",
    "description": "Email already in use by other beneficiary",
    "error_code": 409
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
    "error": "bad_request",
    "description": "Validation errors: {\"middleName\":\"\",\"lastName\":\"Doe\",\"email\":\"johndoe129qqq9... at root failed with \"Missing property firstName\"",
    "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Resend Invite Beneficiary By Email

Re-sends an invitation email to an existing beneficiary using their beneficiary ID. Use this endpoint when the beneficiary's previous invitation link has expired and a new one needs to be issued.                                    &#x20;

&#x20; ▎ *This endpoint only works for beneficiaries that have already been created or invited previously. It cannot be used to initiate a first-time invite.*                                             &#x20;

<mark style="color:green;">**`POST`**</mark> /payments/beneficiaries/invite/resend

**Body Parameters Request**

<table data-full-width="false"><thead><tr><th width="239.87890625">Parameter</th><th width="128.7421875">Type</th><th width="142.78515625">Required</th><th>Description</th></tr></thead><tbody><tr><td>beneficiaryId</td><td>string</td><td>Yes</td><td>Unique identifier of the beneficiary to re-invite</td></tr></tbody></table>

**Body Parameter Response**

<table data-full-width="false"><thead><tr><th width="237.61328125">Parameter</th><th width="134.37109375">Type</th><th>Description</th></tr></thead><tbody><tr><td>invite.user_id</td><td>string</td><td>ID of the invited user</td></tr><tr><td>invite.user_psa_status</td><td>string</td><td>Status of the invitation</td></tr><tr><td>invite.invite_expires_at</td><td>string</td><td>ISO datetime when the new invite link expires</td></tr><tr><td>update</td><td>boolean</td><td>Indicates if this is an update operation</td></tr><tr><td>create</td><td>boolean</td><td>Indicates if this is a create operation</td></tr><tr><td>name.userId</td><td>string</td><td>ID of the invited user</td></tr><tr><td>name.permissions</td><td>array</td><td>List of permissions assigned to the user</td></tr><tr><td>name.firstName</td><td>string</td><td>First name of the beneficiary</td></tr><tr><td>name.lastName</td><td>string</td><td>Last name of the beneficiary</td></tr><tr><td>name.email</td><td>string</td><td>Email address of the beneficiary</td></tr><tr><td>name.owner.ownerId</td><td>string</td><td>Owner organisation ID</td></tr><tr><td>name.owner.ownerType</td><td>string</td><td>Owner type (e.g. org_id)</td></tr><tr><td>name.owners</td><td>object</td><td>Map of organisation IDs to assigned roles</td></tr><tr><td>name.roles</td><td>array</td><td>Roles assigned to the user</td></tr><tr><td>name.inviteExpiresAt</td><td>string</td><td>ISO datetime when the invite expires</td></tr><tr><td>name.status</td><td>string</td><td>Status of the user</td></tr></tbody></table>

**Request Example**

```json
 {
    "beneficiaryId": "O5gBSl4aQUOjhPhg7swABw"
  }
```

**Response Example**

{% tabs %}
{% tab title="200 - Sent" %}

```json
{
    "invite": {
      "user_id": "e73d41b0-8ef2-4030-8f14-b3701b492b7a",
      "user_psa_status": "INVITED",
      "invite_expires_at": "2026-02-24T14:18:47"
    },
    "update": true,
    "create": true,
    "name": {
      "userId": "e73d41b0-8ef2-4030-8f14-b3701b492b7a",
      "permissions": [],
      "firstName": "Jensen",
      "lastName": "Corwin",
      "email": "contractor.resend.invite.test.0010@mailinator.com",
      "owner": {
        "ownerId": "507000",
        "ownerType": "org_id"
      },
      "owners": {
        "org_id": {
          "507000": {
            "roles": ["SA_INVOICE_SUBMISSION_ADMIN"]
          }
        }
      },
      "roles": ["SA_INVOICE_SUBMISSION_ADMIN"],
      "inviteExpiresAt": "2026-02-24T14:12:56",
      "status": "INVITED",
      "beneficiaryId": "O5gBSl4aQUOjhPhg7swABw"
    }
  }

```

{% endtab %}

{% tab title="401 - Forbidden" %}

```json
{
    "error_code": 403,
    "error": "forbidden",
    "description": "permission denied",
    "sub_code": 403
  }
```

{% endtab %}

{% tab title="404 - Not Found" %}

```json
 {
    "error_code": 404,
    "error": "BENEFICIARY_NOT_FOUND",
    "description": "Beneficiary not found"
  }
```

{% endtab %}

{% tab title="409 - Conflict" %}

```json
{
    "error_code": 409,
    "error": "USER_ALREADY_REGISTERED",
    "description": "User is already registered"
  }
```

{% endtab %}
{% endtabs %}


# Bulk Invite Beneficiary Via Email

This API is used to send invitations to multiple users . The client submits an array of invitation objects, and each invitation is processed asynchronously. Upon submission, the API responds with a `job_id` that can be used to track the progress and status of the batch operation.

<mark style="color:blue;">**`POST`**</mark> /payments/beneficiaries/bulkimport/invite

**Body Parameters Request**

| Parameter                | Type   | Required | Description                                          |
| ------------------------ | ------ | -------- | ---------------------------------------------------- |
| items                    | array  | Yes      | List of user objects to be invited.                  |
| items\[].firstName       | string | Yes      | First name of the beneficiary.                       |
| items\[].middleName      | string | No       | Middle name of the beneficiary.                      |
| items\[].lastName        | string | Yes      | Last name of the beneficiary.                        |
| items\[].email           | string | Yes      | Email address of the user to be invited.             |
| items\[].beneficiaryId   | string | No       | Optional existing beneficiary ID if already created. |
| items\[].payGroupId      | string | No       | Optional payment group ID the user should belong to. |
| items\[].invoiceCurrency | string | No       | currency code (e.g., "USD", "EUR").                  |
| items\[].user\_tags      | object | No       | Optional custom tags for metadata.                   |

**Body Parameters Response**<br>

| Field               | Type         | Description                                           | Example                                |
| ------------------- | ------------ | ----------------------------------------------------- | -------------------------------------- |
| job\_id             | string       | Unique ID assigned to the batch invitation job        | demo-job-001                           |
| status              | string       | Current status of the job (QUEUED, PROCESSING, DONE)  | DONE                                   |
| total               | integer      | Total number of invitations in the batch              | 2                                      |
| processed           | integer      | Number of invitations successfully processed          | 2                                      |
| failed              | integer      | Number of invitations that failed during processing   | 0                                      |
| processing          | integer      | Number of invitations currently being processed       | 0                                      |
| started\_at         | string (ISO) | Timestamp when job processing started                 | 2025-07-02T21:51:09.437368808Z         |
| completed\_at       | string (ISO) | Timestamp when job processing completed               | 2025-07-02T21:51:09.437375388Z         |
| progress            | array        | Per-row status of each invitation in the batch        | \[{"\_\_row": 0, "status": "SUCCESS"}] |
| progress\[].\_\_row | integer      | Index of the invitation in the submitted array        | 0                                      |
| progress\[].status  | string       | Status of the individual invitation (SUCCESS, FAILED) | SUCCESS                                |

\
\
**Request Example**

<pre class="language-json"><code class="lang-json"><strong>POST /beneficiaries/bulkimport/invite
</strong>{
  "items": [
    {
      "firstName": "John",
      "middleName": "",
      "lastName": "Doe",
      "email": "johndoe1234@gmail.com",
      "inviteMessage": "Custom text messages for invites are currently not supported, but this feature will be available in a future update. Stay tuned!",
      "beneficiaryId": "ab799704-26ed-4076-87fb-e1a88955a4d22",
      "payGroupId": "c5747ec7-a310-4be4-8648-a0ac26d3c5b5",
      "invoiceCurrency": "EUR",
      "user_tags": {}
    },
    {
      "firstName": "Sahil",
      "middleName": "",
      "lastName": "Sid",
      "email": "sahilsid@gmail.com",
      "inviteMessage": "Custom text messages for invites are currently not supported, but this feature will be available in a future update. Stay tuned!",
      "beneficiaryId": "ab799704-26ed-4076-87fb-e1a8895d22",
      "payGroupId": "c5747ec7-a310-4be4-8648-a0ac2c5b5",
      "invoiceCurrency": "EUR",
      "user_tags": {}
    }
  ]
}

</code></pre>

**Response Examples**

{% tabs %}
{% tab title="200  - Success" %}

```json
{
    "job_id": "yVFxTrznRnuSPYQKojbNQg",
    "processing": 0,
    "total": 2,
    "status": "queued",
    "failed": 0,
    "processed": 0,
    "started_at": "2025-07-02T21:50:59.365491818Z",
    "progress": {}
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
    "error": "bad_request",
    "description": "Validation errors: {\"firstName\":\"John\",\"middleName\":\"\",\"email\":\"johndoe12113... at #/items/0 failed against #/properties/items/items with \"Missing property lastName\"",
    "error_code": 400
}
```

{% endtab %}
{% endtabs %}


# Payment Management

### Payment <a href="#payment" id="payment"></a>

When transferring funds to a beneficiary, a payment resource is established to outline the beneficiary's information, bank details, payment amount, status, and additional pertinent data. Alternatively, you have the option to initiate the payment by referencing the beneficiary ID that was generated through beneficiary resources.

{% hint style="info" %}
**The Payment Management API is responsible for managing payment information through creating, updating, deleting, approving**, **and retrieving data.**
{% endhint %}


# Create Payment Instruction

The API creates payment Instructions and enables you to transfer funds to the registered beneficiary.

<mark style="color:green;">**`POST`**</mark> /payments/payments

**Body parameters - Request**

<table data-full-width="false"><thead><tr><th>Name</th><th>Location</th><th>Type</th><th>Format / Values</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>correlation_id</td><td>body</td><td>string</td><td>Up to 100 characters. Alphanumeric, hyphens, and underscores recommended.</td><td>Your own reference ID for this payment. Use it to link Papaya's payment records to your internal system (e.g. your payroll run ID, invoice number, or row reference).</td><td> </td></tr><tr><td>description</td><td>body</td><td>string</td><td> </td><td>The remittance info to send as part of the payment</td><td> </td></tr><tr><td>purpose</td><td>body</td><td>string</td><td>/^([A-Z]{4})$/</td><td>the purpose of the payment as a 4 letter iso-20022 code. see: &#x3C;<a href="https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets"><img src="https://www.iso20022.org/themes/custom/iso20022_theme/images/favicon/favicon-32x32.png" alt="">External code sets | ISO20022</a></td><td>No, defaults to <code>SALA</code></td></tr><tr><td>source</td><td>body</td><td>object</td><td> </td><td> </td><td>Yes</td></tr><tr><td>source.type</td><td>body</td><td>string</td><td>group</td><td>type of source (must be group)</td><td> </td></tr><tr><td>source.id</td><td>body</td><td>string</td><td> </td><td> </td><td>Yes</td></tr><tr><td>target</td><td>body</td><td>object</td><td> </td><td> </td><td>Yes</td></tr><tr><td>target.type</td><td>body</td><td>string</td><td>contact</td><td> </td><td> </td></tr><tr><td>target.id</td><td>body</td><td>string</td><td> </td><td>The id of the target entity (beneficiary)</td><td>Yes</td></tr><tr><td>approved</td><td>body</td><td>boolean</td><td> </td><td>Set to true to mark the payment as approved and ready to be executed</td><td> </td></tr><tr><td>amount</td><td>body</td><td>object</td><td> </td><td>Specifies the amount of the payment</td><td>Yes</td></tr><tr><td>amount.type</td><td>body</td><td>string</td><td>LAND, SEND</td><td>Does the amount refer to the amount credited (LAND), or the amount debited (SEND)</td><td> </td></tr><tr><td>amount.amount</td><td>body</td><td>number</td><td> </td><td>The amount (up to 3 decimal points)</td><td>Yes</td></tr><tr><td>amount.currency</td><td>body</td><td>string</td><td>/^[A-Z]{3}$/</td><td>If the amount currency is different than the sender (for SEND) or target (for LAND), specify the 3 letter ISO currency code of the payment</td><td> </td></tr><tr><td>execution</td><td>body</td><td>object</td><td> </td><td>specifies info for the executing date</td><td>Yes</td></tr><tr><td>execution.type</td><td>body</td><td>string</td><td>SEND, LAND</td><td>Does the date refer to the date the funds should arrive (LAND) or the date the funds should be sent (SEND), defaults to amount.type (future support)</td><td> </td></tr><tr><td>execution.date</td><td>body</td><td>string</td><td>date-time</td><td>The date this payment should be sent on (for SEND payments) or the date this payment should arrive by (for LAND payments)</td><td>Yes</td></tr><tr><td>execution.margin</td><td>body</td><td>integer</td><td> </td><td>number of hours before execution date, this payment may be sent if funds exist</td><td> </td></tr><tr><td>final</td><td>body</td><td>object</td><td> </td><td>Properties describing the finalization of this payment details</td><td> </td></tr><tr><td>final.is_final</td><td>body</td><td>boolean</td><td> </td><td>is the amount final</td><td> </td></tr><tr><td>final.expected</td><td>body</td><td>string</td><td>date-time</td><td>If the amount is not final yet, when is the final amount expected</td><td> </td></tr><tr><td>attachments</td><td>body</td><td>array</td><td>object</td><td>List of files to attach to the payment</td><td> </td></tr><tr><td>attachments[].id</td><td>body</td><td>string</td><td> </td><td>a unique id to give the attachment</td><td> </td></tr><tr><td>attachments[].title</td><td>body</td><td>string</td><td> </td><td>A title to give the attachment</td><td> </td></tr><tr><td>attachments[].url</td><td>body</td><td>string</td><td> </td><td>a url link to the attachment</td><td>Yes</td></tr><tr><td>user_tags</td><td>body</td><td>object</td><td> </td><td>A set of key/value pairs to tag the payment with</td><td> </td></tr></tbody></table>

**Body parameters -** **Response**

| Name                  | Type                       | Format / Values                                                       | Description                                                                                                                                                                                                                                                                            |
| --------------------- | -------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| correlation\_id       | string                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| amount                | object                     |                                                                       | Specifies the amount of the payment                                                                                                                                                                                                                                                    |
| amount.type           | string                     | LAND, SEND                                                            | Does the amount refer to the amount credited (LAND), or the amount debited (SEND)                                                                                                                                                                                                      |
| amount.amount         | number                     |                                                                       | The amount (up to 3 decimal points)                                                                                                                                                                                                                                                    |
| amount.currency       | string                     | /^\[A-Z]{3}$/                                                         | If the amount currency is different than the sender (for SEND) or target (for LAND), specify the 3 letter ISO currency code of the payment                                                                                                                                             |
| approved              | boolean                    |                                                                       | Has this payment been approved and ready for execution                                                                                                                                                                                                                                 |
| attachments           | array                      | object                                                                | List of files to attach to the payment                                                                                                                                                                                                                                                 |
| attachments\[]        | object                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| attachments\[].id     | string                     |                                                                       | a unique id to give the attachment                                                                                                                                                                                                                                                     |
| attachments\[].title  | string                     |                                                                       | A title to give the attachment                                                                                                                                                                                                                                                         |
| attachments\[].url    | string                     |                                                                       | a url link to the attachment                                                                                                                                                                                                                                                           |
| description           | string                     |                                                                       | The remittence info to send as part of the payment                                                                                                                                                                                                                                     |
| execution             | object                     |                                                                       | specifies info for the executing date                                                                                                                                                                                                                                                  |
| execution.type        | string                     | SEND, LAND                                                            | Does the date refer to the date the funds should arrive (LAND) or the date the funds should be sent (SEND), defaults to amount.type (future support)                                                                                                                                   |
| execution.date        | string                     | date-time                                                             | The date this payment should be sent on (for SEND payments) or the date this payment should arrive by (for LAND payments)                                                                                                                                                              |
| execution.margin      | integer                    |                                                                       | number of hours before execution date, this payment may be sent if funds exist                                                                                                                                                                                                         |
| final                 | object                     |                                                                       | Properties describing the finalization of this payment details                                                                                                                                                                                                                         |
| final.is\_final       | boolean                    |                                                                       | is the amount final                                                                                                                                                                                                                                                                    |
| final.expected        | string                     | date-time                                                             | If the amount is not final yet, when is the final amount expected                                                                                                                                                                                                                      |
| id                    | string                     |                                                                       | The unique id of the payment                                                                                                                                                                                                                                                           |
| info                  | object                     |                                                                       | Extra info on the payment and its execution                                                                                                                                                                                                                                            |
| info.status           | PaymentRequestStatusEnum   | PENDING, COMPLETED, FAILED, PROCESSING, PARTIAL, CANCELLED, PROCESSED | The current payment status                                                                                                                                                                                                                                                             |
| info.credit           | object                     |                                                                       | If the payment has been processed, holds the amount credited                                                                                                                                                                                                                           |
| info.credit.currency  | string                     | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be credited in                                                                                                                                                                                                                        |
| info.credit.amount    | number                     |                                                                       | The amount credited                                                                                                                                                                                                                                                                    |
| info.funding          | object                     |                                                                       | If the payment has not been processed yet, holds information about the funding requirments                                                                                                                                                                                             |
| info.funding.currency | string                     | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this amount is to be funded in                                                                                                                                                                                                                          |
| info.funding.amount   | number                     |                                                                       | The amount required to fund                                                                                                                                                                                                                                                            |
| info.funding.date     | string                     | date-time                                                             | The date the funding amount must arrive in the wallet by for this payment to execute on time                                                                                                                                                                                           |
| info.debit            | object                     |                                                                       | The amount to be debited to wallet                                                                                                                                                                                                                                                     |
| info.debit.currency   | string                     | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be debited in                                                                                                                                                                                                                         |
| info.debit.amount     | number                     |                                                                       | The amount debited                                                                                                                                                                                                                                                                     |
| info.rate             | number                     |                                                                       | FX rate applied to this payment (when cross currency)                                                                                                                                                                                                                                  |
| info.fees             | number                     |                                                                       | Total amount (in debiting currency) of the debited amount collected as a transactional fee                                                                                                                                                                                             |
| purpose               | string                     | /^\[A-Z]{4}$/                                                         | the purpose of the payment as a 4 letter iso-20022 code. see: <[![](https://www.iso20022.org/themes/custom/iso20022_theme/images/favicon/favicon-32x32.png)External code sets \| ISO20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets) |
| source                | PaymentRequestMethodEntity |                                                                       | source method                                                                                                                                                                                                                                                                          |
| source.id             | string                     |                                                                       | the id of the entity                                                                                                                                                                                                                                                                   |
| source.type           | string                     |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| target                | object                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| target.type           | string                     |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| target.id             | string                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| type                  | string                     | payment                                                               | entity type (payment)                                                                                                                                                                                                                                                                  |
| user\_tags            | object                     |                                                                       | A set of key/value pairs to tag the payment with                                                                                                                                                                                                                                       |

**Request Example**

```json
POST /payments/payments
{
   "target": {
      "id": "1"
   },
   "source": {
      "id": "1573c466-53ba-46e7-a7f2-b6d49c79716b"
   },
   "amount": {
      "type": "LAND",
      "amount": 7000
   },
   "execution": {
      "date": "2024-03-02T09:09:51.508859936Z"
   },
   "final": {
      "is_final": true
   },
   "approved": true
}
```

**Response Examples**

{% tabs %}
{% tab title="202 - Accepted" %}

```json
{
   "id": "NaxRjIDrRueABiPN-VSkOg",
   "correlation_id": "c7c15eb4-8536-4d0b-be81-3bdcbf8bddba",
   "purpose": "SALA",
   "source": {
      "id": "1573c466-53ba-46e7-a7f2-b6d49c79716b",
      "type": "group"
   },
   "target": {
      "type": "contact",
      "id": "93219-370c-4567-ab57-dc40d9c78294"
   },
   "info": {
      "funding": {
         "currency": "USD",
         "amount": 7000
      },
      "status": "PENDING",
      "credit": {
         "currency": "USD",
         "amount": 7000
      },
      "fees": 0
   },
   "amount": {
      "type": "LAND",
      "amount": 7000
   },
   "execution": {
      "date": "2024-03-02T09:09:51Z"
   },
   "final": {
      "is_final": true
   },
   "attachments": [],
   "approved": true,
   "user_tags": {}
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}

&#x20;


# Update Payment Instructions

The API updates existing payment instructions (or creates them with an explicit ID).

<mark style="color:orange;">**`PUT`**</mark> /payments/payments/{id}

**Body parameters - Request**

| Name                 | Location | Type    | Format / Values | Description                                                                                                                                                                                                                                                                            | Required               |
| -------------------- | -------- | ------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| id                   | Url Path | string  |                 | A unique id for this payment (if none provided, an id will be assigned). Using an existing payment id will update the pending payment                                                                                                                                                  |                        |
| description          | body     | string  |                 | The remittence info to send as part of the payment                                                                                                                                                                                                                                     |                        |
| purpose              | body     | string  | /^(\[A-Z]{4})$/ | the purpose of the payment as a 4 letter iso-20022 code. see: <[![](https://www.iso20022.org/themes/custom/iso20022_theme/images/favicon/favicon-32x32.png)External code sets \| ISO20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets) | No, defaults to `SALA` |
| source               | body     | object  |                 |                                                                                                                                                                                                                                                                                        | Yes                    |
| source.type          | body     | string  | group           | type of source (must be group)                                                                                                                                                                                                                                                         |                        |
| source.id            | body     | string  |                 |                                                                                                                                                                                                                                                                                        | Yes                    |
| target               | body     | object  |                 |                                                                                                                                                                                                                                                                                        | Yes                    |
| target.type          | body     | string  | contact         |                                                                                                                                                                                                                                                                                        |                        |
| target.id            | body     | string  |                 | The id of the target entity (beneficiary)                                                                                                                                                                                                                                              | Yes                    |
| approved             | body     | boolean |                 | Set to true to mark the payment as approved and ready to be executed                                                                                                                                                                                                                   |                        |
| amount               | body     | object  |                 | Specifies the amount of the payment                                                                                                                                                                                                                                                    | Yes                    |
| amount.type          | body     | string  | LAND, SEND      | Does the amount refer to the amount credited (LAND), or the amount debited (SEND)                                                                                                                                                                                                      |                        |
| amount.amount        | body     | number  |                 | The amount (up to 3 decimal points)                                                                                                                                                                                                                                                    | Yes                    |
| amount.currency      | body     | string  | /^\[A-Z]{3}$/   | If the amount currency is different than the sender (for SEND) or target (for LAND), specify the 3 letter ISO currency code of the payment                                                                                                                                             |                        |
| execution            | body     | object  |                 | specifies info for the executing date                                                                                                                                                                                                                                                  | Yes                    |
| execution.type       | body     | string  | SEND, LAND      | Does the date refer to the date the funds should arrive (LAND) or the date the funds should be sent (SEND), defaults to amount.type (future support)                                                                                                                                   |                        |
| execution.date       | body     | string  | date-time       | The date this payment should be sent on (for SEND payments) or the date this payment should arrive by (for LAND payments)                                                                                                                                                              | Yes                    |
| execution.margin     | body     | integer |                 | number of hours before execution date, this payment may be sent if funds exist                                                                                                                                                                                                         |                        |
| final                | body     | object  |                 | Properties describing the finalization of this payment details                                                                                                                                                                                                                         |                        |
| final.is\_final      | body     | boolean |                 | is the amount final                                                                                                                                                                                                                                                                    |                        |
| final.expected       | body     | string  | date-time       | If the amount is not final yet, when is the final amount expected                                                                                                                                                                                                                      |                        |
| attachments          | body     | array   | object          | List of files to attach to the payment                                                                                                                                                                                                                                                 |                        |
| attachments\[].id    | body     | string  |                 | a unique id to give the attachment                                                                                                                                                                                                                                                     |                        |
| attachments\[].title | body     | string  |                 | A title to give the attachment                                                                                                                                                                                                                                                         |                        |
| attachments\[].url   | body     | string  |                 | a url link to the attachment                                                                                                                                                                                                                                                           | Yes                    |
| user\_tags           | body     | object  |                 | A set of key/value pairs to tag the payment with                                                                                                                                                                                                                                       |                        |

**Body Parameters -** **Response**

| Name                  | Type                       | Format / Values                                                       | Description                                                                                                                                                                                                                                                                            |
| --------------------- | -------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount                | object                     |                                                                       | Specifies the amount of the payment                                                                                                                                                                                                                                                    |
| amount.type           | string                     | LAND, SEND                                                            | Does the amount refer to the amount credited (LAND), or the amount debited (SEND)                                                                                                                                                                                                      |
| amount.amount         | number                     |                                                                       | The amount (up to 3 decimal points)                                                                                                                                                                                                                                                    |
| amount.currency       | string                     | /^\[A-Z]{3}$/                                                         | If the amount currency is different than the sender (for SEND) or target (for LAND), specify the 3 letter ISO currency code of the payment                                                                                                                                             |
| approved              | boolean                    |                                                                       | Has this payment been approved and ready for execution                                                                                                                                                                                                                                 |
| attachments           | array                      | object                                                                | List of files to attach to the payment                                                                                                                                                                                                                                                 |
| attachments\[]        | object                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| attachments\[].id     | string                     |                                                                       | a unique id to give the attachment                                                                                                                                                                                                                                                     |
| attachments\[].title  | string                     |                                                                       | A title to give the attachment                                                                                                                                                                                                                                                         |
| attachments\[].url    | string                     |                                                                       | a url link to the attachment                                                                                                                                                                                                                                                           |
| description           | string                     |                                                                       | The remittence info to send as part of the payment                                                                                                                                                                                                                                     |
| execution             | object                     |                                                                       | specifies info for the executing date                                                                                                                                                                                                                                                  |
| execution.type        | string                     | SEND, LAND                                                            | Does the date refer to the date the funds should arrive (LAND) or the date the funds should be sent (SEND), defaults to amount.type (future support)                                                                                                                                   |
| execution.date        | string                     | date-time                                                             | The date this payment should be sent on (for SEND payments) or the date this payment should arrive by (for LAND payments)                                                                                                                                                              |
| execution.margin      | integer                    |                                                                       | number of hours before execution date, this payment may be sent if funds exist                                                                                                                                                                                                         |
| final                 | object                     |                                                                       | Properties describing the finalization of this payment details                                                                                                                                                                                                                         |
| final.is\_final       | boolean                    |                                                                       | is the amount final                                                                                                                                                                                                                                                                    |
| final.expected        | string                     | date-time                                                             | If the amount is not final yet, when is the final amount expected                                                                                                                                                                                                                      |
| id                    | string                     |                                                                       | The unique id of the payment                                                                                                                                                                                                                                                           |
| info                  | object                     |                                                                       | Extra info on the payment and its execution                                                                                                                                                                                                                                            |
| info.status           | PaymentRequestStatusEnum   | PENDING, COMPLETED, FAILED, PROCESSING, PARTIAL, CANCELLED, PROCESSED | The current payment status                                                                                                                                                                                                                                                             |
| info.credit           | object                     |                                                                       | If the payment has been processed, holds the amount credited                                                                                                                                                                                                                           |
| info.credit.currency  | string                     | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be credited in                                                                                                                                                                                                                        |
| info.credit.amount    | number                     |                                                                       | The amount credited                                                                                                                                                                                                                                                                    |
| info.funding          | object                     |                                                                       | If the payment has not been processed yet, holds information about the funding requirments                                                                                                                                                                                             |
| info.funding.currency | string                     | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this amount is to be funded in                                                                                                                                                                                                                          |
| info.funding.amount   | number                     |                                                                       | The amount required to fund                                                                                                                                                                                                                                                            |
| info.funding.date     | string                     | date-time                                                             | The date the funding amount must arrive in the wallet by for this payment to execute on time                                                                                                                                                                                           |
| info.debit            | object                     |                                                                       | The amount to be debited to wallet                                                                                                                                                                                                                                                     |
| info.debit.currency   | string                     | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be debited in                                                                                                                                                                                                                         |
| info.debit.amount     | number                     |                                                                       | The amount debited                                                                                                                                                                                                                                                                     |
| info.rate             | number                     |                                                                       | FX rate applied to this payment (when cross currency)                                                                                                                                                                                                                                  |
| info.fees             | number                     |                                                                       | Total amount (in debiting currency) of the debited amount collected as a transactional fee                                                                                                                                                                                             |
| purpose               | string                     | /^\[A-Z]{4}$/                                                         | the purpose of the payment as a 4 letter iso-20022 code. see: <[![](https://www.iso20022.org/themes/custom/iso20022_theme/images/favicon/favicon-32x32.png)External code sets \| ISO20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets) |
| source                | PaymentRequestMethodEntity |                                                                       | source method                                                                                                                                                                                                                                                                          |
| source.id             | string                     |                                                                       | the id of the entity                                                                                                                                                                                                                                                                   |
| source.type           | string                     |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| target                | object                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| target.type           | string                     |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| target.id             | string                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| type                  | string                     | payment                                                               | entity type (payment)                                                                                                                                                                                                                                                                  |
| user\_tags            | object                     |                                                                       | A set of key/value pairs to tag the payment with                                                                                                                                                                                                                                       |

**Request Example**

```json
PUT /payments/payments/NaxRjIDrRueABiPN-VSkOg
{
   "target": {
      "id": "1"
   },
   "source": {
      "id": "1573c466-53ba-46e7-a7f2-b6d49c79716b"
   },
   "amount": {
      "type": "LAND",
      "amount": 7000
   },
   "execution": {
      "date": "2024-03-02T09:09:51.508859936Z"
   },
   "final": {
      "is_final": true
   },
   "approved": true
}
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "id": "NaxRjIDrRueABiPN-VSkOg",
   "purpose": "SALA",
   "source": {
      "id": "1573c466-53ba-46e7-a7f2-b6d49c79716b",
      "type": "group"
   },
   "target": {
      "type": "contact",
      "id": "1"
   },
   "info": {
      "funding": {
         "currency": "USD",
         "amount": 7000
      },
      "status": "PENDING",
      "credit": {
         "currency": "USD",
         "amount": 7000
      },
      "fees": 0
   },
   "amount": {
      "type": "LAND",
      "amount": 7000
   },
   "execution": {
      "date": "2024-03-02T09:09:51Z"
   },
   "final": {
      "is_final": true
   },
   "attachments": [],
   "approved": true,
   "user_tags": {}
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}

&#x20;


# Get Payment Details

The API retrieves payment details and fetches comprehensive information by specifying the payment ID.

<mark style="color:blue;">**`GET`**</mark> /payments/payments/\<payment\_id>

**Body Parameters - Request**

| Name           | Location | Type   | Description                  | Required |
| -------------- | -------- | ------ | ---------------------------- | -------- |
| \<payment\_id> | Url path | string | The unique id of the payment | Yes      |

**Body Parameters -** **Response**

| Name                  | Type    | Format / Values                                                       | Description                                                                                                                                                                                                                                                                            |
| --------------------- | ------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Path                  | Type    | Format / Values                                                       | Description                                                                                                                                                                                                                                                                            |
| type                  | string  | payment                                                               | entity type (payment)                                                                                                                                                                                                                                                                  |
| id                    | string  |                                                                       | The unique id of the payment                                                                                                                                                                                                                                                           |
| correlation\_id       | string  |                                                                       | <p>external identifier that you provide to track payments within your own platform or system.<br>It must be unique identifier.</p>                                                                                                                                                     |
| description           | string  |                                                                       | The remittence info to send as part of the payment                                                                                                                                                                                                                                     |
| amount                | object  |                                                                       | Specifies the amount of the payment                                                                                                                                                                                                                                                    |
| amount.type           | string  | LAND, SEND                                                            | Does the amount refer to the amount credited (LAND), or the amount debited (SEND)                                                                                                                                                                                                      |
| amount.amount         | number  |                                                                       | The amount (up to 3 decimal points)                                                                                                                                                                                                                                                    |
| amount.currency       | string  | /^\[A-Z]{3}$/                                                         | If the amount currency is different than the sender (for SEND) or target (for LAND), specify the 3 letter ISO currency code of the payment                                                                                                                                             |
| approved              | boolean |                                                                       | Has this payment been approved and ready for execution                                                                                                                                                                                                                                 |
| execution             | object  |                                                                       | specifies info for the executing date                                                                                                                                                                                                                                                  |
| execution.type        | string  | SEND, LAND                                                            | Does the date refer to the date the funds should arrive (LAND) or the date the funds should be sent (SEND), defaults to amount.type (future support)                                                                                                                                   |
| execution.date        | string  | date-time                                                             | The date this payment should be sent on (for SEND payments) or the date this payment should arrive by (for LAND payments)                                                                                                                                                              |
| execution.margin      | integer |                                                                       | number of hours before execution date, this payment may be sent if funds exist                                                                                                                                                                                                         |
| final                 | object  |                                                                       | Properties describing the finalization of this payment details                                                                                                                                                                                                                         |
| final.is\_final       | boolean |                                                                       | is the amount final                                                                                                                                                                                                                                                                    |
| final.expected        | string  | date-time                                                             | If the amount is not final yet, when is the final amount expected                                                                                                                                                                                                                      |
| purpose               | string  | /^\[A-Z]{4}$/                                                         | the purpose of the payment as a 4 letter iso-20022 code. see: <[![](https://www.iso20022.org/themes/custom/iso20022_theme/images/favicon/favicon-32x32.png)External code sets \| ISO20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets) |
| source                | object  |                                                                       | source method                                                                                                                                                                                                                                                                          |
| source.type           | string  |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| source.id             | string  |                                                                       | the id of the entity                                                                                                                                                                                                                                                                   |
| target                | object  |                                                                       |                                                                                                                                                                                                                                                                                        |
| target.type           | string  |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| target.id             | string  |                                                                       |                                                                                                                                                                                                                                                                                        |
| attachments           | array   | object                                                                | List of files to attach to the payment                                                                                                                                                                                                                                                 |
| attachments\[]        | object  |                                                                       |                                                                                                                                                                                                                                                                                        |
| attachments\[].id     | string  |                                                                       | a unique id to give the attachment                                                                                                                                                                                                                                                     |
| attachments\[].title  | string  |                                                                       | A title to give the attachment                                                                                                                                                                                                                                                         |
| attachments\[].url    | string  |                                                                       | a url link to the attachment                                                                                                                                                                                                                                                           |
| user\_tags            | object  |                                                                       | A set of key/value pairs to tag the payment with                                                                                                                                                                                                                                       |
| info                  | object  |                                                                       | Extra info on the payment and its execution                                                                                                                                                                                                                                            |
| info.status           | string  | PENDING, COMPLETED, FAILED, PROCESSING, PARTIAL, CANCELLED, PROCESSED | <p>The current payment status </p><p><strong>Final Statuses are: FAILED, CANCELLED, COMPLETED\*\*</strong></p>                                                                                                                                                                         |
| info.credit           | object  |                                                                       | If the payment has been processed, holds the amount credited                                                                                                                                                                                                                           |
| info.credit.currency  | string  | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be credited in                                                                                                                                                                                                                        |
| info.credit.amount    | number  |                                                                       | The amount credited                                                                                                                                                                                                                                                                    |
| info.funding          | object  |                                                                       | If the payment has not been processed yet, holds information about the funding requirments                                                                                                                                                                                             |
| info.funding.currency | string  | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this amount is to be funded in                                                                                                                                                                                                                          |
| info.funding.amount   | number  |                                                                       | The amount required to fund                                                                                                                                                                                                                                                            |
| info.funding.date     | string  | date-time                                                             | The date the funding amount must arrive in the wallet by for this payment to execute on time                                                                                                                                                                                           |
| info.debit            | object  |                                                                       | The amount to be debited to wallet                                                                                                                                                                                                                                                     |
| info.debit.currency   | string  | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be debited in                                                                                                                                                                                                                         |
| info.debit.amount     | number  |                                                                       | The amount debited                                                                                                                                                                                                                                                                     |
| info.rate             | number  |                                                                       | FX rate applied to this payment (when cross currency)                                                                                                                                                                                                                                  |
| info.fees             | number  |                                                                       | Total amount (in debiting currency) of the debited amount collected as a transactional fee                                                                                                                                                                                             |

**\*\*Note:**\
&#x20;In rare cases, COMPLETED may revert to FAILED due to non local routes

**Request Example**

```json
GET /payments/payments/?id=B0qwukFqSYadoPz6T_8C2A
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "id": "B0qwukFqSYadoPz6T_8C2A",
   "purpose": "SALA",
   "source": {
      "id": "1573c466-53ba-46e7-a7f2-b6d49c79716b",
      "type": "group"
   },
   "target": {
      "type": "contact",
      "id": "18"
   },
   "info": {
      "funding": {
         "date": "2024-03-04T09:09:51Z",
         "currency": "USD",
         "amount": 6675.5001
      },
      "status": "PENDING",
      "credit": {
         "currency": "GBP",
         "amount": 5000
      },
      "rate": 0.74900755,
      "fees": 0
   },
   "amount": {
      "type": "LAND",
      "amount": 5000
   },
   "execution": {
      "date": "2024-03-05T09:09:51Z"
   },
   "final": {
      "is_final": true,
      "expected": "2024-03-04T09:09:51Z"
   },
   "attachments": [],
   "approved": true,
   "user_tags": {}
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}

&#x20;


# Get Payments List

The API retrieves payment details and summarizes and fetches comprehensive information about all payments associated with the organization account with optional filters. Results are paginated, with a default list limit of 50 results.

<mark style="color:blue;">**`GET`**</mark> /payments/payments

**Body Parameters - Request**

| Name             | Location      | Type           | Format / Values      | Description                                                                                                                                                                                                                                                                            | Example                                          |
| ---------------- | ------------- | -------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| id               | Url parameter | array          | string               | Payment request id's                                                                                                                                                                                                                                                                   |                                                  |
| description      | Url parameter | string         |                      | Description substring                                                                                                                                                                                                                                                                  |                                                  |
| request\_until   | Url parameter | string         | date-time            | Request End Date                                                                                                                                                                                                                                                                       |                                                  |
| request\_from    | Url parameter | string         | date-time            | Request Start Date                                                                                                                                                                                                                                                                     |                                                  |
| funding\_until   | Url parameter | string         | date-time            | Funding End Date                                                                                                                                                                                                                                                                       |                                                  |
| funding\_from    | Url parameter | string         | date-time            | Funding Start Date                                                                                                                                                                                                                                                                     |                                                  |
| execution\_until | Url parameter | string         | date-time            | Execution End Date                                                                                                                                                                                                                                                                     |                                                  |
| execution\_from  | Url parameter | string         | date-time            | Execution Start Date                                                                                                                                                                                                                                                                   |                                                  |
| amount\_type     | Url parameter | AmountTypeEnum | SEND, LAND           | Amount type LAND/SEND                                                                                                                                                                                                                                                                  |                                                  |
| approved         | Url parameter | boolean        |                      | return only payment requests that are approved (true) or not approved (false), don't send to return both                                                                                                                                                                               |                                                  |
| final            | Url parameter | boolean        |                      | return only payment requests that are final (true) or not final (false), don't send to return both                                                                                                                                                                                     |                                                  |
| has\_issues      | Url parameter | boolean        |                      | return only payment requests that have issues (true) or have no issues (false), don't send to return both                                                                                                                                                                              |                                                  |
| purpose          | Url parameter | array          | string:/^\[A-Z]{4}$/ | the purpose of the payment as a 4 letter iso-20022 code. see: <[![](https://www.iso20022.org/themes/custom/iso20022_theme/images/favicon/favicon-32x32.png)External code sets \| ISO20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets) |                                                  |
| source           | Url parameter | string         |                      | Return payment requests only from specific group                                                                                                                                                                                                                                       |                                                  |
| filters.status   | Url parameter | array          | string               | Return only payment requests with specific status's                                                                                                                                                                                                                                    |                                                  |
| tag              | Url parameter | array          | tag:name={value}     | A list of tags and their values to filter by                                                                                                                                                                                                                                           | `?tag:department=sales&tag:department=marketing` |
| target           | Url parameter | string         |                      | target method                                                                                                                                                                                                                                                                          |                                                  |
| skip             | Url parameter | integer        |                      |                                                                                                                                                                                                                                                                                        |                                                  |
| take             | Url parameter | integer        |                      |                                                                                                                                                                                                                                                                                        |                                                  |

**Body Parameters -** **Response**

| Name                           | Type                       | Format / Values                                                       | Description                                                                                                                                                                                                                                                                            |
| ------------------------------ | -------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| items                          | array                      | object                                                                |                                                                                                                                                                                                                                                                                        |
| items\[]                       | object                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| items\[].type                  | string                     | payment                                                               | entity type (payment)                                                                                                                                                                                                                                                                  |
| items\[].id                    | string                     |                                                                       | The unique id of the payment                                                                                                                                                                                                                                                           |
| items\[].correlation\_id       | string                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| items\[].description           | string                     |                                                                       | The remittence info to send as part of the payment                                                                                                                                                                                                                                     |
| items\[].amount                | object                     |                                                                       | Specifies the amount of the payment                                                                                                                                                                                                                                                    |
| items\[].amount.type           | string                     | LAND, SEND                                                            | Does the amount refer to the amount credited (LAND), or the amount debited (SEND)                                                                                                                                                                                                      |
| items\[].amount.amount         | number                     |                                                                       | The amount (up to 3 decimal points)                                                                                                                                                                                                                                                    |
| items\[].amount.currency       | string                     | /^\[A-Z]{3}$/                                                         | If the amount currency is different than the sender (for SEND) or target (for LAND), specify the 3 letter ISO currency code of the payment                                                                                                                                             |
| items\[].approved              | boolean                    |                                                                       | Has this payment been approved and ready for execution                                                                                                                                                                                                                                 |
| items\[].execution             | object                     |                                                                       | specifies info for the executing date                                                                                                                                                                                                                                                  |
| items\[].execution.type        | string                     | SEND, LAND                                                            | Does the date refer to the date the funds should arrive (LAND) or the date the funds should be sent (SEND), defaults to amount.type (future support)                                                                                                                                   |
| items\[].execution.date        | string                     | date-time                                                             | The date this payment should be sent on (for SEND payments) or the date this payment should arrive by (for LAND payments)                                                                                                                                                              |
| items\[].execution.margin      | integer                    |                                                                       | number of hours before execution date, this payment may be sent if funds exist                                                                                                                                                                                                         |
| items\[].final                 | object                     |                                                                       | Properties describing the finalization of this payment details                                                                                                                                                                                                                         |
| items\[].final.is\_final       | boolean                    |                                                                       | is the amount final                                                                                                                                                                                                                                                                    |
| items\[].final.expected        | string                     | date-time                                                             | If the amount is not final yet, when is the final amount expected                                                                                                                                                                                                                      |
| items\[].purpose               | string                     | /^\[A-Z]{4}$/                                                         | the purpose of the payment as a 4 letter iso-20022 code. see: <[![](https://www.iso20022.org/themes/custom/iso20022_theme/images/favicon/favicon-32x32.png)External code sets \| ISO20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets) |
| items\[].source                | PaymentRequestMethodEntity |                                                                       | source method                                                                                                                                                                                                                                                                          |
| items\[].source.type           | string                     |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| items\[].source.id             | string                     |                                                                       | the id of the entity                                                                                                                                                                                                                                                                   |
| items\[].target                | object                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| target.type                    | string                     |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| items\[].target.id             | string                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| items\[].attachments           | array                      | object                                                                | List of files to attach to the payment                                                                                                                                                                                                                                                 |
| items\[].attachments\[]        | object                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| items\[].attachments\[].id     | string                     |                                                                       | a unique id to give the attachment                                                                                                                                                                                                                                                     |
| items\[].attachments\[].title  | string                     |                                                                       | A title to give the attachment                                                                                                                                                                                                                                                         |
| items\[].attachments\[].url    | string                     |                                                                       | a url link to the attachment                                                                                                                                                                                                                                                           |
| items\[].user\_tags            | object                     |                                                                       | A set of key/value pairs to tag the payment with                                                                                                                                                                                                                                       |
| items\[].info                  | object                     |                                                                       | Extra info on the payment and its execution                                                                                                                                                                                                                                            |
| items\[].info.status           | PaymentRequestStatusEnum   | PENDING, COMPLETED, FAILED, PROCESSING, PARTIAL, CANCELLED, PROCESSED | The current payment status                                                                                                                                                                                                                                                             |
| items\[].info.credit           | object                     |                                                                       | If the payment has been processed, holds the amount credited                                                                                                                                                                                                                           |
| items\[].info.credit.currency  | string                     | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be credited in                                                                                                                                                                                                                        |
| items\[].info.credit.amount    | number                     |                                                                       | The amount credited                                                                                                                                                                                                                                                                    |
| items\[].info.funding          | object                     |                                                                       | If the payment has not been processed yet, holds information about the funding requirments                                                                                                                                                                                             |
| items\[].info.funding.currency | string                     | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this amount is to be funded in                                                                                                                                                                                                                          |
| items\[].info.funding.amount   | number                     |                                                                       | The amount required to fund                                                                                                                                                                                                                                                            |
| items\[].info.funding.date     | string                     | date-time                                                             | The date the funding amount must arrive in the wallet by for this payment to execute on time                                                                                                                                                                                           |
| items\[].info.debit            | object                     |                                                                       | The amount to be debited to wallet                                                                                                                                                                                                                                                     |
| items\[].info.debit.currency   | string                     | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be debited in                                                                                                                                                                                                                         |
| items\[].info.debit.amount     | number                     |                                                                       | The amount debited                                                                                                                                                                                                                                                                     |
| items\[].info.rate             | number                     |                                                                       | FX rate applied to this payment (when cross currency)                                                                                                                                                                                                                                  |
| items\[].info.fees             | number                     |                                                                       | Total amount (in debiting currency) of the debited amount collected as a transactional fee                                                                                                                                                                                             |
| paging                         | Paging                     |                                                                       |                                                                                                                                                                                                                                                                                        |
| paging.skip                    | integer                    |                                                                       |                                                                                                                                                                                                                                                                                        |
| paging.take                    | integer                    |                                                                       |                                                                                                                                                                                                                                                                                        |

**Request Example**

```json
GET /payments/payments?take=3
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "items": [
      {
         "id": "0Il4BnTWQbyDVCBLxYuw5A",
         "purpose": "SALA",
         "source": {
            "id": "4990e5e9-347a-48ed-b4c6-b0ef19d39a24",
            "type": "group"
         },
         "target": {
            "type": "contact",
            "id": "16"
         },
         "info": {
            "funding": {
               "date": "2024-02-28T09:09:51Z",
               "currency": "GBP",
               "amount": 4504.01292
            },
            "status": "PENDING",
            "credit": {
               "currency": "EUR",
               "amount": 5000
            },
            "rate": 1.11012115,
            "fees": 0
         },
         "amount": {
            "type": "LAND",
            "amount": 5000
         },
         "execution": {
            "date": "2024-03-02T09:09:51Z"
         },
         "final": {
            "is_final": true,
            "expected": "2024-02-28T09:09:51Z"
         },
         "attachemnts": [],
         "approved": true,
         "user_tags": {}
      },
      {
         "id": "1ayA-gyQSSySsCpX-03Q3Q",
         "purpose": "SALA",
         "source": {
            "id": "4990e5e9-347a-48ed-b4c6-b0ef19d39a24",
            "type": "group"
         },
         "target": {
            "type": "contact",
            "id": "5"
         },
         "info": {
            "funding": {
               "date": "2024-02-28T05:00:00Z",
               "currency": "GBP",
               "amount": 4163.26254
            },
            "status": "PENDING",
            "credit": {
               "currency": "USD",
               "amount": 5000
            },
            "rate": 1.20477008,
            "fees": 13.09306
         },
         "amount": {
            "type": "LAND",
            "amount": 5000
         },
         "execution": {
            "date": "2024-03-02T09:09:51Z"
         },
         "final": {
            "is_final": true,
            "expected": "2024-02-28T05:00:00Z"
         },
         "attachemnts": [],
         "approved": true,
         "user_tags": {}
      },
      {
         "id": "25dnoBmXRPyqkjV5WX4nsA",
         "purpose": "SALA",
         "source": {
            "id": "4990e5e9-347a-48ed-b4c6-b0ef19d39a24",
            "type": "group"
         },
         "target": {
            "type": "contact",
            "id": "3"
         },
         "info": {
            "funding": {
               "date": "2024-02-28T05:00:00Z",
               "currency": "GBP",
               "amount": 8313.43201
            },
            "status": "PENDING",
            "credit": {
               "currency": "USD",
               "amount": 10000
            },
            "rate": 1.20477008,
            "fees": 13.09306
         },
         "amount": {
            "type": "LAND",
            "amount": 10000
         },
         "execution": {
            "date": "2024-03-02T09:09:51Z"
         },
         "final": {
            "is_final": true,
            "expected": "2024-02-28T05:00:00Z"
         },
         "attachemnts": [],
         "approved": true,
         "user_tags": {}
      }
   ],
   "paging": {
      "take": 3,
      "skip": 0
   }
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}

&#x20;


# Approve Payment Instructions

The API authorizes one or more forthcoming payment instructions by specifying their IDs. It also enables you to transfer funds to the registered beneficiaries.

<mark style="color:yellow;">**`PATCH`**</mark> /payments/payments/approve?id=\<payment\_id>

**Body Parameters - Request**

| Name | Location      | Type   | Format / Values | Description               | Required |
| ---- | ------------- | ------ | --------------- | ------------------------- | -------- |
| id   | url parameter | string | true/false      | the payment id to approve | Yes      |

**Body Parameters -** **Response**

| Name                     | Type   | Format / Values | Description                                                                                                                                                                            |
| ------------------------ | ------ | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| items                    | array  | object          | List of items affected                                                                                                                                                                 |
| items\[]                 | object |                 |                                                                                                                                                                                        |
| items\[].type            | string |                 | type of entity (payment)                                                                                                                                                               |
| items\[].id              | string |                 | id of payment                                                                                                                                                                          |
| items\[].correlation\_id | string |                 | <p>correlation\_id is an external identifier that you provide to track payments within your own platform or system.<br>it must be unique identifier else the API request will fail</p> |
| items\[].result          | string |                 | Action result                                                                                                                                                                          |

**Request Example**

```json
PATCH /payments/payments/approve?id=pbM_VHmEQy6-ez_SrZiaDA&id=awrJqByRRdmEBXSWRr_elg

```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "items": [
      {
         "result": "Approved Successfully",
         "id": "pbM_VHmEQy6-ez_SrZiaDA",
         "type": "payment"
      },
      {
         "result": "Approved Successfully",
         "id": "awrJqByRRdmEBXSWRr_elg",
         "type": "payment"
      }
   ]
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}

&#x20;


# UnApprove Payment Instructions

The API removes approval (one or more) forthcoming payment instructions by specifying the payment instructions' IDs.

<mark style="color:red;">**`DELETE`**</mark> /payments/payments/approve?id=\<payment\_id>

**Body Parameters - Request**

| Name | Location      | Type   | Description               | Required |
| ---- | ------------- | ------ | ------------------------- | -------- |
| id   | url parameter | string | the payment id to approve | Yes      |

**Body Parameters -** **Response**

| Name                     | Type   | Format / Values | Description                                                                                                                                                                            |
| ------------------------ | ------ | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| items                    | array  | object          | List of items affected                                                                                                                                                                 |
| items\[]                 | object |                 |                                                                                                                                                                                        |
| items\[].type            | string |                 | type of entity (payment)                                                                                                                                                               |
| items\[].id              | string |                 | id of payment                                                                                                                                                                          |
| items\[].correlation\_id | string |                 | <p>correlation\_id is an external identifier that you provide to track payments within your own platform or system.<br>it must be unique identifier else the API request will fail</p> |
| items\[].result          | string |                 | Action result                                                                                                                                                                          |

**Request Example**

```json
POST /payments/payments/approve?id=awrJqByRRdmEBXSWRr_elg
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "id": "awrJqByRRdmEBXSWRr_elg",
   "purpose": "SALA",
   "source": {
      "id": "1573c466-53ba-46e7-a7f2-b6d49c79716b",
      "type": "group"
   },
   "target": {
      "type": "contact",
      "id": "9"
   },
   "info": {
      "debit": {
         "currency": "USD",
         "amount": 3456.98431
      },
      "status": "PROCESSING",
      "credit": {
         "currency": "AUD",
         "amount": 5000
      },
      "rate": 1.44634732,
      "fees": 0
   },
   "amount": {
      "type": "LAND",
      "amount": 5000
   },
   "execution": {
      "date": "2024-03-10T09:09:51Z"
   },
   "final": {
      "is_final": true,
      "expected": "2024-03-06T05:00:00Z"
   },
   "attachments": [],
   "approved": true,
   "user_tags": {}
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}

&#x20;


# Execute Payment Instructions

The API immediately executes a payment request to the authorized beneficiary by specifying the payment ID.

<mark style="color:green;">**`POST`**</mark> /payments/payments/\<payment\_id>/send

**Body Parameters - Request**

| Name | Location      | Type   | Description               | Required |
| ---- | ------------- | ------ | ------------------------- | -------- |
| id   | url parameter | string | the payment id to execute | Yes      |

**Body Parameters -** **Response**

| Name                  | Type    | Format / Values                                                       | Description                                                                                                                                                                                                                                                                            |
| --------------------- | ------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type                  | string  | payment                                                               | entity type (payment)                                                                                                                                                                                                                                                                  |
| id                    | string  |                                                                       | The unique id of the payment                                                                                                                                                                                                                                                           |
| correlation\_id       | string  |                                                                       | <p>correlation\_id is an external identifier that you provide to track payments within your own platform or system.<br>it must be unique identifier else the API request will fail</p>                                                                                                 |
| description           | string  |                                                                       | The remittence info to send as part of the payment                                                                                                                                                                                                                                     |
| amount                | object  |                                                                       | Specifies the amount of the payment                                                                                                                                                                                                                                                    |
| amount.type           | string  | LAND, SEND                                                            | Does the amount refer to the amount credited (LAND), or the amount debited (SEND)                                                                                                                                                                                                      |
| amount.amount         | number  |                                                                       | The amount (up to 3 decimal points)                                                                                                                                                                                                                                                    |
| amount.currency       | string  | /^\[A-Z]{3}$/                                                         | If the amount currency is different than the sender (for SEND) or target (for LAND), specify the 3 letter ISO currency code of the payment                                                                                                                                             |
| approved              | boolean |                                                                       | Has this payment been approved and ready for execution                                                                                                                                                                                                                                 |
| execution             | object  |                                                                       | specifies info for the executing date                                                                                                                                                                                                                                                  |
| execution.type        | string  | SEND, LAND                                                            | Does the date refer to the date the funds should arrive (LAND) or the date the funds should be sent (SEND), defaults to amount.type (future support)                                                                                                                                   |
| execution.date        | string  | date-time                                                             | The date this payment should be sent on (for SEND payments) or the date this payment should arrive by (for LAND payments)                                                                                                                                                              |
| execution.margin      | integer |                                                                       | number of hours before execution date, this payment may be sent if funds exist                                                                                                                                                                                                         |
| final                 | object  |                                                                       | Properties describing the finalization of this payment details                                                                                                                                                                                                                         |
| final.is\_final       | boolean |                                                                       | is the amount final                                                                                                                                                                                                                                                                    |
| final.expected        | string  | date-time                                                             | If the amount is not final yet, when is the final amount expected                                                                                                                                                                                                                      |
| purpose               | string  | /^\[A-Z]{4}$/                                                         | the purpose of the payment as a 4 letter iso-20022 code. see: <[![](https://www.iso20022.org/themes/custom/iso20022_theme/images/favicon/favicon-32x32.png)External code sets \| ISO20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets) |
| source                | object  |                                                                       | source method                                                                                                                                                                                                                                                                          |
| source.type           | string  |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| source.id             | string  |                                                                       | the id of the entity                                                                                                                                                                                                                                                                   |
| target                | object  |                                                                       |                                                                                                                                                                                                                                                                                        |
| target.type           | string  |                                                                       | the type of the entity                                                                                                                                                                                                                                                                 |
| target.id             | string  |                                                                       |                                                                                                                                                                                                                                                                                        |
| attachments           | array   | object                                                                | List of files to attach to the payment                                                                                                                                                                                                                                                 |
| attachments\[]        | object  |                                                                       |                                                                                                                                                                                                                                                                                        |
| attachments\[].id     | string  |                                                                       | a unique id to give the attachment                                                                                                                                                                                                                                                     |
| attachments\[].title  | string  |                                                                       | A title to give the attachment                                                                                                                                                                                                                                                         |
| attachments\[].url    | string  |                                                                       | a url link to the attachment                                                                                                                                                                                                                                                           |
| user\_tags            | object  |                                                                       | A set of key/value pairs to tag the payment with                                                                                                                                                                                                                                       |
| info                  | object  |                                                                       | Extra info on the payment and its execution                                                                                                                                                                                                                                            |
| info.status           | string  | PENDING, COMPLETED, FAILED, PROCESSING, PARTIAL, CANCELLED, PROCESSED | The current payment status                                                                                                                                                                                                                                                             |
| info.credit           | object  |                                                                       | If the payment has been processed, holds the amount credited                                                                                                                                                                                                                           |
| info.credit.currency  | string  | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be credited in                                                                                                                                                                                                                        |
| info.credit.amount    | number  |                                                                       | The amount credited                                                                                                                                                                                                                                                                    |
| info.funding          | object  |                                                                       | If the payment has not been processed yet, holds information about the funding requirments                                                                                                                                                                                             |
| info.funding.currency | string  | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this amount is to be funded in                                                                                                                                                                                                                          |
| info.funding.amount   | number  |                                                                       | The amount required to fund                                                                                                                                                                                                                                                            |
| info.funding.date     | string  | date-time                                                             | The date the funding amount must arrive in the wallet by for this payment to execute on time                                                                                                                                                                                           |
| info.debit            | object  |                                                                       | The amount to be debited to wallet                                                                                                                                                                                                                                                     |
| info.debit.currency   | string  | /^\[A-Z]{3}$/                                                         | the 3 letter ISO currency code this payment will be debited in                                                                                                                                                                                                                         |
| info.debit.amount     | number  |                                                                       | The amount debited                                                                                                                                                                                                                                                                     |
| info.rate             | number  |                                                                       | FX rate applied to this payment (when cross currency)                                                                                                                                                                                                                                  |
| info.fees             | number  |                                                                       | Total amount (in debiting currency) of the debited amount collected as a transactional fee                                                                                                                                                                                             |

**Request Example**

```json
POST /payments/payments/awrJqByRRdmEBXSWRr_elg/send
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "id": "awrJqByRRdmEBXSWRr_elg",
   "purpose": "SALA",
   "source": {
      "id": "1573c466-53ba-46e7-a7f2-b6d49c79716b",
      "type": "group"
   },
   "target": {
      "type": "contact",
      "id": "9"
   },
   "info": {
      "debit": {
         "currency": "USD",
         "amount": 3456.98431
      },
      "status": "PROCESSING",
      "credit": {
         "currency": "AUD",
         "amount": 5000
      },
      "rate": 1.44634732,
      "fees": 0
   },
   "amount": {
      "type": "LAND",
      "amount": 5000
   },
   "execution": {
      "date": "2024-03-10T09:09:51Z"
   },
   "final": {
      "is_final": true,
      "expected": "2024-03-06T05:00:00Z"
   },
   "attachments": [],
   "approved": true,
   "user_tags": {}
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}

&#x20;


# Bulk Import Payment Instructions

The API is utilized to send bulk payments to authorized beneficiaries.

<mark style="color:green;">**`POST`**</mark> /payments/payments/import

**Body Parameters - Request**

| Name                          | Type    | Format / Values                                                           | Description                                                                                                                                                                                                                                                                            | Required |
| ----------------------------- | ------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| items                         | array   | object                                                                    | List of items to import                                                                                                                                                                                                                                                                |          |
| items\[].id                   | string  |                                                                           | A unique id for this payment (if none provided, an id will be assigned). Using an existing payment id will update the pending payment                                                                                                                                                  |          |
| items\[].correlation\_id      | string  | Up to 100 characters. Alphanumeric, hyphens, and underscores recommended. | <p>correlation\_id is an external identifier that you provide to track payments within your own platform or system.<br>it must be unique identifier else the API request will fail</p>                                                                                                 |          |
| items\[].description          | string  |                                                                           | The remittence info to send as part of the payment                                                                                                                                                                                                                                     |          |
| items\[].signature            | string  |                                                                           |                                                                                                                                                                                                                                                                                        |          |
| items\[].purpose              | string  | /^(\[A-Z]{4})$/                                                           | the purpose of the payment as a 4 letter iso-20022 code. see: <[![](https://www.iso20022.org/themes/custom/iso20022_theme/images/favicon/favicon-32x32.png)External code sets \| ISO20022](https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets) |          |
| items\[].source               | object  |                                                                           |                                                                                                                                                                                                                                                                                        | Yes      |
| items\[].source.type          | string  | group                                                                     | type of source (must be group)                                                                                                                                                                                                                                                         |          |
| items\[].source.id            | string  |                                                                           |                                                                                                                                                                                                                                                                                        | Yes      |
| items\[].target               | object  |                                                                           |                                                                                                                                                                                                                                                                                        | Yes      |
| items\[].target.type          | string  | contact                                                                   |                                                                                                                                                                                                                                                                                        |          |
| items\[].target.id            | string  |                                                                           | The id of the target entity (beneficiary)                                                                                                                                                                                                                                              | Yes      |
| items\[].approved             | boolean |                                                                           | Set to true to mark the payment as approved and ready to be executed                                                                                                                                                                                                                   |          |
| items\[].amount               | object  |                                                                           | Specifies the amount of the payment                                                                                                                                                                                                                                                    | Yes      |
| items\[].amount.type          | string  | LAND, SEND                                                                | Does the amount refer to the amount credited (LAND), or the amount debited (SEND)                                                                                                                                                                                                      |          |
| items\[].amount.amount        | number  |                                                                           | The amount (up to 3 decimal points)                                                                                                                                                                                                                                                    | Yes      |
| items\[].amount.currency      | string  | /^\[A-Z]{3}$/                                                             | If the amount currency is different than the sender (for SEND) or target (for LAND), specify the 3 letter ISO currency code of the payment                                                                                                                                             |          |
| items\[].execution            | object  |                                                                           | specifies info for the executing date                                                                                                                                                                                                                                                  | Yes      |
| items\[].execution.type       | string  | SEND, LAND                                                                | Does the date refer to the date the funds should arrive (LAND) or the date the funds should be sent (SEND), defaults to amount.type (future support)                                                                                                                                   |          |
| items\[].execution.date       | string  | date-time                                                                 | The date this payment should be sent on (for SEND payments) or the date this payment should arrive by (for LAND payments)                                                                                                                                                              | Yes      |
| items\[].execution.margin     | integer |                                                                           | number of hours before execution date, this payment may be sent if funds exist                                                                                                                                                                                                         |          |
| items\[].final                | object  |                                                                           | Properties describing the finalization of this payment details                                                                                                                                                                                                                         |          |
| items\[].final.is\_final      | boolean |                                                                           | is the amount final                                                                                                                                                                                                                                                                    |          |
| items\[].final.expected       | string  | date-time                                                                 | If the amount is not final yet, when is the final amount expected                                                                                                                                                                                                                      |          |
| items\[].attachments          | array   | object                                                                    | List of files to attach to the payment                                                                                                                                                                                                                                                 |          |
| items\[].attachments\[]       | object  |                                                                           |                                                                                                                                                                                                                                                                                        |          |
| items\[].attachments\[].id    | string  |                                                                           | a unique id to give the attachment                                                                                                                                                                                                                                                     |          |
| items\[].attachments\[].title | string  |                                                                           | A title to give the attachment                                                                                                                                                                                                                                                         |          |
| items\[].attachments\[].url   | string  |                                                                           | a url link to the attachment                                                                                                                                                                                                                                                           | Yes      |
| items\[].user\_tags           | object  |                                                                           | A set of key/value pairs to tag the payment with                                                                                                                                                                                                                                       |          |

**Body Parameters -** **Response**

| Name               | Type    | Format / Values | Description                                     |
| ------------------ | ------- | --------------- | ----------------------------------------------- |
| started\_at        | string  | date-time       | The date the job started                        |
| total              | integer |                 | total number of payments in job                 |
| processing         | integer |                 | total number of payments being processed        |
| processed          | integer |                 | total number of payments successfully processed |
| failed             | integer |                 | total number of payments failed                 |
| status             | string  | QUEUED, DONE    | status of job                                   |
| progress           | array   | object          | list of completed items and their status        |
| progress\[]        | object  |                 |                                                 |
| progress\[].id     | string  |                 | id or payment                                   |
| progress\[].status | string  | SUCCESS, FAILED | status of payment creation                      |
| progress\[].row    | string  |                 | index of item in job                            |
| progress\[].error  | object  |                 | error object if any                             |

**Request Example**

```json
POST /payments/payments/import
{
   "items": [
      {
         "target": {
            "id": "20"
         },
         "source": {
            "id": "ba1acd2e-2133-442f-acc4-a74b1b760a04"
         },
         "amount": {
            "type": "LAND",
            "amount": 5000
         },
         "execution": {
            "date": "2024-03-05T09:09:51.509545358Z"
         },
         "final": {
            "is_final": true
         }
      },
      {
         "target": {
            "id": "16"
         },
         "source": {
            "id": "ba1acd2e-2133-442f-acc4-a74b1b760a04"
         },
         "amount": {
            "type": "LAND",
            "amount": 5000
         },
         "execution": {
            "date": "2024-03-02T09:09:51.509426624Z"
         },
         "final": {
            "is_final": true
         }
      }
   ]
}
```

**Response Examples**

{% tabs %}
{% tab title="202 - Accepted" %}

```json
{
   "processed": 0,
   "total": 2,
   "job_id": "76I_SRe9ToeDwSExCGrgtA",
   "started_at": "2024-03-05T21:49:22.444288513Z",
   "processing": 2,
   "progress": [],
   "failed": 0,
   "status": "QUEUED"
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}

&#x20;


# Bulk Import Payment Instructions Status

The bulk Import payment Instructions job status/progress can be obtained using the API.

<mark style="color:blue;">**`GET`**</mark> /payments/payments/import/{job\_id}

**Body Parameters - Request**

| Name    | Location | Type   | Description                    | Required |
| ------- | -------- | ------ | ------------------------------ | -------- |
| job\_id | Url path | string | The job id to fetch status for | Yes      |

**Body Parameters -** **Response**

| Name               | Type    | Format / Values | Description                                           |
| ------------------ | ------- | --------------- | ----------------------------------------------------- |
| job\_id            | string  |                 | The job id assigned to this import                    |
| started\_at        | string  | date-time       | The time the import job started                       |
| completed\_at      | string  | date-time       | The time the import job completed                     |
| processed          | integer |                 | The total number of items processed successfully      |
| total              | integer |                 | Total number of items in bulk                         |
| processing         | integer |                 | The number of items currently being processed         |
| failed             | integer |                 | Total number of failed items                          |
| status             | string  | QUEUED, DONE    | The current job status                                |
| progress           | array   | object          | List of item progress                                 |
| progress\[]        | object  |                 |                                                       |
| progress\[].row    | integer |                 | The index of the item                                 |
| progress\[].error  | object  |                 | Information regarding error encountered for this item |
| progress\[].status | string  | FAILED, SUCCESS | The status of this item's import                      |

**Request Example**

```json
GET /payments/payments/import/76I_SRe9ToeDwSExCGrgtA
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK" %}

```json
{
   "processed": 2,
   "completed_at": "2024-03-05T21:49:23.620174178Z",
   "total": 2,
   "job_id": "76I_SRe9ToeDwSExCGrgtA",
   "processing": 0,
   "started_at": "2024-03-05T21:49:22.444288513Z",
   "progress": [
      {
         "id": "demo:standalone:1709645902::zCrls1r6SbSLmJHRdihevg",
         "row": 0,
         "status": "SUCCESS"
      },
      {
         "id": "demo:standalone:1709645902::lt5Shcn0QquHLVwRDTB0Mw",
         "row": 1,
         "status": "SUCCESS"
      }
   ],
   "failed": 0,
   "status": "DONE"
}
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
{
  "error": "bad_request",
  "description": "Validation errors: {\"type\":\"INDIVIDUAL\",\"id\":\"5SYjAkHqXHW0Z2cqBRW4JAAA\",\"cou... at root failed with \"Missing property org_id\"",
  "error_code": 400
}
```

{% endtab %}
{% endtabs %}

&#x20;


# Cancel Payment

Cancels an existing payment instruction. Only payments in PENDING or FAILED status can be cancelled.

<mark style="color:green;">**`POST`**</mark> /payments/payments/cancel

**Body parameters - Request**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>The payment request ID to be cancelled</td><td> Yes</td></tr><tr><td>cancel_reason</td><td>string</td><td>A reason for the cancellation</td><td></td></tr></tbody></table>

**Body parameters -** **Response**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Unique payment identifier</td></tr><tr><td>correlation_id</td><td>string</td><td>External tracking identifier</td></tr><tr><td>purpose</td><td>string</td><td>4-letter ISO-20022 payment purpose code</td></tr><tr><td>source.type / source.id</td><td>string</td><td>Entity type and ID that originated the payment</td></tr><tr><td>target.type / target.id</td><td>string</td><td>Entity type and ID of the payment recipient</td></tr><tr><td>info.status</td><td>boolean</td><td>Payment status</td></tr><tr><td>info.funding</td><td>object</td><td>Funding currency and amount</td></tr><tr><td>info.credit</td><td>object</td><td>Credited currency and amount</td></tr><tr><td>info.error</td><td>object</td><td>Error details if applicable</td></tr><tr><td>amount.type</td><td>string</td><td>LAND or SEND — whether amount represents credited or debited funds</td></tr><tr><td>amount.amount</td><td>number</td><td>Payment value</td></tr><tr><td>amount.currency</td><td>string</td><td>3-letter ISO currency code</td></tr><tr><td>execution.date</td><td>DateTime</td><td>Scheduled payment execution date</td></tr><tr><td>final.is_final</td><td>boolean</td><td>Indicates whether the amount is final</td></tr><tr><td>attachments</td><td>array</td><td>List of attached documents</td></tr><tr><td>approved</td><td>boolean</td><td>Whether the payment was approved prior to cancellation</td></tr><tr><td>user_tags</td><td>object</td><td>Custom key/value tags associated with the payment</td></tr></tbody></table>

**Request Example**

```json
POST /payments/payments
{
    "id": "b5f5433f-1ede-4623-9e3e-9282b13b7e8b",
    "cancel_reason": "Beneficiary has pending to update bank details."
}
```

**Response Examples**

{% tabs %}
{% tab title="200 - OK Success" %}

```json
{
    "id": "507013::e0132a41-aadc-4eb9-bb9a-3341e542333e::b5f5433f-1ede-4623-9e3e-9282b13b7e8b",
    "correlation_id": "b5f5433f-1ede-4623-9e3e-9282b13b7e8b",
    "purpose": "OTHR",
    "source": {
      "id": "92f8232f-8481-4631-a6d0-cb4a35cce294",
      "type": "group"
    },
    "target": {
      "type": "contact",
      "id": "e0132a41-aadc-4eb9-bb9a-3341e542333e"
    },
    "info": {
      "funding": {
        "currency": "INR",
        "amount": 9876.00000
      },
      "status": "CANCELLED",
      "error": {},
      "credit": {
        "currency": "GBP",
        "amount": 78.73002
      }
    },
    "amount": {
      "type": "LAND",
      "amount": 9876.00,
      "currency": "INR"
    },
    "execution": {
      "date": "2026-03-30T01:00:00Z"
    },
    "final": {
      "is_final": true
    },
    "attachments": [],
    "approved": true,
    "user_tags": {
      "Business": "B2B",
      "Country": "Poland"
    }
  }
```

{% endtab %}

{% tab title="400 - Bad Request" %}

```json
 {
    "error": "bad_request",
    "description": "Schema validation failed: Validation errors: {\"org_id\":\"265030\"}",
    "error_code": 400
  }
```

{% endtab %}

{% tab title="404 - Not Found" %}

```json
 {
    "error": "bad_request",
    "description": "Schema validation failed: Validation errors: {\"org_id\":\"265030\"}",
    "error_code": 400
  }
```

{% endtab %}

{% tab title=" 409 - Conflict" %}

```json
{
    "error": "Cancel Failed",
    "description": "Cancel Failed",
    "error_code": 409
  }
```

{% endtab %}
{% endtabs %}

&#x20;


# Collect Information

The API facilitates gathering information by creating a self-generated URL (secure link).

{% hint style="info" %}
A secure link offers a different approach to gathering data than traditional and manual methods. The secure links are safe and compliant with the Industry Data Security Standards. The solution uses advanced encryption and tokenization technologies to protect customer data and prevent fraud. After the secure links are created, they can be shared with beneficiaries worldwide to collect their data.
{% endhint %}

**How does it work?**

1. The customer initiates an API call using external\_id, country, and currency.
2. The system creates a beneficiary draft and generates a secure link with the token.
3. The customer presents a link to the beneficiary via the website or email.
4. Beneficiary access link.
5. The system validates the token.
6. Beneficiary enters banking details in edit UI.
7. The system saves banking details securely.
8. Notification to the customer via a webhook.
9. The customer checks the data status via API.

<figure><img src="https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2FgOP5vzuEqCXp2axznKNc%2Fimage.png?alt=media&amp;token=1202c8ed-a084-44a7-870a-0e3d6b3bead5" alt=""><figcaption><p>Collect Beneficiary Bank Details Flow</p></figcaption></figure>

<figure><img src="https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fc0JUDJgA3ADGjND3Ddxt%2Fimage-20240414-065037.png?alt=media&amp;token=da6b6413-c3bd-40fa-815c-1ed8a8977da5" alt=""><figcaption><p>Collect Beneficiary Bank Details Form</p></figcaption></figure>


# Collect Beneficiary Bank Details

The API facilitates gathering beneficiary Bank Details by creating a self-generated URL (secure link).

<mark style="color:blue;">**`GET`**</mark> /payments/beneficiaries/{id}/collect

**Body Parameters Request**

| Name         | location      | Type   | Format / Values      | Description                                                  | Required |
| ------------ | ------------- | ------ | -------------------- | ------------------------------------------------------------ | -------- |
| id           | Url Path      | string |                      | id of beneficiary to edit, if does not exist will be created | Yes      |
| country      | Url parameter | string | /^\[A-Z]{2}$/        | 2 letter ISO country code                                    |          |
| currency     | Url parameter | string | /^\[A-Z]{3}$/        | 3 letter ISO currency code                                   |          |
| entity\_type | Url parameter | string | INDIVIDUAL, BUSINESS |                                                              |          |

**Body Parameters -** **Response**

| Name         | Type   | Format / Values      | Description                      |
| ------------ | ------ | -------------------- | -------------------------------- |
| id           | string |                      | Beneficiary id                   |
| country      | string | /^\[A-Z]{2}$/        | 2 letter ISO country code        |
| currency     | string | /^\[A-Z]{3}$/        | 3 letter ISO currency code       |
| entity\_type | string | INDIVIDUAL, BUSINESS |                                  |
| expires      | string | date-time            | time when this link will expire  |
| url          | string |                      | the link to redirect the user to |

**Request** **Example**

```json
GET /payments/beneficiaries/30/collect
```

**Response Examples**

{% tabs %}
{% tab title="Status: 200 - OK" %}

```json
{
   "id": "30",
   "url": "https://api.papayaglobal.com/payments/public/beneficiary?token=eyJjdHkiOiJqc29uIiwiYWxnIjoiSFM1MTIifQ.eyJvd25lciI6eyJpZCI6ImRlbW86c3RhbmRhbG9uZToxNzA5NjQ1OTAyIn0sImNvbnRhY3QiOiIzMCIsImNvdW50cnkiOiJJTCIsImN1cnJlbmN5IjoiSUxTIiwiZW50aXR5X3R5cGUiOiJJTkRJVklEVUFMIiwiaWF0IjoxNzA5Njc2ODYzLCJleHAiOjE3MDk2Nzc3NjN9.UL5yH4Qikz-7Y0Q_8-CrhodquBWdh0xxdW7W73z3NAmefwkbSV0UX4PI3LAxUWsFpSKb7QfreDvobItCkYysqg",
   "expires": "2024-03-05T22:29:23.033446124Z",
   "country": "IL",
   "currency": "ILS",
   "entity_type": "INDIVIDUAL"
}
```

{% endtab %}

{% tab title="404 - Not Found" %}

```json
```

{% endtab %}
{% endtabs %}


# Webhooks Notifications

PapayaGlobal uses webhooks to send API call messages to a specific URL in your application whenever there are events or status changes. For instance, in the payment process, webhooks transmit immediate notifications between servers when specific events like a completed transaction or a change in payment status occur. PapayaGlobal offers a variety of webhooks for you to choose from and subscribe to based on your requirements, along with the option to provide a suitable URL for each webhook.

{% hint style="info" %}
Webhooks are a secure and accountable means for two servers to exchange information through HTTPS callbacks or messages. These callbacks are activated by particular events or occurrences and function at the server-to-server (S2S) level.
{% endhint %}

{% hint style="warning" %}
For more information or to enable this feature, please get in touch with your account manager or our support team.
{% endhint %}

**Set up Webhooks**

1. Generate a server URL for your organization server and share it with PapayaGlobal and its corresponding server IP address. This URL will be the destination where the transaction response from PapayaGlobal will be sent.
2. PapayaGlobal will configure the organization's server URL on its backend, associating it with the OrgID and key of that specific organization.
3. To ensure seamless communication, PapayaGlobal will whitelist the webhook URL provided by the organization in its systems.


# API Test

## Try to download yaml file

[payment\_open\_api 2 (1).yml](https://github.com/papayaglobal/api-docs-gitbook/blob/DOCS-1-0/api-test/.gitbook/assets/payment_open_api%202%20\(1\).yml)

## API

* [beneficiaries](https://docs.papayaglobal.com/api-test/beneficiaries)
* [groups](https://docs.papayaglobal.com/api-test/groups)
* [payments](https://docs.papayaglobal.com/api-test/payments)
* [wallets](https://docs.papayaglobal.com/api-test/wallets)

## API title

<mark style="color:blue;">`GET`</mark> `https://example.com/example`

shows itself up in the outline. Example of all available parameters follows:

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | String | Description |

#### Query Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Description |

#### Headers

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | String | Description |

#### Cookies

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | String | Description |

#### Request Body

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | String | Description |

{% tabs %}
{% tab title="200: OK Description" %}

```javascript
{
    // good Response
}
```

{% endtab %}

{% tab title="404: Not Found Description" %}

```javascript
{
    // not found Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error Description" %}

```javascript
{
    // error Response
}
```

{% endtab %}
{% endtabs %}


# beneficiaries

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/beneficiaries/import" method="post" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/beneficiaries/import/{job\_id}" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/beneficiaries/validate" method="post" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/beneficiaries/{id}/collect" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/beneficiaries/{id}" method="put" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/beneficiaries/{id}" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/beneficiaries" method="post" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/beneficiaries" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/beneficiaries/schema/{type}/{country}/{currency}" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}


# groups

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/groups" method="post" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/groups" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/groups/{id}" method="delete" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/groups/{id}" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/groups/{id}" method="put" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/groups/{id}/lock" method="patch" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/groups/{id}/lock" method="delete" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}


# payments

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments/approve" method="patch" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments/approve" method="delete" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments" method="post" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments/{id}" method="put" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments/{id}" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments/import" method="post" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments/import/{job\_id}" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments/list" method="post" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/payments/{id}/send" method="post" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}


# wallets

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/wallets/{id}" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/wallets" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}

{% openapi src="/files/hDsVdIDJFuePr2YjPCM4" path="/payments/wallets/{id}/statement" method="get" expanded="true" %}
[payment\_open\_api 2 (1).yml](https://4141033735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKOlaOMAtvjMZO74YRo2%2Fuploads%2Fgit-blob-3b29fa995dbc8c5c230360647509bcdba30b166c%2Fpayment_open_api%202%20\(1\).yml?alt=media)
{% endopenapi %}


