# OrganizationPaymentsApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createOrganizationPaymentIntegration**](#createorganizationpaymentintegration) | **POST** /organization/payment | Create an organization payment integration|
|[**deleteOrganizationPaymentIntegration**](#deleteorganizationpaymentintegration) | **DELETE** /organization/payment/{integrationId} | Delete an organization payment integration|
|[**deletePaymentIntent**](#deletepaymentintent) | **DELETE** /payment-intents/{intentId} | Delete a payment intent|
|[**getOrganizationPaymentIntegration**](#getorganizationpaymentintegration) | **GET** /organization/payment/{integrationId} | Get an organization payment integration|
|[**getOrganizationPaymentIntegrations**](#getorganizationpaymentintegrations) | **GET** /organization/payment | List an organization\&#39;s payment integrations|
|[**getPayment**](#getpayment) | **GET** /payments/{paymentId} | Get a payment|
|[**getPaymentIntent**](#getpaymentintent) | **GET** /payment-intents/{intentId} | Get a payment intent|
|[**getPaymentIntents**](#getpaymentintents) | **GET** /payment-intents | List an organization\&#39;s payment intents|
|[**getPaymentTaxMetadata**](#getpaymenttaxmetadata) | **GET** /payments/{paymentId}/tax-metadata | Get a payment\&#39;s tax metadata|
|[**getPayments**](#getpayments) | **GET** /payments | List an organization\&#39;s payments|
|[**refundPayment**](#refundpayment) | **POST** /payments/{paymentId}/refund | Refund line items on a payment|
|[**sendPaymentReceipt**](#sendpaymentreceipt) | **POST** /payments/{paymentId}/receipt | Email a receipt for a payment|
|[**toggleOrganizationPaymentIntegration**](#toggleorganizationpaymentintegration) | **PUT** /organization/payment/{integrationId}/toggle | Set an organization payment integration as default|
|[**updateOrganizationPaymentIntegration**](#updateorganizationpaymentintegration) | **PUT** /organization/payment/{integrationId} | Update an organization payment integration|

# **createOrganizationPaymentIntegration**
> CreateOrganizationPaymentIntegration200Response createOrganizationPaymentIntegration(organizationPaymentIntegrationCreateInputs)

Creates a new payment integration (e.g. a Stripe or other payment gateway connection) for the current organization, requiring update permission on the org resource.

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration,
    OrganizationPaymentIntegrationCreateInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let organizationPaymentIntegrationCreateInputs: OrganizationPaymentIntegrationCreateInputs; //

const { status, data } = await apiInstance.createOrganizationPaymentIntegration(
    organizationPaymentIntegrationCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **organizationPaymentIntegrationCreateInputs** | **OrganizationPaymentIntegrationCreateInputs**|  | |


### Return type

**CreateOrganizationPaymentIntegration200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteOrganizationPaymentIntegration**
> SyncAccounts200Response deleteOrganizationPaymentIntegration()

Permanently removes a payment integration, identified by integrationId, from the current organization, requiring update permission on the org resource.

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let integrationId: string; //The integration identifier (default to undefined)

const { status, data } = await apiInstance.deleteOrganizationPaymentIntegration(
    integrationId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **integrationId** | [**string**] | The integration identifier | defaults to undefined|


### Return type

**SyncAccounts200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deletePaymentIntent**
> CreateAccountInvitations200Response deletePaymentIntent()

Permanently removes an unpaid checkout payment intent identified by intentId. For Stripe, cancels an uncaptured PaymentIntent first and refuses if funds were already captured; requires update permission on the payments resource.

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let intentId: string; //The intent identifier (default to undefined)

const { status, data } = await apiInstance.deletePaymentIntent(
    intentId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **intentId** | [**string**] | The intent identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getOrganizationPaymentIntegration**
> CreateOrganizationPaymentIntegration200Response getOrganizationPaymentIntegration()

Returns the details of a single payment integration (e.g. Stripe, Braintree, Authorize.Net, or manual) configured for the organization, identified by integration ID; requires \"read\" permission on \"org\".

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let integrationId: string; //The integration identifier (default to undefined)

const { status, data } = await apiInstance.getOrganizationPaymentIntegration(
    integrationId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **integrationId** | [**string**] | The integration identifier | defaults to undefined|


### Return type

**CreateOrganizationPaymentIntegration200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getOrganizationPaymentIntegrations**
> GetOrganizationPaymentIntegrations200Response getOrganizationPaymentIntegrations()

Returns a paginated list of payment integrations (e.g. Stripe, Braintree, Authorize.Net, manual) configured for the organization, with optional search across name, type, currency code, and connection ID; requires \"read\" permission on \"org\".

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getOrganizationPaymentIntegrations(
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetOrganizationPaymentIntegrations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getPayment**
> GetPayment200Response getPayment()

Returns the details of a single payment record for the organization, identified by payment ID; requires \"read\" permission on \"payments\".

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let paymentId: string; //The payment identifier (default to undefined)

const { status, data } = await apiInstance.getPayment(
    paymentId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **paymentId** | [**string**] | The payment identifier | defaults to undefined|


### Return type

**GetPayment200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getPaymentIntent**
> GetPaymentIntent200Response getPaymentIntent()

Returns a single unpaid checkout payment intent identified by intent ID; requires \"read\" permission on \"payments\".

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let intentId: string; //The intent identifier (default to undefined)

const { status, data } = await apiInstance.getPaymentIntent(
    intentId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **intentId** | [**string**] | The intent identifier | defaults to undefined|


### Return type

**GetPaymentIntent200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getPaymentIntents**
> GetAccountPaymentIntents200Response getPaymentIntents()

Returns a paginated list of unpaid checkout payment intents for the organization, searchable by id, source, description, or account; requires \"read\" permission on \"payments\".

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getPaymentIntents(
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetAccountPaymentIntents200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getPaymentTaxMetadata**
> GetPaymentTaxMetadata200Response getPaymentTaxMetadata()

Returns tax metadata recorded for a specific payment by fetching it from the tax integration (e.g. Taxjar, Avalara) linked to that payment, or a message if the payment has no associated tax integration; requires \"read\" permission on \"payments\".

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let paymentId: string; //The payment identifier (default to undefined)

const { status, data } = await apiInstance.getPaymentTaxMetadata(
    paymentId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **paymentId** | [**string**] | The payment identifier | defaults to undefined|


### Return type

**GetPaymentTaxMetadata200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getPayments**
> GetAccountPayments200Response getPayments()

Returns a paginated list of payment records for the organization, with optional search and sort ordering; requires \"read\" permission on \"payments\".

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getPayments(
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetAccountPayments200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **refundPayment**
> GetPayment200Response refundPayment(refundLineItem)

Issues a refund for one or more line items on the specified payment, identified by paymentId, requiring update permission on the payments resource; at least one line item with a positive amount must be provided.

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let paymentId: string; //The payment identifier (default to undefined)
let refundLineItem: Array<RefundLineItem>; //
let eventId: string; //Filter by eventId (optional) (default to undefined)

const { status, data } = await apiInstance.refundPayment(
    paymentId,
    refundLineItem,
    eventId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **refundLineItem** | **Array<RefundLineItem>**|  | |
| **paymentId** | [**string**] | The payment identifier | defaults to undefined|
| **eventId** | [**string**] | Filter by eventId | (optional) defaults to undefined|


### Return type

**GetPayment200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **sendPaymentReceipt**
> CreateAccountInvitations200Response sendPaymentReceipt()

Queues a receipt email to the account on the payment, itemized with every line item and net of any refunds, for an attendee who needs one for tax or reimbursement purposes; only captured charges are eligible, and requires read and update permissions on payments.

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let paymentId: string; //The payment identifier (default to undefined)

const { status, data } = await apiInstance.sendPaymentReceipt(
    paymentId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **paymentId** | [**string**] | The payment identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **toggleOrganizationPaymentIntegration**
> CreateOrganizationPaymentIntegration200Response toggleOrganizationPaymentIntegration()

Toggles the specified payment integration, identified by integrationId, to be the organization\'s default payment integration, requiring update permission on the org resource.

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let integrationId: string; //The integration identifier (default to undefined)

const { status, data } = await apiInstance.toggleOrganizationPaymentIntegration(
    integrationId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **integrationId** | [**string**] | The integration identifier | defaults to undefined|


### Return type

**CreateOrganizationPaymentIntegration200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateOrganizationPaymentIntegration**
> CreateOrganizationPaymentIntegration200Response updateOrganizationPaymentIntegration(organizationPaymentIntegrationUpdateInputs)

Updates the settings of an existing payment integration, identified by integrationId, for the current organization, requiring update permission on the org resource.

### Example

```typescript
import {
    OrganizationPaymentsApi,
    Configuration,
    OrganizationPaymentIntegrationUpdateInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new OrganizationPaymentsApi(configuration);

let integrationId: string; //The integration identifier (default to undefined)
let organizationPaymentIntegrationUpdateInputs: OrganizationPaymentIntegrationUpdateInputs; //

const { status, data } = await apiInstance.updateOrganizationPaymentIntegration(
    integrationId,
    organizationPaymentIntegrationUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **organizationPaymentIntegrationUpdateInputs** | **OrganizationPaymentIntegrationUpdateInputs**|  | |
| **integrationId** | [**string**] | The integration identifier | defaults to undefined|


### Return type

**CreateOrganizationPaymentIntegration200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

