Skip to main content
POST
/
api
/
v2
/
payment-type
Create payment type
curl --request POST \
  --url https://demo.api.loopcrypto.xyz/api/v2/payment-type \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --header 'entity-id: <api-key>' \
  --data '{
  "merchantId": "9f47c95b-2d1a-4c3e-b67f-891e36c172a8",
  "networkId": 1,
  "tokenSymbol": "USDC",
  "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "isDefault": true
}'
{
  "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"

networkId
integer
required

The blockchain network ID the payout destination is associated with.

Valid values:

  • 1 (Ethereum)
  • 10 (Optimism)
  • 56 (BNB)
  • 137 (Polygon)
  • 8453 (Base)
  • 42220 (Celo)
  • 42161 (Arbitrum)
  • 900 (Solana)
  • 11155111 (Sepolia) - Only available for demo environment
  • 901 (Solana Devnet) - Only available on the demo environment
Required range: x >= 1
Example:

1

tokenSymbol
string

The token symbol that identifies the token on the blockchain network. Must match the symbol of the token contract.

Note: Either tokenAddress or tokenSymbol must be provided. If both are provided, the tokenAddress takes precedence.

Example:

"USDC"

tokenAddress
string

The token contract address for the payment type. Must be a valid token contract address for the specified network.

Note: Either tokenAddress or tokenSymbol must be provided. If both are provided, the tokenAddress takes precedence.

Example:

"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

isDefault
boolean

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.

Defaults to true.

Example:

true

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