Skip to main content

Overview

The Contract object represents an automation that your enterprise requests from a creator. For a typical integration, you’ll create an Account Connection for a creator in your system, then create a Contract referencing that account connection, before directing them opt in via a Connect Link.

Methods

POST  /contract
Create a new contract for an account connection under your enterprise.

Body Parameters

account_connection
string
required
ID of Account Connection to request contract from.
type
string
required
Type of contract to create. See below for a list of available contract types.
deposit_source
string
required
Source of funds deposited into the creator’s account that will trigger this contract. Required if type is deposit_split. See below for list of available deposit sources.
deposit_minimum_in_cents
number
Minimum deposit amount that will trigger this contract. Must be a non-negative integer.
deposit_maximum_in_cents
number
Maximum deposit amount that will trigger this contract. Must be a non-negative integer.
split_percent_amount
number
required
Percentage of eligible deposit to transfer to your enterprise’s operating account. Either this or split_fixed_amount_in_cents is required if type is deposit_split. Must be a number between 0 and 100.
split_fixed_amount_in_cents
number
required
Fixed amount of eligible deposit to transfer to your enterprise’s operating account. Either this or split_percent_amount is required if type is deposit_split. Must be a non-negative integer.
split_amount_max_in_cents
number
Maximum amount of transfer to your enterprise’s operating account per eligible deposit. Must be a non-negative integer. If not provided, there is no maximum.
user_data
object
User defined data that can be attached to the object. See the User Data page for details.

Example

// POST /contract
{
    "account_connection": "acon_XXXXX",
    "type": "deposit_split",
    "deposit_source": "snap",
    "split_percent_amount": 10
}

Properties

id
string
Identifier for this contract.
type
string
Type of smart contract. Must be deposit_split.
status
string
Status of account connection. One of created, active, declined, terminated, or expired. Only users can activate a contract (through the Connect flow).
deposit_source
string
Source of funds for deposit split contracts. One of google, snap, or only_fans.
deposit_minimum_in_cents
number
Minimum deposit amount that will trigger this contract.
deposit_maximum_in_cents
number
Maximum deposit amount that will trigger this contract.
split_percent_amount
number
Percentage of eligible deposit to transfer to your enterprise’s operating account.
split_fixed_amount_in_cents
number
Fixed amount of eligible deposit to transfer to your enterprise’s operating account.
split_amount_max_in_cents
number
Maximum amount of transfer to your enterprise’s operating account per eligible deposit.
activity
object[]
An activity log that tracks the status changes, internal transfers, and any errors associated with a given contract.
user_data
object
User defined data that can be attached to the object. See the User Data page for details.