Payments Data Platform | Modernbanc

Resources

What are resources?

Resources are mini-apps. They're reusable containers for your functionality. They can store workflows, connections, actions, and triggers.

The most common examples of resources are integrations with external systems (e.g., Stripe resource) or reusable logic (Interest or fee calculation resource)

Resource Versioning

Resources are versioned objects. Versions can have either draft or published status. You can't edit published versions, but you can use them.

What can be stored in a resource

Resources can hold workflows, connections, actions, triggers. Once you've created a Resource, you need to add it to your workspace. To add (link) a resource and set it up using the following endpoints. Each resource can only have one link in a given workspace.

Usage

Create a resource

  • Navigate to Resources page, or press G and then R.
  • Click the Create button in the top right.
  • Give the resource a Name and optional Description.
  • To enable the Resource for your environment, click the Enable resource + button in the top nav.
  • To add Workflows, Connections, or Triggers, click the Edit button in the top nav, and then click the Add button next to the resource type you want to add.
  • To add Variables, navigate to the Variables tab in the left hand nav.
    • Optionally, you can add a variable definition by clicking the Add definitions (optional) + button.
  • When you're finished with the changes, click the Save button in the top nav, or press Ctrl + S.

List resources

  • Navigate to Resources page, or press G and then R.
  • The list of resources will be displayed. You can filter or sort to narrow the results by clicking the Filters or Sorts buttons in the top nav.
  • To view a resource, click on the resource name.

Update a resource

  • Navigate to Resources page, or press G and then R.
  • Click on the resource you want to update.
  • Click on the Edit button in the top nav.
  • Make the desired changes, and click Save.
  • You can Publish the resource to make it available for reuse.
    • Note, once a resource is published you will need to create a new version to make changes.

Note about resource variables

A resource can store variables and even propagate some variables to its objects via a unique character _.

{
  "a": "Hello",
  "_connections": {
    "<connection_version_id>": {
      "some": "variable"
    }
  },
  "_workflows": {
    "<workflow_version_id>": {
      "some_other": "variable"
    }
  }
}

Note about public/private resources

  • Sharing resources is done via the sharing_type parameter. Right now, this is public | private.
    • Anyone can view a resource and all its versions if its sharing type is set to public.
    • Setting a resource to private is always allowed, but workspaces already linked to the resource will still be able to view the resource and all its versions.