Skip to content
Download OpenAPI description
Overview
Languages
Servers
Mock server

https://docs.pers.ninja/_mock/swagger/

https://api.pers.ninja/v2/

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Payment Processing System

Secure payment processing for account balance top-ups through credit card payments. Provides secure financial transactions for premium features and account funding within the loyalty ecosystem.
**Payment Features:**

• **Secure Payments:** Credit card processing with industry-standard security

• **Balance Top-Up:** Add funds to user accounts for premium features

• **Payment Methods:** Support for multiple payment providers and methods

• **Transaction Security:** Encrypted payment data and fraud protection

• **Account Integration:** Seamless integration with token and reward systems ![Purchase Module](https://s3.eu-west-1.amazonaws.com/pers.assets.prod/tenant/a0df6ebf-51cc-4c18-afcd-0de355c250dc_DemoApp_eXplorins/Documentation/Purchase_image.png)

Request

Handles Stripe payment events for financial reconciliation. CRITICAL: Do not modify without extensive testing. Replaces POST /purchase/stripe-webhook

curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/purchases/webhooks/stripe

Responses

Webhook processed successfully

Bodyapplication/json
boolean
Response
application/json
true

Get purchase tokens (Intelligent Access)

Request

Intelligent endpoint that adapts based on authentication: Public users get active tokens only, Admin users get filtered tokens. Replaces GET /purchase/token

Security
projectKey
Query
activeboolean

Filter by active status (Admin only: true=active, false=inactive, omit=all). Ignored for public access.

curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/purchases/tokens?active=true' \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Purchase tokens retrieved based on access level

Bodyapplication/jsonArray [
idstringrequired

Purchase Token id

descriptionstringrequired

Purchase Token description

tokenobjectrequired
token.​idstringrequired

Id of the token

token.​contractAddressstringrequired

Address of the token

token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

token.​namestring

this is the name of the token contract

token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

token.​isActivebooleanrequired

This can be used to enable or disable the token

token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
contractTokenIdobjectrequired

optional contract token id

purchaseTypeobjectrequired
purchaseType.​conversionRatenumberrequired

Conversion Rate of the token

purchaseType.​currencystringrequired

Currency of the token

Value"eur"
purchaseType.​idnumberrequired

Purchase Type id

isActivebooleanrequired

Purchase Token isActive

]
Response
application/json
[ { "id": "string", "description": "string", "token": { … }, "contractTokenId": {}, "purchaseType": { … }, "isActive": true } ]

Request

Create a new purchase token for the product catalog. Admin-only operation. Replaces POST /purchase/admin/token

Security
tenantAdminJWT
Bodyapplication/jsonrequired
tokenIdstringrequired

Token id

descriptionstringrequired

Purchase Token description

purchaseTypeIdnumberrequired

Purchase Type id

curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/purchases/tokens \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "tokenId": "string",
    "description": "string",
    "purchaseTypeId": 0
  }'

Responses

Purchase token created successfully

Bodyapplication/json
idstringrequired

Purchase Token id

descriptionstringrequired

Purchase Token description

tokenobjectrequired
token.​idstringrequired

Id of the token

token.​contractAddressstringrequired

Address of the token

token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

token.​namestring

this is the name of the token contract

token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

token.​isActivebooleanrequired

This can be used to enable or disable the token

token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
contractTokenIdobjectrequired

optional contract token id

purchaseTypeobjectrequired
purchaseType.​conversionRatenumberrequired

Conversion Rate of the token

purchaseType.​currencystringrequired

Currency of the token

Value"eur"
purchaseType.​idnumberrequired

Purchase Type id

isActivebooleanrequired

Purchase Token isActive

Response
application/json
{ "id": "string", "description": "string", "token": { "id": "string", "contractAddress": "string", "metadata": [ … ], "abi": {}, "chainId": 0, "abiUrl": {}, "name": "string", "symbol": "string", "decimals": 0, "isActive": true, "isGallery": true, "type": "ERC20" }, "contractTokenId": {}, "purchaseType": { "conversionRate": 0, "currency": "eur", "id": 0 }, "isActive": true }

Request

Get all available donation types for public catalog browsing. Requires valid project API key. Replaces GET /purchase/donation/type

Security
projectKey
curl -i -X GET \
  https://docs.pers.ninja/_mock/swagger/purchases/donation-types \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Donation types retrieved

Bodyapplication/jsonArray [
percentagenumberrequired

Percentage of donation

idnumberrequired

Id of the donation type

]
Response
application/json
[ { "percentage": 0, "id": 0 } ]

Request

Create a new donation type for system configuration. Admin-only operation. Replaces POST /purchase/admin/donation/type

Security
tenantAdminJWT
Bodyapplication/jsonrequired
percentagenumberrequired

Percentage of donation

idnumberrequired

Id of the donation type

curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/purchases/donation-types \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "percentage": 0,
    "id": 0
  }'

Responses

Donation type created successfully

Bodyapplication/json
percentagenumberrequired

Percentage of donation

idnumberrequired

Id of the donation type

Response
application/json
{ "percentage": 0, "id": 0 }

Request

Create a new Stripe payment intent for purchase processing. Requires tenant context for Stripe API key. FINANCIAL OPERATION - handle with care. Replaces POST /purchase/payment-intent

Security
projectKey
Bodyapplication/jsonrequired
amountnumberrequired

Amount in cents

currencystringrequired

Currency

receiptEmailstringrequired

Receipt Email

descriptionstringrequired

Description

curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/purchases/payment-intents \
  -H 'Content-Type: application/json' \
  -H 'x-project-key: YOUR_API_KEY_HERE' \
  -d '{
    "amount": 0,
    "currency": "string",
    "receiptEmail": "string",
    "description": "string"
  }'

Responses

Payment intent created successfully

Bodyapplication/json
paymentClientSecretobjectrequired

Payment Intent ClientSecrete to complete Stripe payment

paymentIntentIdstringrequired

Payment Intent Id

Response
application/json
{ "paymentClientSecret": {}, "paymentIntentId": "string" }

Request

Update an existing Stripe payment intent. Requires tenant context for Stripe API key. FINANCIAL OPERATION - handle with care. Replaces PUT /purchase/payment-intent/{paymentIntentId}

Security
projectKey
Path
paymentIntentIdstringrequired
Bodyapplication/jsonrequired
amountnumberrequired

Amount in cents

currencystringrequired

Currency

receiptEmailstringrequired

Receipt Email

descriptionstringrequired

Description

curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/purchases/payment-intents/{paymentIntentId}' \
  -H 'Content-Type: application/json' \
  -H 'x-project-key: YOUR_API_KEY_HERE' \
  -d '{
    "amount": 0,
    "currency": "string",
    "receiptEmail": "string",
    "description": "string"
  }'

Responses

Payment intent updated successfully

Bodyapplication/json
paymentClientSecretobjectrequired

Payment Intent ClientSecrete to complete Stripe payment

paymentIntentIdstringrequired

Payment Intent Id

Response
application/json
{ "paymentClientSecret": {}, "paymentIntentId": "string" }

Request

Cancel an existing Stripe payment intent. Requires tenant context for Stripe API key. FINANCIAL OPERATION - handle with care. Replaces DELETE /purchase/payment-intent/{paymentIntentId}

Security
projectKey
Path
paymentIntentIdstringrequired
curl -i -X DELETE \
  'https://docs.pers.ninja/_mock/swagger/purchases/payment-intents/{paymentIntentId}' \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

Payment intent cancelled successfully

Bodyapplication/json
paymentClientSecretobjectrequired

Payment Intent ClientSecrete to complete Stripe payment

paymentIntentIdstringrequired

Payment Intent Id

Response
application/json
{ "paymentClientSecret": {}, "paymentIntentId": "string" }

Create user purchase (Financial Transaction)

Request

Create a new purchase for the authenticated user. BUSINESS CRITICAL - handles real financial transactions with Stripe integration. Requires user and tenant context. Replaces POST /purchase/auth

Security
projectKey or authUserJWT
Bodyapplication/jsonrequired
quantitynumberrequired

Quantity of tokens to purchase

paymentIntentIdstringrequired

Payment Intent Id

purchaseTokenIdstringrequired

Purchase Token id

donationTypeIdnumber

Donation Type

donationAccountAddressstring

Donation Account Address

curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/purchases \
  -H 'Content-Type: application/json' \
  -H 'x-project-key: YOUR_API_KEY_HERE' \
  -d '{
    "quantity": 0,
    "paymentIntentId": "string",
    "purchaseTokenId": "string",
    "donationTypeId": 0,
    "donationAccountAddress": "string"
  }'

Responses

Purchase created successfully

Bodyapplication/json
idstringrequired

Purchase id

stripePaymentIntentIdstringrequired

Stripe Payment Intent id

statusobjectrequired

Purchase status

amountnumberrequired

Amount to pay in cents

currencystringrequired

Currency

Value"eur"
quantitynumberrequired

Quantity of tokens to purchase

purchaseTokenobjectrequired
purchaseToken.​idstringrequired

Purchase Token id

purchaseToken.​descriptionstringrequired

Purchase Token description

purchaseToken.​tokenobjectrequired
purchaseToken.​token.​idstringrequired

Id of the token

purchaseToken.​token.​contractAddressstringrequired

Address of the token

purchaseToken.​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

purchaseToken.​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

purchaseToken.​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

purchaseToken.​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

purchaseToken.​token.​namestring

this is the name of the token contract

purchaseToken.​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

purchaseToken.​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

purchaseToken.​token.​isActivebooleanrequired

This can be used to enable or disable the token

purchaseToken.​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

purchaseToken.​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
purchaseToken.​contractTokenIdobjectrequired

optional contract token id

purchaseToken.​purchaseTypeobjectrequired
purchaseToken.​purchaseType.​conversionRatenumberrequired

Conversion Rate of the token

purchaseToken.​purchaseType.​currencystringrequired

Currency of the token

Value"eur"
purchaseToken.​purchaseType.​idnumberrequired

Purchase Type id

purchaseToken.​isActivebooleanrequired

Purchase Token isActive

userobjectrequired
user.​idstringrequired
user.​emailobject
user.​firstNameobject or nullrequired

User first name

user.​lastNameobject or nullrequired

User last name

user.​externalIdobject or nullrequired

User external id

user.​instagramAccountIdobject or nullrequired

Instagram account id

user.​googleAccountNameobject or nullrequired

Google account name

user.​customDataobjectrequired

Custom data

user.​publicProfileobject or nullrequired

Public profile data

user.​isActivebooleanrequired

Is active

user.​currentSigningAccountIdobject

Current active signing account ID for external wallet operations

user.​walletsArray of objects(WalletDTO)required

User-owned counterfactual smart contract wallets that can receive tokens

user.​wallets[].​idstringrequired

Unique identifier for the internal wallet

user.​wallets[].​ownerTypenumberrequired

Owner type for polymorphic ownership

Value{"USER":"user","BUSINESS":"business","TENANT":"tenant","SYSTEM":"system","EXTERNAL":"external"}
Example: "user"
user.​wallets[].​ownerIdstringrequired

Owner ID for polymorphic ownership

Example: "user_123"
user.​wallets[].​walletManagementTypenumberrequired

Type of internal wallet

Value{"CUSTODIAL":"custodial","NON_CUSTODIAL":"non-custodial"}
user.​wallets[].​addressstringrequired

CREATE2 generated address that can receive tokens

user.​wallets[].​chainIdnumberrequired

Blockchain network chain identifier

user.​wallets[].​statusnumberrequired

Current status of the wallet

Value{"PENDING":"pending","ACTIVE":"active","SUSPENDED":"suspended","ARCHIVED":"archived"}
user.​wallets[].​saltstringrequired

CREATE2 salt used for deterministic address generation

user.​wallets[].​ownerSigningAccountIdobject or null

ID of signing account that owns this internal wallet

user.​wallets[].​tagsArray of stringsrequired

Tags associated with the wallet for categorization

user.​wallets[].​createdAtstring(date-time)required

Timestamp when the wallet was created

user.​wallets[].​updatedAtstring(date-time)required

Timestamp when the wallet was last updated

user.​accountAddressobject or nullDeprecatedrequired

User account address

businessobjectrequired
business.​idstringrequired

The id of the business, this is unique and will be used to identify the business.

business.​emailobject or nullrequired

The email of the business, this is unique and will be used to identify the business.

business.​accountAddressobject or nullrequired

The address of the business, this is the address that will be shown to the public.

business.​businessLegalNameobject or nullrequired

The legal name of the business, this is the name that will be used for legal purposes.

business.​displayNameobject or nullrequired

The display name of the business, this is the name that will be shown to the public.

business.​descriptionobject or nullrequired

The description of the business, this is the description that will be shown to the public.

business.​shortDescriptionobject or nullrequired

The short description of the business, this is the description that will be shown to the public.

business.​websiteUrlobject or nullrequired

The website of the business, this is the website that will be shown to the public.

business.​imageUrlobject or nullrequired

The image of the business, this is the image that will be shown to the public.

business.​streetAddressobject or nullrequired

The address of the business, this is the address that will be shown to the public.

business.​cityobject or nullrequired

The city of the business, this is the city that will be shown to the public.

business.​postalCodeobject or nullrequired

The postal code of the business, this is the postal code that will be shown to the public.

business.​coordsLatitudeobject or nullrequired

The latitude of the business, this is the latitude that will be shown to the public.

business.​coordsLongitudeobject or nullrequired

The longitude of the business, this is the longitude that will be shown to the public.

business.​businessTypeobject or nullrequired
business.​businessType.​idnumber

Business type id

business.​businessType.​namestring or nullrequired

Business type name

business.​businessType.​descriptionstring or nullrequired

Business type description

business.​businessType.​codestring or nullrequired

Business type code

business.​businessType.​iconUrlstring or nullrequired

Business type icon url

business.​isActivebooleanrequired

The status of the business, this is the status that will be shown to the public.

business.​canMintTokenbooleanrequired

The ability to mint token for the business, this is the ability that will be shown to the public.

business.​canChargeTokenbooleanrequired

The ability to charge token for the business, this is the ability that will be shown to the public.

business.​canManageUsersbooleanrequired

The ability to manage users for the business, this is the ability that will be shown to the public.

business.​canReceiveDonationbooleanrequired

The ability to receive donation for the business, this is the ability that will be shown to the public.

donationAccountAddressstring

Donation Account Address

donationTypeobject
createdAtstring(date-time)

create date

updatedAtstring(date-time)

update date

paymentClientSecretobjectrequired

Stripe payment intent client secret

Response
application/json
{ "id": "string", "stripePaymentIntentId": "string", "status": {}, "amount": 0, "currency": "eur", "quantity": 0, "purchaseToken": { "id": "string", "description": "string", "token": { … }, "contractTokenId": {}, "purchaseType": { … }, "isActive": true }, "user": { "id": "string", "email": {}, "firstName": {}, "lastName": {}, "externalId": {}, "accountAddress": {}, "instagramAccountId": {}, "googleAccountName": {}, "customData": {}, "publicProfile": {}, "isActive": true, "currentSigningAccountId": {}, "wallets": [ … ] }, "business": { "id": "string", "email": {}, "accountAddress": {}, "businessLegalName": {}, "displayName": {}, "description": {}, "shortDescription": {}, "websiteUrl": {}, "imageUrl": {}, "streetAddress": {}, "city": {}, "postalCode": {}, "coordsLatitude": {}, "coordsLongitude": {}, "businessType": { … }, "isActive": true, "canMintToken": true, "canChargeToken": true, "canManageUsers": true, "canReceiveDonation": true }, "donationAccountAddress": "string", "donationType": { "percentage": 0, "id": 0 }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "paymentClientSecret": {} }

Request

Get all purchases made by the authenticated user. Financial records require proper user attribution. Replaces GET /purchase/auth

Security
projectKey or authUserJWT
curl -i -X GET \
  https://docs.pers.ninja/_mock/swagger/purchases/me/history \
  -H 'x-project-key: YOUR_API_KEY_HERE'

Responses

User purchase history retrieved

Bodyapplication/jsonArray [
idstringrequired

Purchase id

stripePaymentIntentIdstringrequired

Stripe Payment Intent id

statusobjectrequired

Purchase status

amountnumberrequired

Amount to pay in cents

currencystringrequired

Currency

Value"eur"
quantitynumberrequired

Quantity of tokens to purchase

purchaseTokenobjectrequired
purchaseToken.​idstringrequired

Purchase Token id

purchaseToken.​descriptionstringrequired

Purchase Token description

purchaseToken.​tokenobjectrequired
purchaseToken.​token.​idstringrequired

Id of the token

purchaseToken.​token.​contractAddressstringrequired

Address of the token

purchaseToken.​token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

purchaseToken.​token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

purchaseToken.​token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

purchaseToken.​token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

purchaseToken.​token.​namestring

this is the name of the token contract

purchaseToken.​token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

purchaseToken.​token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

purchaseToken.​token.​isActivebooleanrequired

This can be used to enable or disable the token

purchaseToken.​token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

purchaseToken.​token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
purchaseToken.​contractTokenIdobjectrequired

optional contract token id

purchaseToken.​purchaseTypeobjectrequired
purchaseToken.​purchaseType.​conversionRatenumberrequired

Conversion Rate of the token

purchaseToken.​purchaseType.​currencystringrequired

Currency of the token

Value"eur"
purchaseToken.​purchaseType.​idnumberrequired

Purchase Type id

purchaseToken.​isActivebooleanrequired

Purchase Token isActive

userobjectrequired
user.​idstringrequired
user.​emailobject
user.​firstNameobject or nullrequired

User first name

user.​lastNameobject or nullrequired

User last name

user.​externalIdobject or nullrequired

User external id

user.​instagramAccountIdobject or nullrequired

Instagram account id

user.​googleAccountNameobject or nullrequired

Google account name

user.​customDataobjectrequired

Custom data

user.​publicProfileobject or nullrequired

Public profile data

user.​isActivebooleanrequired

Is active

user.​currentSigningAccountIdobject

Current active signing account ID for external wallet operations

user.​walletsArray of objects(WalletDTO)required

User-owned counterfactual smart contract wallets that can receive tokens

user.​wallets[].​idstringrequired

Unique identifier for the internal wallet

user.​wallets[].​ownerTypenumberrequired

Owner type for polymorphic ownership

Value{"USER":"user","BUSINESS":"business","TENANT":"tenant","SYSTEM":"system","EXTERNAL":"external"}
Example: "user"
user.​wallets[].​ownerIdstringrequired

Owner ID for polymorphic ownership

Example: "user_123"
user.​wallets[].​walletManagementTypenumberrequired

Type of internal wallet

Value{"CUSTODIAL":"custodial","NON_CUSTODIAL":"non-custodial"}
user.​wallets[].​addressstringrequired

CREATE2 generated address that can receive tokens

user.​wallets[].​chainIdnumberrequired

Blockchain network chain identifier

user.​wallets[].​statusnumberrequired

Current status of the wallet

Value{"PENDING":"pending","ACTIVE":"active","SUSPENDED":"suspended","ARCHIVED":"archived"}
user.​wallets[].​saltstringrequired

CREATE2 salt used for deterministic address generation

user.​wallets[].​ownerSigningAccountIdobject or null

ID of signing account that owns this internal wallet

user.​wallets[].​tagsArray of stringsrequired

Tags associated with the wallet for categorization

user.​wallets[].​createdAtstring(date-time)required

Timestamp when the wallet was created

user.​wallets[].​updatedAtstring(date-time)required

Timestamp when the wallet was last updated

user.​accountAddressobject or nullDeprecatedrequired

User account address

businessobjectrequired
business.​idstringrequired

The id of the business, this is unique and will be used to identify the business.

business.​emailobject or nullrequired

The email of the business, this is unique and will be used to identify the business.

business.​accountAddressobject or nullrequired

The address of the business, this is the address that will be shown to the public.

business.​businessLegalNameobject or nullrequired

The legal name of the business, this is the name that will be used for legal purposes.

business.​displayNameobject or nullrequired

The display name of the business, this is the name that will be shown to the public.

business.​descriptionobject or nullrequired

The description of the business, this is the description that will be shown to the public.

business.​shortDescriptionobject or nullrequired

The short description of the business, this is the description that will be shown to the public.

business.​websiteUrlobject or nullrequired

The website of the business, this is the website that will be shown to the public.

business.​imageUrlobject or nullrequired

The image of the business, this is the image that will be shown to the public.

business.​streetAddressobject or nullrequired

The address of the business, this is the address that will be shown to the public.

business.​cityobject or nullrequired

The city of the business, this is the city that will be shown to the public.

business.​postalCodeobject or nullrequired

The postal code of the business, this is the postal code that will be shown to the public.

business.​coordsLatitudeobject or nullrequired

The latitude of the business, this is the latitude that will be shown to the public.

business.​coordsLongitudeobject or nullrequired

The longitude of the business, this is the longitude that will be shown to the public.

business.​businessTypeobject or nullrequired
business.​businessType.​idnumber

Business type id

business.​businessType.​namestring or nullrequired

Business type name

business.​businessType.​descriptionstring or nullrequired

Business type description

business.​businessType.​codestring or nullrequired

Business type code

business.​businessType.​iconUrlstring or nullrequired

Business type icon url

business.​isActivebooleanrequired

The status of the business, this is the status that will be shown to the public.

business.​canMintTokenbooleanrequired

The ability to mint token for the business, this is the ability that will be shown to the public.

business.​canChargeTokenbooleanrequired

The ability to charge token for the business, this is the ability that will be shown to the public.

business.​canManageUsersbooleanrequired

The ability to manage users for the business, this is the ability that will be shown to the public.

business.​canReceiveDonationbooleanrequired

The ability to receive donation for the business, this is the ability that will be shown to the public.

donationAccountAddressstring

Donation Account Address

donationTypeobject
createdAtstring(date-time)

create date

updatedAtstring(date-time)

update date

]
Response
application/json
[ { "id": "string", "stripePaymentIntentId": "string", "status": {}, "amount": 0, "currency": "eur", "quantity": 0, "purchaseToken": { … }, "user": { … }, "business": { … }, "donationAccountAddress": "string", "donationType": { … }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ]

Request

Update an existing purchase token in the product catalog. Admin-only operation. Replaces PUT /purchase/admin/token/{id}

Security
tenantAdminJWT
Path
idstringrequired
Bodyapplication/jsonrequired
descriptionstring

Purchase Token description

isActiveboolean

Purchase Token isActive

curl -i -X PUT \
  'https://docs.pers.ninja/_mock/swagger/purchases/tokens/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "string",
    "isActive": true
  }'

Responses

Purchase token updated successfully

Bodyapplication/json
idstringrequired

Purchase Token id

descriptionstringrequired

Purchase Token description

tokenobjectrequired
token.​idstringrequired

Id of the token

token.​contractAddressstringrequired

Address of the token

token.​metadataArray of objects(TokenMetadataDTO)

Metadata of the token, this is optional and can be null in case of Point token

token.​abiobjectrequired

this is the abi of the contract, this is the interface of the contract to interact with it

token.​chainIdnumberrequired

this is the chain id of the chain where the token is deployed

token.​abiUrlobjectrequired

this is the url of the abi of the contract, to be used to fetch the abi of the contract

token.​namestring

this is the name of the token contract

token.​symbolstring

this is the symbol of the token contract, this is optional and can be null

token.​decimalsnumber

this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)

token.​isActivebooleanrequired

This can be used to enable or disable the token

token.​isGallerybooleanrequired

This can be used to enable or disable the token for gallery

token.​typestringrequired

This is the underlying web3 native type of the token contract

Enum"ERC20""ERC1155""ERC721"
contractTokenIdobjectrequired

optional contract token id

purchaseTypeobjectrequired
purchaseType.​conversionRatenumberrequired

Conversion Rate of the token

purchaseType.​currencystringrequired

Currency of the token

Value"eur"
purchaseType.​idnumberrequired

Purchase Type id

isActivebooleanrequired

Purchase Token isActive

Response
application/json
{ "id": "string", "description": "string", "token": { "id": "string", "contractAddress": "string", "metadata": [ … ], "abi": {}, "chainId": 0, "abiUrl": {}, "name": "string", "symbol": "string", "decimals": 0, "isActive": true, "isGallery": true, "type": "ERC20" }, "contractTokenId": {}, "purchaseType": { "conversionRate": 0, "currency": "eur", "id": 0 }, "isActive": true }

Request

Delete an existing purchase token from the product catalog. Admin-only operation. Replaces DELETE /purchase/admin/token/{id}

Security
tenantAdminJWT
Path
idstringrequired
curl -i -X DELETE \
  'https://docs.pers.ninja/_mock/swagger/purchases/tokens/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Purchase token deleted successfully

Bodyapplication/json
boolean
Response
application/json
true

Request

Create a new purchase type for system configuration. Admin-only operation. Replaces POST /purchase/admin/type

Security
tenantAdminJWT
Bodyapplication/jsonrequired
conversionRatenumberrequired

Conversion Rate of the token

currencystringrequired

Currency of the token

Value"eur"
curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/purchases/types \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "conversionRate": 0,
    "currency": "eur"
  }'

Responses

Purchase type created successfully

Bodyapplication/json
conversionRatenumberrequired

Conversion Rate of the token

currencystringrequired

Currency of the token

Value"eur"
idnumberrequired

Purchase Type id

Response
application/json
{ "conversionRate": 0, "currency": "eur", "id": 0 }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations