Enclaive Multi Cloud Platform
HomeDocumentationTutorialsTry Cloud
  • Enclaive Multi Cloud Platform
  • Documentation
    • What is EMCP?
    • Why use EMCP?
    • Features
      • Virtual HSM
      • Vault
      • Nitride
      • Buckypaper
      • Dyneemes
      • Morphism
    • Supported Cloud Platforms
  • Tutorials
    • Buckypaper
      • Create a Buckypaper VM
      • Connect with SSH
      • Manage DNS
        • Cloudflare
      • Tag Buckypaper
      • Secure your VM with Firewall
      • Turn on/off Buckypapers
      • Destroy Buckypapers
    • Dyneemes
      • Create clusters
      • Connect to a cluster
      • Setup advanced monitoring
      • Upgrade without data loss
      • Add nodes and node pools
      • Drain and restart nodes
    • Data-in-use encrypting Database
      • Create a database cluster
      • Configure CNAME DNS record
      • Delete Applications
    • Applications
      • Create Nextcloud Hub
      • Configure CNAME DNS record
      • Delete Applications
      • After the installation
    • Billing
      • Add/Update payment method
      • Add/Change address
      • Add/Change VAT
    • Settings
      • Manage Team
        • Create a team
        • Delete a team
        • Invite team members
        • Remove team members
      • Bring your own Subscription
        • Azure
        • AWS
        • Google Cloud Platform
    • Account
      • Registration
      • Login
      • Delete account
  • Developers
    • API
      • Console
        • Auth
          • JWKS
        • Account
          • Need
        • Projects
          • Activity
        • Manage
          • Application
            • DNS
          • Database
          • Kubernetes
          • Virtual Machine
            • Security rule
          • Configurations
            • Location
            • Image
            • Price
            • Size
            • Provider
            • Cloud Provider
          • Attestation
        • vHSM
          • BYOS
          • User Storage
        • Settings
          • Team
          • Invite
        • Billing
          • Settings
          • Invoice
          • Cost
          • Promo - TODO
        • Support
          • Hubspot Files
          • Ticket
      • Admin
        • Auth
        • Accounts
          • Team
            • User
            • Application
            • Virtual machine
            • Database
            • Cluster
            • Resource
        • Quotas
          • Default quota
          • Provider quota
          • Team quota
        • Invoices
  • Resources
    • Blog
    • GitHub
    • Youtube
    • CCx101
Powered by GitBook
On this page
  • Retrieve detailed user information.
  • Update user information
  • Deactivate a user
  • Retrieve all notifications for the user.
  • Verify a user
  • Retrieve all payment methods added by the user.
  • Delete a payment method.
  • Retrieve payment account information from Stripe.

Was this helpful?

  1. Developers
  2. API
  3. Console

Account

In the "Account" section, endpoints for managing user accounts are described.

Retrieve detailed user information.

GET {{BASE_URL}}/api/users/current

Fetches comprehensive information about the currently authenticated user

Headers

Name
Type
Description

Authorization*

String

Bearer Token

{
    "_id": "6548a41138406c14db33b606",
    "email": "john.doe@mail.com",
    "name": "John Doe",
    "createdAt": "2023-11-06T08:30:09.166Z",
    "balance": 0,
    "status": 0,
    "emailVerified": true
}

Update user information

PUT {{BASE_URL}}/api/users/current

Allows users to update their profile information, such as name, email, or other relevant details.

Headers

Name
Type
Description

Authorization*

String

Bearer Token

Request Body

Name
Type
Description

name

String

oldPassword

String

newPassword

String

{
    "email": "john.doe@mail.com",
    "name": "John Doe",
    "createdAt": "2023-11-06T08:30:09.166Z",
    "_id": "6548a41138406c14db33b606"
}

Once the user has been deactivated, access to the application will be blocked, but the user will be able to restore the account.

Deactivate a user

PUT {{BASE_URL}}/api/users/current/deactivate

Deactivates the user's account, rendering it inaccessible while retaining user data.

Headers

Name
Type
Description

Authorization*

String

Bearer Token

{"message": "Account is deactivated"}

Retrieve all notifications for the user.

GET {{BASE_URL}}/api/users/current/notifications

Retrieves all notifications and messages intended for the user.

Headers

Name
Type
Description

Authorization*

String

Bearer Token

[
 {
  "messageType":"invite",
  "message": "You invited to join Dev team."
 }
]

After registering, the customer must add the first payment method (default) for paying invoices. We use Stripe to manage payments. We freeze $1 from the customer to check that the card is active and there are funds, then we return that dollar and add that payment method to the user.

Verify a user

POST {{BASE_URL}}/api/users/current/verify-payment

Confirms and validates a user's selected payment method for future transactions.

Headers

Name
Type
Description

Authorization*

String

Bearer Token

Request Body

Name
Type
Description

paymentMethod

String

Stripe Payment method ID

{
    "status": "ok"
}

Retrieve all payment methods added by the user.

GET {{BASE_URL}}/api/users/current/list-payment-methods

Retrieves a list of all payment methods that the user has added to their account, providing an overview of available payment options for transactions and billing.

Headers

Name
Type
Description

Authorization*

String

Bearer Token

{
    "object": "list",
    "data": [
        {
            "id": "pm_1O9OCiA0ZUrt0vQJ7GqrPclY",
            "object": "payment_method",
            "billing_details": {
                "address": {
                    "city": "Test",
                    "country": "DE",
                    "line1": "test",
                    "line2": "test",
                    "postal_code": "34334",
                    "state": "Test"
                },
                "email": "john.doe@mail.com",
                "name": "John Doe",
                "phone": null
            },
            "card": {
                "brand": "visa",
                "checks": {
                    "address_line1_check": "pass",
                    "address_postal_code_check": "pass",
                    "cvc_check": "pass"
                },
                "country": "US",
                "exp_month": 2,
                "exp_year": 2032,
                "fingerprint": "YxdxFzhKIAGEnLMN",
                "funding": "credit",
                "generated_from": null,
                "last4": "4242",
                "networks": {
                    "available": [
                        "visa"
                    ],
                    "preferred": null
                },
                "three_d_secure_usage": {
                    "supported": true
                },
                "wallet": null
            },
            "created": 1699259440,
            "customer": "cus_OxIokju2aarNVm",
            "livemode": false,
            "metadata": {},
            "type": "card"
        }
    ],
    "has_more": false,
    "url": "/v1/customers/cus_OxIokju2aarNVm/payment_methods"
}

Delete a payment method.

DELETE {{BASE_URL}}/api/users/current/payment-method/{id}

Deletes a specific payment method associated with the user's account.

Path Parameters

Name
Type
Description

id

String

Payment method ID

Headers

Name
Type
Description

Authorization*

String

Bearer Token

{}

This enpoint is required to see detailed information about the user in Stripe.

Retrieve payment account information from Stripe.

GET {{BASE_URL}}/api/users/current/retrieve

Retrieves relevant payment account details for the current user from the Stripe payment gateway.

Headers

Name
Type
Description

Authorization*

String

Bearer Token

{
    "id": "cus_OxIokju2aarNVm",
    "object": "customer",
    "address": {
        "city": "Test",
        "country": "Afghanistan",
        "line1": "Test",
        "line2": "test1",
        "postal_code": "34334",
        "state": "Test"
    },
    "balance": 0,
    "created": 1699259424,
    "currency": "usd",
    "default_source": null,
    "delinquent": false,
    "description": null,
    "discount": null,
    "email": "john.doe@mail.com",
    "invoice_prefix": "B96FCFF5",
    "invoice_settings": {
        "custom_fields": null,
        "default_payment_method": "pm_1O9OCiA0ZUrt0vQJ7GqrPclY",
        "footer": null,
        "rendering_options": null
    },
    "livemode": false,
    "metadata": {},
    "name": "John Doe",
    "phone": null,
    "preferred_locales": [],
    "shipping": null,
    "tax_exempt": "none",
    "test_clock": null
}

Last updated 1 year ago

Was this helpful?