Handles Stripe payment events for financial reconciliation. CRITICAL: Do not modify without extensive testing. Replaces POST /purchase/stripe-webhook
PERS-api docs (2.0.2)
https://docs.pers.ninja/_mock/swagger/
https://api.pers.ninja/v2/
- Mock server
https://docs.pers.ninja/_mock/swagger/purchases/webhooks/stripe
https://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 server
https://docs.pers.ninja/_mock/swagger/purchases/tokens
https://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
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)
[ { "id": "string", "description": "string", "token": { … }, "contractTokenId": {}, "purchaseType": { … }, "isActive": true } ]
- Mock server
https://docs.pers.ninja/_mock/swagger/purchases/tokens
https://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
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)
{ "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 server
https://docs.pers.ninja/_mock/swagger/purchases/donation-types
https://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 server
https://docs.pers.ninja/_mock/swagger/purchases/donation-types
https://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 server
https://docs.pers.ninja/_mock/swagger/purchases/payment-intents
https://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 server
https://docs.pers.ninja/_mock/swagger/purchases/payment-intents/{paymentIntentId}
https://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 server
https://docs.pers.ninja/_mock/swagger/purchases/payment-intents/{paymentIntentId}
https://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 server
https://docs.pers.ninja/_mock/swagger/purchases
https://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 'Content-Type: application/json' \
-H 'x-project-key: YOUR_API_KEY_HERE' \
-d '{
"quantity": 0,
"paymentIntentId": "string",
"purchaseTokenId": "string",
"donationTypeId": 0,
"donationAccountAddress": "string"
}'Purchase created successfully
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
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
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 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": {}, "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 server
https://docs.pers.ninja/_mock/swagger/purchases/me/history
https://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 'x-project-key: YOUR_API_KEY_HERE'User purchase history retrieved
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
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
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 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 server
https://docs.pers.ninja/_mock/swagger/purchases/tokens/{id}
https://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
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)
{ "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 server
https://docs.pers.ninja/_mock/swagger/purchases/tokens/{id}
https://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 server
https://docs.pers.ninja/_mock/swagger/purchases/types
https://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 }