LogoLogo
  • LiquidCommerce Documentation
  • πŸ”Authentication API Integration
    • Get Access Token
  • Services
    • πŸ—ΊοΈAddress API
      • Autocomplete
      • Details
    • πŸ‘₯Users API
      • Session
      • Fetch User
      • Delete User
      • Create/Update Address
      • Delete Address
      • Add Payment
      • Update Default Payment
      • Delete Payment
    • πŸ—ƒοΈCatalog API
      • Search
      • Availability
    • πŸ›’Cart API
      • Create/Update Cart
    • πŸ›οΈCheckout API
      • Prepare
      • Complete
    • πŸ“Orders API
      • Authentication
      • Get Order
  • CLOUD SDK
    • Overview
    • Methods & Usage
  • EVENTS & ERRORS
    • Overview
    • Cart Events
    • Checkout Status Codes
  • EVENT BRIDGE (WEBHOOKS)
    • Orders
  • Types
    • Loc
    • Catalog
    • Catalog Filters
    • Product
    • Cart
    • User
    • Retailer
    • Checkout
    • Order
Powered by GitBook
On this page
  • Endpoint Details
  • Path Parameters
  • Headers
  • Response Details
  • Sample Request and Response
Export as PDF
  1. Services
  2. Users API

Delete Payment

Delete a payment for a user by ID

Endpoint Details

DELETE /users/payments/purge/{userId}/{paymentId}

Path Parameters

Name
Type
Description
Required

userId

string

Existing user identifier, returned upon session creation or update

paymentId

string

Existing payment identifier of the user

Headers

Header
Value

Content-Type

application/json

Authorization

Bearer <YOUR_ACCESS_TOKEN>

Response Details

Field
Type
Description

statusCode

number

HTTP status code of the response

message

string

A brief message describing the result of the API call

metadata

Contains metadata about the API call

data.deleted

boolean

States if delete succeded or not

data.message

string

Delete message

Metadata Object

Sample Request and Response

curl --location 'https://staging.api.liquidcommerce.cloud/users/payments/purge' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "customerId": "usrid_123abc456def",
    "paymentMethodId": "paymentid_123abc456def",
    "isDefault": true
}'
{
    "statusCode": 200,
    "message": "Deleting a payment method",
    "metadata": {
        "languages": [
            "en"
        ],
        "timestamp": 1731600946784,
        "timezone": "UTC",
        "requestId": "reqid_123abc45def",
        "path": "/api/users/payments/purge/usr_123abc456def/paymentid_123abc456def",
        "version": "1.7.0"
    },
    "data": {
        "deleted": false,
        "message": "There's no Payment method with the ID provided for this customer"
    }
}
PreviousUpdate Default PaymentNextCatalog API

Last updated 7 months ago

πŸ‘₯
metaDataObject
Field
Type
Description

languages

Array<string>

List of supported languages for the response, e.g. ["en"]

timestamp

string

Unix timestamp (in milliseconds) when the response was generated

timezone

string

Timezone used for the response, always "UTC"

requestId

string

Unique identifier for the API request. Used for debugging and support

path

string

API path

version

string

API version used for the request