PaymentMethodsApi
All URIs are relative to https://business.apis.kesk.app/v1
| Method | HTTP request | Description |
|---|---|---|
| appCreateSavedPaymentMethod | POST /saved-payment-methods | Create a new saved payment method for the authenticated user. |
| appDeleteSavedPaymentMethod | DELETE /saved-payment-methods/{id} | Delete a saved payment method for the authenticated user. |
| appListSavedPaymentMethods | GET /saved-payment-methods | List all saved payment methods for the authenticated user. |
| appSetDefaultSavedPaymentMethod | POST /saved-payment-methods/{id}/default | Set a saved payment method as default for the authenticated user. |
| appUpdateSavedPaymentMethod | PUT /saved-payment-methods/{id} | Update a saved payment method for the authenticated user. |
appCreateSavedPaymentMethod
PaymentMethod appCreateSavedPaymentMethod(CreatePaymentMethodRequest)
Create a new saved payment method for the authenticated user.
Registers a tokenized payment method obtained from a payment gateway (e.g., Stripe). The token represents the actual payment details which are securely stored by the gateway.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| CreatePaymentMethodRequest | CreatePaymentMethodRequest | Payment method creation details including gateway name, token, and type. |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
appDeleteSavedPaymentMethod
EmptyResponse appDeleteSavedPaymentMethod(id)
Delete a saved payment method for the authenticated user.
Removes a saved payment method from the user’s account. The tokenized payment details will also be removed from the payment gateway where possible.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Long | The unique identifier of the payment method to delete. | [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
appListSavedPaymentMethods
PaginatedResponse_PaymentMethod appListSavedPaymentMethods(page, per_page)
List all saved payment methods for the authenticated user.
Retrieves all saved payment methods including credit cards, debit cards, and digital wallets. Returns masked card details and metadata for display in payment selection screens.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| page | Integer | [optional] [default to null] | |
| per_page | Integer | [optional] [default to null] |
Return type
PaginatedResponse_PaymentMethod
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
appSetDefaultSavedPaymentMethod
EmptyResponse appSetDefaultSavedPaymentMethod(id)
Set a saved payment method as default for the authenticated user.
Marks the specified payment method as the user’s default for future transactions. Any previously set default payment method will be unset automatically.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Long | The unique identifier of the payment method to set as default. | [default to null] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
appUpdateSavedPaymentMethod
PaymentMethod appUpdateSavedPaymentMethod(id, UpdatePaymentMethodRequest)
Update a saved payment method for the authenticated user.
Modifies payment method settings such as default status or associated metadata. Cannot update the payment token itself; only attributes and preferences.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | Long | The unique identifier of the payment method to update. | [default to null] |
| UpdatePaymentMethodRequest | UpdatePaymentMethodRequest | Update details including default status and metadata. |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8