Skip to main content
PATCH
/
api
/
v2
/
payment-types
/
defaults
Default payment types
curl --request PATCH \
  --url https://demo.api.loopcrypto.xyz/api/v2/payment-types/defaults \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --header 'entity-id: <api-key>' \
  --data '{
  "merchantId": "9f47c95b-2d1a-4c3e-b67f-891e36c172a8",
  "addDefaultTokens": [
    "3a91d177-bda1-11ef-a8b6-0242ac120002"
  ],
  "removeDefaultTokens": [
    "9f47a848-5c31-4a75-b09d-f5c234875db2"
  ]
}'
{
  "merchantId": "550e8400-e29b-41d4-a716-446655440000",
  "tokenId": "d9e1f2a3-b4c5-6d7e-8f9g-0h1i2j3k4l5m",
  "isDefault": true,
  "networkId": 1,
  "symbol": "USDC",
  "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "decimals": 6,
  "dateCreated": 1716211200
}

Authorizations

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

Body

application/json
merchantId
string
required

The ID of the merchant to associate the payment type to. If not provided, the payment type will be associated with the organization.

Example:

"9f47c95b-2d1a-4c3e-b67f-891e36c172a8"

addDefaultTokens
string[]

The IDs of the tokens to add as default.

Example:
["3a91d177-bda1-11ef-a8b6-0242ac120002"]
removeDefaultTokens
string[]

The IDs of the tokens to remove as default.

Example:
["9f47a848-5c31-4a75-b09d-f5c234875db2"]

Response

Ok

merchantId
string
required

The merchant ID associated with this payment type

Example:

"550e8400-e29b-41d4-a716-446655440000"

tokenId
string
required

The unique identifier for the token used by the payment type.

Example:

"d9e1f2a3-b4c5-6d7e-8f9g-0h1i2j3k4l5m"

isDefault
boolean
required

Specifies if this payment type should be set as the default. All payments created without specifying a payment type will use the default payment types list.

Example:

true

networkId
number
required

The blockchain network ID the token is associated with

Example:

1

symbol
string
required

The token symbol that identifies the token on the blockchain network

Example:

"USDC"

address
string
required

The token contract address for the payment type

Example:

"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

decimals
number
required

The number of decimal places used to represent token amounts

Example:

6

dateCreated
number
required

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

Example:

1716211200

I