Skip to main content
PATCH
/
api
/
v2
/
customer
/
{customerId}
Update customer
curl --request PATCH \
  --url https://demo.api.loopcrypto.xyz/api/v2/customer/{customerId} \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --header 'entity-id: <api-key>' \
  --data '{
  "merchantId": "67e55044-10b1-426f-9247-bb680e5fe0c8",
  "customerRefId": "cus_1234abcd"
}'
{
  "customerId": "1234567890abcdef",
  "customerRefId": "1234567890abcdef",
  "paymentMethods": [
    {
      "networkId": 1,
      "merchantId": "67e55044-10b1-426f-9247-bb680e5fe0c8",
      "paymentMethodId": "1234567890abcdef",
      "paymentMethodName": "My Crypto Wallet",
      "active": true,
      "walletAddress": "0x1234567890abcdef",
      "isDefault": true,
      "token": {
        "symbol": "USDC",
        "tokenId": "123e4567-e89b-12d3-a456-426614174000",
        "address": "0x1234567890abcdef",
        "decimals": 6,
        "exchangeRates": [
          {
            "currency": "USD",
            "price": "10000",
            "provider": "CoinMarketCap",
            "timestamp": 1715731200
          }
        ]
      },
      "preAuthorization": {
        "balance": "100",
        "authorization": "49.9"
      }
    }
  ],
  "dateCreated": 1716211200
}

Authorizations

api-key
string
header
required
entity-id
string
header
required

Path Parameters

customerId
string
required

The unique identifier of the customer to update. This must be a valid customer ID associated with your entity. Used to look up the specific customer's details

Body

application/json
merchantId
string

(Optional) The identifier of the merchant that this customer will be associated with. This merchant must already exist in the system.

Example:

"67e55044-10b1-426f-9247-bb680e5fe0c8"

customerRefId
string | null

(Optional) The external customer reference ID used to tie this customer to a customer in an external system.

Example:

"cus_1234abcd"

Response

Ok

customerId
string
required

The unique identifier that represents the customer

Example:

"1234567890abcdef"

customerRefId
string | null
required

The external customer reference ID used to tie this customer to a customer in an external system.

Example:

"1234567890abcdef"

paymentMethods
object[]
required

The payment methods configured for this customer to make payments with.

dateCreated
number
required

The date the customer record was created, represented as a Unix timestamp in seconds.

Example:

1716211200

I