UNPKG

@tennac-booking/sdk

Version:

OpenAPI client for @tennac-booking/sdk

125 lines (83 loc) 3.29 kB
# PaymentsStaffApi All URIs are relative to *http://localhost* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**cancelSumupPayment**](#cancelsumuppayment) | **POST** /api/clubs/{clubId}/payments/sumup/{paymentId}/cancel | | |[**createSumupPayment**](#createsumuppayment) | **POST** /api/clubs/{clubId}/payments/sumup | | # **cancelSumupPayment** > cancelSumupPayment() Cancel a SumUp reader checkout. ### Example ```typescript import { PaymentsStaffApi, Configuration, SumupCancelPaymentRequest } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new PaymentsStaffApi(configuration); let clubId: string; // (default to undefined) let paymentId: string; // (default to undefined) let sumupCancelPaymentRequest: SumupCancelPaymentRequest; // (optional) const { status, data } = await apiInstance.cancelSumupPayment( clubId, paymentId, sumupCancelPaymentRequest ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **sumupCancelPaymentRequest** | **SumupCancelPaymentRequest**| | | | **clubId** | [**string**] | | defaults to undefined| | **paymentId** | [**string**] | | defaults to undefined| ### Return type void (empty response body) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**204** | Paiement annulé | - | |**400** | Bad Request | - | [[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) # **createSumupPayment** > PaymentIntentResult createSumupPayment(sumupCreatePaymentRequest) Start a SumUp reader checkout (manual payment trigger). ### Example ```typescript import { PaymentsStaffApi, Configuration, SumupCreatePaymentRequest } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new PaymentsStaffApi(configuration); let clubId: string; // (default to undefined) let sumupCreatePaymentRequest: SumupCreatePaymentRequest; // const { status, data } = await apiInstance.createSumupPayment( clubId, sumupCreatePaymentRequest ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **sumupCreatePaymentRequest** | **SumupCreatePaymentRequest**| | | | **clubId** | [**string**] | | defaults to undefined| ### Return type **PaymentIntentResult** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**201** | Paiement SumUp créé | - | |**400** | Bad Request | - | [[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)