StripeConnect

The Space Invoices API simplifies the process of setting up everything required for processing payments on invoices and collecting platform application fees for Connect Accounts. With our cloud-hosted UI, there's no need for additional development to enable this feature.

Key services provided by the Space Invoices API include:

  • Quick connection for your own Stripe Connect account
  • Effortless onboarding for Organizations via our cloud-hosted UI
  • A fully-featured online invoice view page with an integrated "Pay now" button for collecting payments directly on invoices
  • Automated invoice status updates based on received payments
  • Automatic application fee collection with customization options

By utilizing the Space Invoices API, you can quickly and easily support payment processing on invoices for both yourself and your users, streamlining your invoicing and payment collection processes.

Endpoints:

  • GET /v1/documents/:shareableId/stripe-connect/payment-intent
  • GET /v1/organizations/:id/stripe-connect/account/link
  • POST /v1/organizations/:id/stripe-connect/account
  • GET /v1/organizations/:id/stripe-connect/account
  • PATCH /v1/stripe-connect/accounts/:id
  • POST /v1/stripe-connect/:id/webhooks
  • POST /v1/stripe-connect
  • PATCH /v1/stripe-connect
  • GET /v1/stripe-connect

The StripeConnect object

Parameters

  • id string readonly

  • privateKey string

  • publicKey string

  • webhookSecret string

    Stripe webhooks secret

  • connectWebhookSecret string

    Stripe webhooks secret for Connect specific calls

  • active boolean

  • refreshUrl string

    URL to redirect to when account onboarding link needs to be re-generated.

  • returnUrl string

    URL to return to once account onboarding is completed.

  • applicationFee number

    Application Fee collected by Stripe Connect Platform

  • spaceInvoicesFee number

    Application Fee collected by Space Invoices

  • accountId string

  • Additional propertiesExpand all
    
      {
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "custom": {},
  "id": "string",
  "privateKey": "string",
  "publicKey": "string",
  "webhookSecret": "string",
  "connectWebhookSecret": "string",
  "active": true,
  "refreshUrl": "string",
  "returnUrl": "string",
  "applicationFee": 42,
  "spaceInvoicesFee": 42,
  "accountId": "string"
}    
  

Find StripeConnects

GET /v1/documents/:shareableId/stripe-connect/payment-intent

Parameters

Path
  • shareableId string required

      
        const response = await fetch('https://api.spaceinvoices.com/v1/documents/{shareableId}/stripe-connect/payment-intent', {
  method: 'GET',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/documents/{shareableId}/stripe-connect/payment-intent \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/documents/{shareableId}/stripe-connect/payment-intent'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "paymentIntentId": "string",
  "clientSecret": "string",
  "publicKey": "string",
  "amount": 42,
  "currencyId": "string"
}    
  

Find StripeConnects

GET /v1/organizations/:id/stripe-connect/account/link

Parameters

Path
  • id string required

Response:

    
      {
  "url": "string"
}    
  

Create StripeConnect

POST /v1/organizations/:id/stripe-connect/account

Parameters

Path
  • id string required

Properties

  • active boolean optional

      
        const response = await fetch('https://api.spaceinvoices.com/v1/organizations/{id}/stripe-connect/account', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    active: true
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/organizations/{id}/stripe-connect/account \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "active": true
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/organizations/{id}/stripe-connect/account'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  'active': True
}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "id": "string",
  "stripeAccountId": "string",
  "chargesEnabled": true,
  "active": true,
  "organizationId": "string",
  "stripeConnectId": "string"
}    
  

Find StripeConnects

GET /v1/organizations/:id/stripe-connect/account

Parameters

Path
  • id string required

Query
  • filter optional

      
        const response = await fetch('https://api.spaceinvoices.com/v1/organizations/{id}/stripe-connect/account', {
  method: 'GET',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/organizations/{id}/stripe-connect/account \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/organizations/{id}/stripe-connect/account'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "id": "string",
  "stripeAccountId": "string",
  "chargesEnabled": true,
  "active": true,
  "organizationId": "string",
  "stripeConnectId": "string"
}    
  

Patch StripeConnect

PATCH /v1/stripe-connect/accounts/:id

Parameters

Path
  • id string required

Properties

  • active boolean optional

      
        const response = await fetch('https://api.spaceinvoices.com/v1/stripe-connect/accounts/{id}', {
  method: 'PATCH',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    active: true
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X PATCH https://api.spaceinvoices.com/v1/stripe-connect/accounts/{id} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "active": true
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/stripe-connect/accounts/{id}'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  'active': True
}
response = requests.patch(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {

}    
  

Create StripeConnect

POST /v1/stripe-connect/:id/webhooks

Parameters

Path
  • id string required

Query
  • connect boolean optional

Properties

      
        const response = await fetch('https://api.spaceinvoices.com/v1/stripe-connect/{id}/webhooks', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({

  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/stripe-connect/{id}/webhooks \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{

  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/stripe-connect/{id}/webhooks'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {

}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {

}    
  

Create StripeConnect

POST /v1/stripe-connect

Properties

  • privateKey string required

  • publicKey string required

  • connectWebhookSecret string optional

    Stripe webhooks secret for Connect specific calls

  • active boolean optional

  • refreshUrl string optional

    URL to redirect to when account onboarding link needs to be re-generated.

  • returnUrl string optional

    URL to return to once account onboarding is completed.

  • applicationFee number optional

    Application Fee collected by Stripe Connect Platform

  • Additional propertiesExpand all
      
        const response = await fetch('https://api.spaceinvoices.com/v1/stripe-connect', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    custom: {},
    privateKey: 'string',
    publicKey: 'string',
    connectWebhookSecret: 'string',
    active: true,
    refreshUrl: 'string',
    returnUrl: 'string',
    applicationFee: 42
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/stripe-connect \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "custom": {}, \
    "privateKey": "string", \
    "publicKey": "string", \
    "connectWebhookSecret": "string", \
    "active": true, \
    "refreshUrl": "string", \
    "returnUrl": "string", \
    "applicationFee": 42
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/stripe-connect'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  'custom': {},
  'privateKey': 'string',
  'publicKey': 'string',
  'connectWebhookSecret': 'string',
  'active': True,
  'refreshUrl': 'string',
  'returnUrl': 'string',
  'applicationFee': 42
}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "custom": {},
  "id": "string",
  "privateKey": "string",
  "publicKey": "string",
  "webhookSecret": "string",
  "connectWebhookSecret": "string",
  "active": true,
  "refreshUrl": "string",
  "returnUrl": "string",
  "applicationFee": 42,
  "spaceInvoicesFee": 42,
  "accountId": "string"
}    
  

Patch StripeConnects

PATCH /v1/stripe-connect

Properties

  • privateKey string optional

  • publicKey string optional

  • connectWebhookSecret string optional

    Stripe webhooks secret for Connect specific calls

  • active boolean optional

  • refreshUrl string optional

    URL to redirect to when account onboarding link needs to be re-generated.

  • returnUrl string optional

    URL to return to once account onboarding is completed.

  • applicationFee number optional

    Application Fee collected by Stripe Connect Platform

  • Additional propertiesExpand all
      
        const response = await fetch('https://api.spaceinvoices.com/v1/stripe-connect', {
  method: 'PATCH',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    custom: {},
    privateKey: 'string',
    publicKey: 'string',
    connectWebhookSecret: 'string',
    active: true,
    refreshUrl: 'string',
    returnUrl: 'string',
    applicationFee: 42
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X PATCH https://api.spaceinvoices.com/v1/stripe-connect \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "custom": {}, \
    "privateKey": "string", \
    "publicKey": "string", \
    "connectWebhookSecret": "string", \
    "active": true, \
    "refreshUrl": "string", \
    "returnUrl": "string", \
    "applicationFee": 42
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/stripe-connect'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  'custom': {},
  'privateKey': 'string',
  'publicKey': 'string',
  'connectWebhookSecret': 'string',
  'active': True,
  'refreshUrl': 'string',
  'returnUrl': 'string',
  'applicationFee': 42
}
response = requests.patch(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {

}    
  

Find StripeConnects

GET /v1/stripe-connect

Parameters

Query
  • filter optional

      
        const response = await fetch('https://api.spaceinvoices.com/v1/stripe-connect', {
  method: 'GET',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/stripe-connect \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/stripe-connect'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "custom": {},
  "id": "string",
  "privateKey": "string",
  "publicKey": "string",
  "webhookSecret": "string",
  "connectWebhookSecret": "string",
  "active": true,
  "refreshUrl": "string",
  "returnUrl": "string",
  "applicationFee": 42,
  "spaceInvoicesFee": 42,
  "accountId": "string"
}