Handles Stripe payment events for financial reconciliation. CRITICAL: Do not modify without extensive testing. Replaces POST /purchase/stripe-webhook
PERS-api Documentation (2.0.12)
PERS API Documentation
This RESTful API enables seamless integration of Web3 loyalty, token management, and engagement features into your applications.
Usage Guidelines:
- RESTful Design: Resources are accessed via standard HTTP methods (GET, POST, PUT, DELETE) with predictable, resource-oriented URLs.
- Authentication: Secure access is enforced via Bearer Tokens (JWT) and Project Keys (defining the Tenant context).
- Data Format: All requests and responses utilize standard JSON formatting.
Explore the modules below for detailed endpoint specifications, schemas, and testing capabilities.

- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/webhooks/stripe
- Production APIhttps://api.pers.ninja/v2/purchases/webhooks/stripe
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.pers.ninja/_mock/swagger/purchases/webhooks/stripe- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/tokens
- Production APIhttps://api.pers.ninja/v2/purchases/tokens
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.pers.ninja/_mock/swagger/purchases/tokens?active=true' \
-H 'x-project-key: YOUR_API_KEY_HERE'Purchase tokens retrieved based on access level
Token
Metadata of the token, this is optional and can be null in case of Point token
this is the abi of the contract, this is the interface of the contract to interact with it
this is the url of the abi of the contract, to be used to fetch the abi of the contract
this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)
Purchase Type
[ { "id": "string", "description": "string", "token": { … }, "contractTokenId": {}, "purchaseType": { … }, "isActive": true } ]
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/tokens
- Production APIhttps://api.pers.ninja/v2/purchases/tokens
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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
}'Purchase token created successfully
Token
Metadata of the token, this is optional and can be null in case of Point token
this is the abi of the contract, this is the interface of the contract to interact with it
this is the url of the abi of the contract, to be used to fetch the abi of the contract
this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)
Purchase Type
{ "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 }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/donation-types
- Production APIhttps://api.pers.ninja/v2/purchases/donation-types
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.pers.ninja/_mock/swagger/purchases/donation-types \
-H 'x-project-key: YOUR_API_KEY_HERE'[ { "percentage": 0, "id": 0 } ]
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/donation-types
- Production APIhttps://api.pers.ninja/v2/purchases/donation-types
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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
}'{ "percentage": 0, "id": 0 }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/payment-intents
- Production APIhttps://api.pers.ninja/v2/purchases/payment-intents
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}'{ "paymentClientSecret": {}, "paymentIntentId": "string" }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/payment-intents/{paymentIntentId}
- Production APIhttps://api.pers.ninja/v2/purchases/payment-intents/{paymentIntentId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}'{ "paymentClientSecret": {}, "paymentIntentId": "string" }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/payment-intents/{paymentIntentId}
- Production APIhttps://api.pers.ninja/v2/purchases/payment-intents/{paymentIntentId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://docs.pers.ninja/_mock/swagger/purchases/payment-intents/{paymentIntentId}' \
-H 'x-project-key: YOUR_API_KEY_HERE'{ "paymentClientSecret": {}, "paymentIntentId": "string" }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases
- Production APIhttps://api.pers.ninja/v2/purchases
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.pers.ninja/_mock/swagger/purchases \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"quantity": 0,
"paymentIntentId": "string",
"purchaseTokenId": "string",
"donationTypeId": 0,
"donationAccountAddress": "string"
}'Purchase created successfully
Purchase Token
Token
Metadata of the token, this is optional and can be null in case of Point token
this is the abi of the contract, this is the interface of the contract to interact with it
this is the chain id of the chain where the token is deployed
this is the url of the abi of the contract, to be used to fetch the abi of the contract
this is the symbol of the token contract, this is optional and can be null
this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)
This can be used to enable or disable the token for gallery
Purchase Type
User
Universal identifier email for deterministic operations. Generated from B2B inputs (email, externalId) for wallet salt generation and external integrations.
Current active signing account ID for external wallet operations
User-owned counterfactual smart contract wallets that can receive tokens
Owner type for polymorphic ownership
Type of internal wallet
Current status of the wallet
ID of signing account that owns this internal wallet
Business
The id of the business, this is unique and will be used to identify the business.
The email of the business, this is unique and will be used to identify the business.
The address of the business, this is the address that will be shown to the public.
The legal name of the business, this is the name that will be used for legal purposes.
The display name of the business, this is the name that will be shown to the public.
The description of the business, this is the description that will be shown to the public.
The short description of the business, this is the description that will be shown to the public.
The website of the business, this is the website that will be shown to the public.
The image of the business, this is the image that will be shown to the public.
The address of the business, this is the address that will be shown to the public.
The city of the business, this is the city that will be shown to the public.
The postal code of the business, this is the postal code that will be shown to the public.
The latitude of the business, this is the latitude that will be shown to the public.
The longitude of the business, this is the longitude that will be shown to the public.
The business type of the business, this is the business type that will be shown to the public.
The status of the business, this is the status that will be shown to the public.
The ability to mint token for the business, this is the ability that will be shown to the public.
The ability to charge token for the business, this is the ability that will be shown to the public.
The ability to manage users for the business, this is the ability that will be shown to the public.
{ "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": {}, "identifierEmail": "user123@user.pers.internal", "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": {} }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/me/history
- Production APIhttps://api.pers.ninja/v2/purchases/me/history
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.pers.ninja/_mock/swagger/purchases/me/history \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'User purchase history retrieved
Purchase Token
Token
Metadata of the token, this is optional and can be null in case of Point token
this is the abi of the contract, this is the interface of the contract to interact with it
this is the chain id of the chain where the token is deployed
this is the url of the abi of the contract, to be used to fetch the abi of the contract
this is the symbol of the token contract, this is optional and can be null
this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)
This can be used to enable or disable the token for gallery
Purchase Type
User
Universal identifier email for deterministic operations. Generated from B2B inputs (email, externalId) for wallet salt generation and external integrations.
Current active signing account ID for external wallet operations
User-owned counterfactual smart contract wallets that can receive tokens
Owner type for polymorphic ownership
Type of internal wallet
Current status of the wallet
ID of signing account that owns this internal wallet
Business
The id of the business, this is unique and will be used to identify the business.
The email of the business, this is unique and will be used to identify the business.
The address of the business, this is the address that will be shown to the public.
The legal name of the business, this is the name that will be used for legal purposes.
The display name of the business, this is the name that will be shown to the public.
The description of the business, this is the description that will be shown to the public.
The short description of the business, this is the description that will be shown to the public.
The website of the business, this is the website that will be shown to the public.
The image of the business, this is the image that will be shown to the public.
The address of the business, this is the address that will be shown to the public.
The city of the business, this is the city that will be shown to the public.
The postal code of the business, this is the postal code that will be shown to the public.
The latitude of the business, this is the latitude that will be shown to the public.
The longitude of the business, this is the longitude that will be shown to the public.
The business type of the business, this is the business type that will be shown to the public.
The status of the business, this is the status that will be shown to the public.
The ability to mint token for the business, this is the ability that will be shown to the public.
The ability to charge token for the business, this is the ability that will be shown to the public.
The ability to manage users for the business, this is the ability that will be shown to the public.
[ { "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" } ]
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/tokens/{id}
- Production APIhttps://api.pers.ninja/v2/purchases/tokens/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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
}'Purchase token updated successfully
Token
Metadata of the token, this is optional and can be null in case of Point token
this is the abi of the contract, this is the interface of the contract to interact with it
this is the url of the abi of the contract, to be used to fetch the abi of the contract
this is the decimals of the token. This is optional and only used for ERC20 tokens (Points)
Purchase Type
{ "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 }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/tokens/{id}
- Production APIhttps://api.pers.ninja/v2/purchases/tokens/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://docs.pers.ninja/_mock/swagger/purchases/tokens/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock serverhttps://docs.pers.ninja/_mock/swagger/purchases/types
- Production APIhttps://api.pers.ninja/v2/purchases/types
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}'{ "conversionRate": 0, "currency": "eur", "id": 0 }