Skip to Content

PaymentMethodsApi

All URIs are relative to https://business.apis.kesk.app/v1 

MethodHTTP requestDescription
appCreateSavedPaymentMethodPOST /saved-payment-methodsCreate a new saved payment method for the authenticated user.
appDeleteSavedPaymentMethodDELETE /saved-payment-methods/{id}Delete a saved payment method for the authenticated user.
appListSavedPaymentMethodsGET /saved-payment-methodsList all saved payment methods for the authenticated user.
appSetDefaultSavedPaymentMethodPOST /saved-payment-methods/{id}/defaultSet a saved payment method as default for the authenticated user.
appUpdateSavedPaymentMethodPUT /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

NameTypeDescriptionNotes
CreatePaymentMethodRequestCreatePaymentMethodRequestPayment method creation details including gateway name, token, and type.

Return type

PaymentMethod

Authorization

JwtAuthScheme

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

NameTypeDescriptionNotes
idLongThe unique identifier of the payment method to delete.[default to null]

Return type

EmptyResponse

Authorization

JwtAuthScheme

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

NameTypeDescriptionNotes
pageInteger[optional] [default to null]
per_pageInteger[optional] [default to null]

Return type

PaginatedResponse_PaymentMethod

Authorization

JwtAuthScheme

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

NameTypeDescriptionNotes
idLongThe unique identifier of the payment method to set as default.[default to null]

Return type

EmptyResponse

Authorization

JwtAuthScheme

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

NameTypeDescriptionNotes
idLongThe unique identifier of the payment method to update.[default to null]
UpdatePaymentMethodRequestUpdatePaymentMethodRequestUpdate details including default status and metadata.

Return type

PaymentMethod

Authorization

JwtAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8