Skip to main content
POST
/
api
/
v2
/
auth
/
token
Create Auth Token
curl --request POST \
  --url https://demo.api.loopcrypto.xyz/api/v2/auth/token \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --header 'entity-id: <api-key>' \
  --data '{
  "merchantId": "67e55044-10b1-426f-9247-bb680e5fe0c8",
  "scopes": [
    "CreateCustomer",
    "GetPayins"
  ],
  "customerRefId": "myCustomer",
  "customerId": "cus_1234abcd",
  "expirationTime": 3600
}'
{
  "merchantId": "1234567890abcdef",
  "customerRefId": "1234567890abcdef",
  "customerId": "cus_1234abcd",
  "jwtToken": "<string>"
}

Authorizations

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

Body

application/json
merchantId
string
required

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"

scopes
enum<string>[]

(Optional) The list of grant permissions that define what operations this access token is authorized to perform. If no scopes are provided, the default scopes will be used.

Default scopes include: UpdateMerchants, GetMerchants, CreateCustomers, CreatePayins, GetPayins, GetCustomers, CreatePaymentMethods, GetPaymentMethods, DeletePaymentMethods, UpdatePaymentMethods

Valid values: GetMerchants, CreateCustomers, CreatePayins, GetPayins, GetCustomers, CreatePaymentMethods, GetPaymentMethods, DeletePaymentMethods, UpdatePaymentMethods

Example:
["CreateCustomer", "GetPayins"]
customerRefId
string

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

Example:

"myCustomer"

customerId
string

(Optional) The identifier of the customer that this access token is authorized to perform actions for.

Example:

"cus_1234abcd"

expirationTime
number

(Optional) The expiration time of the token in seconds. If no expiration time is provided, the default expiration of 24 hours (86,400 seconds) will be used

Example:

3600

Response

Ok

merchantId
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"

customerId
string | null
required

The identifier of the customer that this access token is authorized to perform actions for.

Example:

"cus_1234abcd"

jwtToken
string
required

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

I