Skip to main content
PATCH
/
api
/
v2
/
payment-method
/
{paymentMethodId}
Update payment method
curl --request PATCH \
  --url https://demo.api.loopcrypto.xyz/api/v2/payment-method/{paymentMethodId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My Crypto Wallet",
  "isDefault": true
}'
{
  "paymentMethodId": "1234567890abcdef",
  "merchantId": "67e55044-10b1-426f-9247-bb680e5fe0c8",
  "paymentMethodName": "My Crypto Wallet",
  "active": true,
  "customer": {
    "customerId": "1234567890abcdef",
    "customerRefId": "1234567890abcdef"
  },
  "networkId": 1,
  "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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

paymentMethodId
string
required

Body

application/json
name
string

A descriptive name to identify this payment method

Example:

"My Crypto Wallet"

isDefault
boolean

Whether the payment method is the default payment method for wallet address.

Example:

true

Response

Ok

paymentMethodId
string
required

The unique identifier for the payment method

Example:

"1234567890abcdef"

merchantId
string
required

The unique identifier of the merchant this payment method is associated with

Example:

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

paymentMethodName
string
required

The name of the payment method

Example:

"My Crypto Wallet"

active
boolean
required

Whether the payment method is active or not. Inactive payment methods cannot be used for payins

Example:

true

customer
object
required

The customers that are associated with the payment method

networkId
number
required

The blockchain network ID the payment method is associated with

Example:

1

walletAddress
string
required

The blockchain wallet address where payments will be sent from

Example:

"0x1234567890abcdef"

isDefault
boolean
required

Whether the payment method is the default payment method for wallet address

Example:

true

token
object
required

The token associated with the payment method

preAuthorization
object
required

The status of the payment method, including the wallet's balance and authorization status

dateCreated
number
required

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

Example:

1716211200

I