Business API Reference

This is an object representing a business account. A business account can accept payments from customers and pay out to connected bank account.

A business can be a customer, vendor or both.

The Business model

The business model is the nucleus of operations, managing customers, estimates, and invoices.

Properties

  • Name
    id
    Type
    string
    Field Type
    Description

    Unique identifier for the business.

  • Name
    name
    Type
    string
    Field Type
    Description

    Name of the business.

  • Name
    email
    Type
    string
    Field Type
    Description

    Email of the business.

  • Name
    contact_first_name
    Type
    string
    Field Type
    Description

    First name of the business.

  • Name
    contact_last_name
    Type
    string
    Field Type
    Description

    Last name of the business.

  • Name
    phone
    Type
    string
    Field Type
    Description

    Phone number of the business.

  • Name
    website
    Type
    string
    Field Type
    Description

    Website of the business.

  • Name
    is_customer
    Type
    boolean
    Field Type
    Description

    Specify whether the given business can make payments and receive invoices as a customer.

  • Name
    is_vendor
    Type
    boolean
    Field Type
    Description

    Specify whether the given business can receive payments and send invoices as a vendor.

  • Name
    logo_url
    Type
    string
    Field Type
    Description

    Logo of the business.

  • Name
    business_type
    Type
    string
    Field Type
    Description

    Type of the business.

  • Name
    created_at
    Type
    timestamp
    Field Type
    Description

    Timestamp when the business was created.

  • Name
    time_zone
    Type
    string
    Field Type
    Description

    Timezone of the business.

  • Name
    disabled
    Type
    boolean
    Field Type
    Description

    Specify whether the given business is disabled.

  • Name
    payouts_enabled
    Type
    boolean
    Field Type
    Description

    Whether the business is enabled for payouts.

  • Name
    billing_address
    Type
    object
    Field Type
    Description

    Billing address of the business.

  • Name
    shipping_address
    Type
    object
    Field Type
    Description

    Shipping address of the business.

  • Name
    creator_id
    Type
    string
    Field Type
    Description

    ID of the user who created the business.


GETapi/v1/businesses

List all businesses

This endpoint allows you to retrieve a paginated list of all businesses on the platform.

Query Parameters

  • Name
    limit
    Type
    integer
    Field Type
    optional
    Description

    Limit the number of businesses returned. (default is 10)

  • Name
    page
    Type
    integer
    Field Type
    optional
    Description

    Page number for pagination. (default is 1)

  • Name
    name
    Type
    string
    Field Type
    optional
    Description

    Filter matching records by name.

  • Name
    business_type
    Type
    string
    Field Type
    optional
    Description

    Filter matching records by business_type.

  • Name
    email
    Type
    string
    Field Type
    optional
    Description

    Filter matching records by email.

  • Name
    phone
    Type
    string
    Field Type
    optional
    Description

    Filter matching records by phone.

  • Name
    contact_first_name
    Type
    string
    Field Type
    optional
    Description

    Filter matching records by contact_first_name.

  • Name
    contact_last_name
    Type
    string
    Field Type
    optional
    Description

    Filter matching records by contact_last_name.

  • Name
    is_customer
    Type
    boolean
    Field Type
    optional
    Description

    Filter matching records by is_customer.

  • Name
    is_vendor
    Type
    boolean
    Field Type
    optional
    Description

    Filter matching records by is_vendor.

Request

GET
api/v1/businesses
curl --request GET \
  --get "https://payments.your-domain.com/api/v1/businesses" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json"

Response

{
  "data": [
    {
      "id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
      "name": "XYZ Business",
      "email": "john@xyz.com",
      "contact_first_name": "John",
      "contact_last_name": "Doe",
      "phone": null,
      "website": null,
      "is_customer": true,
      "is_vendor": false,
      "logo_url": null,
      "business_type": "company",
      "created_at": 1683292509,
      "time_zone": "America/New_York",
      "disabled": false,
      "payouts_enabled": {},
      "underwriting_status": {
        "bnpl": "PENDING",
        "factoring": "PENDING"
      },
      "creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8"
    },
    {
      "id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
      "name": "ABC Business",
      "email": "jane@abc.com",
      "contact_first_name": "Jane",
      "contact_last_name": "Doe",
      "phone": null,
      "website": null,
      "is_customer": true,
      "is_vendor": false,
      "logo_url": null,
      "business_type": "company",
      "created_at": 1683292509,
      "timezone": "America/New_York",
      "payouts_enabled": {},
      "underwriting_status": {
        "bnpl": "PENDING",
        "factoring": "PENDING"
      },
      "creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8"
    }
  ]
}

POSTapi/v1/businesses

Create a business

This endpoint allows you to create a new business.

Body Parameters

  • Name
    name
    Type
    string
    Field Type
    required
    Description

    Name for the business.

  • Name
    email
    Type
    string
    Field Type
    required
    Description

    Email of the business. (Must be unique)

  • Name
    contact_first_name
    Type
    string
    Field Type
    required
    Description

    First Name of the owner.

  • Name
    contact_last_name
    Type
    string
    Field Type
    required
    Description

    Last Name of the owner.

  • Name
    is_customer
    Type
    boolean
    Field Type
    required
    Description

    Specify whether the given business can make payments and receive invoices as a customer.

  • Name
    is_vendor
    Type
    boolean
    Field Type
    required
    Description

    Specify whether the given business can receive payments and send invoices as a vendor.

  • Name
    phone
    Type
    string
    Field Type
    optional
    Description

    Business phone number.

  • Name
    website
    Type
    string
    Field Type
    optional
    Description

    Business website URL.

  • Name
    business_type
    Type
    string
    Field Type
    optional
    Description

    Type of business. (individual or company)

  • Name
    billing_address.name
    Type
    string
    Field Type
    optional
    Description

    Name of the billing area.

  • Name
    billing_address.state
    Type
    string
    Field Type
    optional
    Description

    State where the business is registered.

  • Name
    billing_address.city
    Type
    string
    Field Type
    optional
    Description

    City where the business is registered.

  • Name
    billing_address.address_street_1
    Type
    string
    Field Type
    optional
    Description

    Billing Address line 1.

  • Name
    billing_address.address_street_2
    Type
    string
    Field Type
    optional
    Description

    Billing Address line 2.

  • Name
    billing_address.zip
    Type
    string
    Field Type
    optional
    Description

    Business area zip code.

  • Name
    billing_address.phone
    Type
    string
    Field Type
    optional
    Description

    Phone number for billing area.

  • Name
    shipping_address.name
    Type
    string
    Field Type
    optional
    Description

    Name of the shipping area.

  • Name
    shipping_address.state
    Type
    string
    Field Type
    optional
    Description

    State for business shipping purposes.

  • Name
    shipping_address.city
    Type
    string
    Field Type
    optional
    Description

    City for business shipping purposes.

  • Name
    shipping_address.address_street_1
    Type
    string
    Field Type
    optional
    Description

    Shipping Address line 1.

  • Name
    shipping_address.address_street_2
    Type
    string
    Field Type
    optional
    Description

    Shipping Address line 2.

  • Name
    shipping_address.zip
    Type
    string
    Field Type
    optional
    Description

    Zip code for shipping area.

  • Name
    shipping_address.phone
    Type
    string
    Field Type
    optional
    Description

    Phone number for shipping area.

Request

POST
api/v1/businesses
curl --request POST \
  "https://payments.your-domain.com/api/v1/businesses" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --data "{
    \"name\": \"XYZ Business\",
    \"contact_first_name\": \"John\",
    \"contact_last_name\": \"Doe\",
    \"business_type\": \"company\",
    \"email\": \"john@xyz.com\",
    \"is_customer\": false,
    \"is_vendor\": true,
    \"billing_address\": {
      \"name\": \"billing address\",
      \"state\": \"CA\",
      \"city\": \"Los Angeles\",
      \"address_street_1\": \"Address Line 1\",
      \"address_street_2\": \"Address Line 2\",
      \"zip\": \"91504\",
      \"phone\": \"2345557788\"
    },
    \"shipping_address\": {
      \"name\": \"shipping address\",
      \"state\": \"CA\",
      \"city\": \"Los Angeles\",
      \"address_street_1\": \"Address Line 1\",
      \"address_street_2\": \"Address Line 2\",
      \"zip\": \"91504\",
      \"phone\": \"2345557788\"
    }
  }"

Response

{
  "data": {
    "id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
    "name": "XYZ Business",
    "email": "john@xyz.com",
    "contact_first_name": "John",
    "contact_last_name": "Doe",
    "phone": null,
    "website": null,
    "is_customer": false,
    "is_vendor": true,
    "logo_url": null,
    "business_type": "company",
    "created_at": 1683292509,
    "time_zone": "America/New_York",
    "disabled": false,
    "payouts_enabled": {},        
    "underwriting_status": {
      "bnpl": "PENDING",
      "factoring": "PENDING"
    },
    "billing_address": {
      "name": "billing address",
      "address_street_1": "Address 1",
      "address_street_2": "Address 2",
      "city": "Los Angeles",
      "state": "CA",
      "zip": "91504",
      "phone": "2345557788"
    },
    "shipping_address": {
      "name": "shipping address",
      "address_street_1": "Address 1",
      "address_street_2": "Address 2",
      "city": "Los Angeles",
      "state": "CA",
      "zip": "91504",
      "phone": "2345557788"
    },
    "creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8"
  }
}

GETapi/v1/businesses/{id}

Retrieve a business

This endpoint allows you to retrieve a business by providing the business id.

URL Parameters

  • Name
    id
    Type
    string
    Field Type
    required
    Description

    The ID of the business.

Request

GET
api/v1/businesses/{id}
curl --request GET \
  --get "https://payments.your-domain.com/api/v1/businesses/995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json"

Response

{
  "data": {
    "id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
    "name": "XYZ Business",
    "email": "john@xyz.com",
    "contact_first_name": "John",
    "contact_last_name": "Doe",
    "phone": null,
    "website": null,
    "is_customer": false,
    "is_vendor": true,
    "logo_url": null,
    "business_type": "company",
    "created_at": 1683292509,
    "time_zone": "America/New_York",
    "disabled": false,
    "payouts_enabled": {},        
    "underwriting_status": {
      "bnpl": "PENDING",
      "factoring": "PENDING"
    },
    "billing_address": {
      "name": "billing address",
      "address_street_1": "Address 1",
      "address_street_2": "Address 2",
      "city": "Los Angeles",
      "state": "CA",
      "zip": "91504",
      "phone": "2345557788"
    },
    "shipping_address": {
      "name": "shipping address",
      "address_street_1": "Address 1",
      "address_street_2": "Address 2",
      "city": "Los Angeles",
      "state": "CA",
      "zip": "91504",
      "phone": "2345557788"
    },
    "creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8"
  }
}

PUTapi/v1/businesses/{id}

Update a business

This endpoint allows you to perform an update on a business.

URL Parameters

  • Name
    id
    Type
    string
    Field Type
    required
    Description

    The ID of the business.

Body Parameters

  • Name
    name
    Type
    string
    Field Type
    optional
    Description

    Name of the business.

  • Name
    contact_first_name
    Type
    string
    Field Type
    optional
    Description

    First name of the contact.

  • Name
    contact_last_name
    Type
    string
    Field Type
    optional
    Description

    Last name of the contact.

  • Name
    business_type
    Type
    string
    Field Type
    optional
    Description

    Type of the business.

  • Name
    email
    Type
    string
    Field Type
    optional
    Description

    Email of the business.

  • Name
    is_customer
    Type
    boolean
    Field Type
    optional
    Description

    Specify whether the given business can make payments and receive invoices as a customer.

  • Name
    is_vendor
    Type
    boolean
    Field Type
    optional
    Description

    Specify whether the given business can receive payments and send invoices as a vendor.

  • Name
    phone
    Type
    string
    Field Type
    optional
    Description

    Business phone number.

  • Name
    billing_address.name
    Type
    string
    Field Type
    optional
    Description

    Name of the billing area.

  • Name
    billing_address.state
    Type
    string
    Field Type
    optional
    Description

    State where the business is registered.

  • Name
    billing_address.city
    Type
    string
    Field Type
    optional
    Description

    City where the business is registered.

  • Name
    billing_address.address_street_1
    Type
    string
    Field Type
    optional
    Description

    Billing Address line 1.

  • Name
    billing_address.address_street_2
    Type
    string
    Field Type
    optional
    Description

    Billing Address line 2.

  • Name
    billing_address.zip
    Type
    string
    Field Type
    optional
    Description

    Business area zip code.

  • Name
    billing_address.phone
    Type
    string
    Field Type
    optional
    Description

    Phone number for billing area.

  • Name
    shipping_address.name
    Type
    string
    Field Type
    optional
    Description

    Name of the shipping area.

  • Name
    shipping_address.state
    Type
    string
    Field Type
    optional
    Description

    State for business shipping purposes.

  • Name
    shipping_address.city
    Type
    string
    Field Type
    optional
    Description

    City for business shipping purposes.

  • Name
    shipping_address.address_street_1
    Type
    string
    Field Type
    optional
    Description

    Shipping Address line 1.

  • Name
    shipping_address.address_street_2
    Type
    string
    Field Type
    optional
    Description

    Shipping Address line 2.

  • Name
    shipping_address.zip
    Type
    string
    Field Type
    optional
    Description

    Zip code for shipping area.

  • Name
    shipping_address.phone
    Type
    string
    Field Type
    optional
    Description

    Phone number for shipping area.

Request

PUT
api/v1/businesses/{id}
curl --request PUT \
  "https://payments.your-domain.com/api/v1/businesses/995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --data "{
    \"name\": \"Crater Invoice\",
    \"contact_first_name\": \"John\",
    \"contact_last_name\": \"Doe\",
    \"business_type\": \"company\",
    \"email\": \"john@example.com\",
    \"is_customer\": false,
    \"is_vendor\": true,
    \"billing_address\": {
      \"name\": \"billing address\",
      \"state\": \"CA\",
      \"city\": \"Los Angeles\",
      \"address_street_1\": \"Address 1\",
      \"address_street_2\": \"Address 2\",
      \"zip\": \"91504\",
      \"phone\": \"2345557788\"
    },
    \"shipping_address\": {
      \"name\": \"shipping address\",
      \"state\": \"CA\",
      \"city\": \"Los Angeles\",
      \"address_street_1\": \"Address 1\",
      \"address_street_2\": \"Address 2\",
      \"zip\": \"91504\",
      \"phone\": \"2345557788\"
    }
  }"

Response

{
  "data": {
    "id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
    "name": "Crater Invoice",
    "email": "john@example.com",
    "contact_first_name": "John",
    "contact_last_name": "Doe",
    "phone": null,
    "website": null,
    "is_customer": false,
    "is_vendor": true,
    "logo_url": null,
    "business_type": "company",
    "created_at": 1683292509,
    "time_zone": "America/New_York",
    "payouts_enabled": false,
    "archived": false,
    "disabled": false,
    "payment_onboarding": {},
    "underwriting_status": {
      "bnpl": "PENDING",
      "factoring": "PENDING"
    },
    "billing_address": {
      "name": "billing address",
      "address_street_1": "Address 1",
      "address_street_2": "Address 2",
      "city": "Los Angeles",
      "state": "CA",
      "zip": "91504",
      "phone": "2345557788"
    },
    "shipping_address": {
      "name": "shipping address",
      "address_street_1": "Address 1",
      "address_street_2": "Address 2",
      "city": "Los Angeles",
      "state": "CA",
      "zip": "91504",
      "phone": "2345557788"
    },
    "creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8",
  }
}

GETapi/v1/business/settings

Get business settings

This endpoint allows you to get business settings.

Parameters

  • Name
    invoice_business_address_format
    Type
    string
    Field Type
    Description

    Business address format on invoice PDF.

  • Name
    invoice_shipping_address_format
    Type
    string
    Field Type
    Description

    Customer shipping address format on invoice PDF.

  • Name
    invoice_billing_address_format
    Type
    string
    Field Type
    Description

    Customer billing address format on invoice PDF.

  • Name
    estimate_business_address_format
    Type
    string
    Field Type
    Description

    Business address format on estimate PDF.

  • Name
    estimate_shipping_address_format
    Type
    string
    Field Type
    Description

    Customer shipping address format on estimate PDF.

  • Name
    estimate_billing_address_format
    Type
    string
    Field Type
    Description

    Customer billing address format on estimate PDF.

  • Name
    payment_business_address_format
    Type
    string
    Field Type
    Description

    Business address format on payment receipt PDF.

  • Name
    payment_from_customer_address_format
    Type
    string
    Field Type
    Description

    Customer address format on payment receipt PDF.

  • Name
    currency
    Type
    string
    Field Type
    Description

    Get the default currency of the business

  • Name
    tax_per_item_enabled
    Type
    boolean
    Field Type
    Description

    Get tax per item enabled setting.

  • Name
    discount_per_item_enabled
    Type
    boolean
    Field Type
    Description

    Get discount per item enabled setting.

Request

GET
api/v1/business/settings
curl --request GET \
  "https://payments.your-domain.com/api/v1/business/settings" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
  --data "{
    \"settings\":  [
      \"invoice_business_address_format\",
      \"invoice_shipping_address_format\",
      \"invoice_billing_address_format\",
      \"estimate_business_address_format\",
      \"estimate_shipping_address_format\",
      \"estimate_billing_address_format\",
      \"payment_business_address_format\",
      \"payment_from_customer_address_format\",
      \"currency\",
      \"tax_per_item_enabled\",
      \"discount_per_item_enabled\"
    ]
  }"

Response

{
  "business_settings": {
    "invoice_business_address_format": "<h3><strong>{BUSINESS_NAME}</strong></h3><p>{BUSINESS_ADDRESS_STREET_1}</p><p>{BUSINESS_ADDRESS_STREET_2}</p><p>{BUSINESS_CITY} {BUSINESS_STATE}</p><p>{BUSINESS_COUNTRY}  {BUSINESS_ZIP_CODE}</p><p>{BUSINESS_PHONE}</p>",
    "invoice_shipping_address_format": "<h3>{SHIPPING_ADDRESS_NAME}</h3><p>{SHIPPING_ADDRESS_STREET_1}</p><p>{SHIPPING_ADDRESS_STREET_2}</p><p>{SHIPPING_CITY}  {SHIPPING_STATE}</p><p>{SHIPPING_COUNTRY}  {SHIPPING_ZIP_CODE}</p><p>{SHIPPING_PHONE}</p>",
    "invoice_billing_address_format": "<h3>{BILLING_ADDRESS_NAME}</h3><p>{BILLING_ADDRESS_STREET_1}</p><p>{BILLING_ADDRESS_STREET_2}</p><p>{BILLING_CITY} {BILLING_STATE}</p><p>{BILLING_COUNTRY}  {BILLING_ZIP_CODE}</p><p>{BILLING_PHONE}</p>",
    "estimate_business_address_format": "<h3><strong>{BUSINESS_NAME}</strong></h3><p>{BUSINESS_ADDRESS_STREET_1}</p><p>{BUSINESS_ADDRESS_STREET_2}</p><p>{BUSINESS_CITY} {BUSINESS_STATE}</p><p>{BUSINESS_COUNTRY}  {BUSINESS_ZIP_CODE}</p><p>{BUSINESS_PHONE}</p>",
    "estimate_shipping_address_format": "<h3>{SHIPPING_ADDRESS_NAME}</h3><p>{SHIPPING_ADDRESS_STREET_1}</p><p>{SHIPPING_ADDRESS_STREET_2}</p><p>{SHIPPING_CITY}  {SHIPPING_STATE}</p><p>{SHIPPING_COUNTRY}  {SHIPPING_ZIP_CODE}</p><p>{SHIPPING_PHONE}</p>",
    "estimate_billing_address_format": "<h3>{BILLING_ADDRESS_NAME}</h3><p>{BILLING_ADDRESS_STREET_1}</p><p>{BILLING_ADDRESS_STREET_2}</p><p>{BILLING_CITY} {BILLING_STATE}</p><p>{BILLING_COUNTRY}  {BILLING_ZIP_CODE}</p><p>{BILLING_PHONE}</p>",
    "payment_business_address_format": "<h3><strong>{BUSINESS_NAME}</strong></h3><p>{BUSINESS_ADDRESS_STREET_1}</p><p>{BUSINESS_ADDRESS_STREET_2}</p><p>{BUSINESS_CITY} {BUSINESS_STATE}</p><p>{BUSINESS_COUNTRY}  {BUSINESS_ZIP_CODE}</p><p>{BUSINESS_PHONE}</p>",
    "payment_from_customer_address_format": "<h3>{BILLING_ADDRESS_NAME}</h3><p>{BILLING_ADDRESS_STREET_1}</p><p>{BILLING_ADDRESS_STREET_2}</p><p>{BILLING_CITY} {BILLING_STATE}</p><p>{BILLING_COUNTRY}  {BILLING_ZIP_CODE}</p><p>{BILLING_PHONE}</p>",
    "currency": "USD",
    "tax_per_item_enabled": true,
    "discount_per_item_enabled": false
  }
}

PUTapi/v1/business/settings

Update business settings

This endpoint allows you to perform an update on a business settings.

Parameters

  • Name
    invoice_business_address_format
    Type
    string
    Field Type
    Description

    Set Business address format for invoice PDF.

  • Name
    invoice_shipping_address_format
    Type
    string
    Field Type
    Description

    Set Customer shipping address format for invoice PDF.

  • Name
    invoice_billing_address_format
    Type
    string
    Field Type
    Description

    Set Customer billing address format for invoice PDF.

  • Name
    estimate_business_address_format
    Type
    string
    Field Type
    Description

    Set Business address format for estimate PDF.

  • Name
    estimate_shipping_address_format
    Type
    string
    Field Type
    Description

    Set Customer shipping address format for estimate PDF.

  • Name
    estimate_billing_address_format
    Type
    string
    Field Type
    Description

    Set Customer billing address format for estimate PDF.

  • Name
    payment_business_address_format
    Type
    string
    Field Type
    Description

    Set Business address format for payment receipt PDF.

  • Name
    payment_from_customer_address_format
    Type
    string
    Field Type
    Description

    Set Customer address format for payment receipt PDF.

  • Name
    tax_per_item_enabled
    Type
    boolean
    Field Type
    Description

    Specify whether tax_per_item is enabled on this business?

  • Name
    discount_per_item_enabled
    Type
    boolean
    Field Type
    Description

    Specify whether discount_per_item is enabled on this business?

Request

POST
api/v1/business/settings
curl --request POST \
  "https://payments.your-domain.com/api/v1/business/settings" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
  --data "{
    \"tax_per_item_enabled\": false,
    \"discount_per_item_enabled\": true
  }"

Response

{
  "business_settings": {
    "tax_per_item_enabled": false,
    "discount_per_item_enabled": true
  }
}

GETapi/v1/business/stats

Get business stats

This endpoint allows you to get business stats.

Parameters

  • Name
    type
    Type
    string
    Field Type
    required
    Description

    The type of stats to retrieve. (must be one of: total_purchases, invoice_count, estimate_count, customer_count, vendor_count, total_sales, total_amount_due, total_payments, total_receipts)

Request

GET
api/v1/business/stats
curl --request GET \
  "https://payments.your-domain.com/api/v1/business/stats" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
  --data "{
    \"type\": \"invoice_count\"
  }"

Response

{
  "invoice_count": 8
}

Once generated, businesses need to visit the Payment Onboarding Link to set up their payment processes. During this visit, they can provide essential payout details, including information about their bank, enabling a seamless integration for receiving payments.

Properties

  • Name
    id
    Type
    string
    Field Type
    Description

    Unique identifier for the payment onboarding link.

  • Name
    url
    Type
    string
    Field Type
    Description

    The URL to redirect the business to after they have completed the onboarding process.

  • Name
    return_url
    Type
    string
    Field Type
    Description

    The URL to redirect after the business has completed the onboarding process.

  • Name
    refresh_url
    Type
    string
    Field Type
    Description

    The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new onboarding link with the same parameters used to create the original account link, then redirect the user to the new account link’s URL so they can continue with Onboarding. If a new link cannot be generated or the redirect fails you should display a useful error to the user.

  • Name
    business_id
    Type
    object
    Field Type
    Description

    The ID of the business associated with the payment onboarding link.


GETapi/v1/payment-onboarding-links

This endpoint allows you to retrieve a paginated list of all your payment onboarding links.

Query Parameters

  • Name
    limit
    Type
    integer
    Field Type
    optional
    Description

    Limit the number of onboarding links returned. (default is 5)

  • Name
    page
    Type
    integer
    Field Type
    optional
    Description

    Page number for pagination. (default is 1)

Request

GET
api/v1/payment-onboarding-links
curl --request GET \
  --get "https://payments.your-domain.com/api/v1/payment-onboarding-links" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \

Response

{
  "data": [
    {
      "id": "9988df6b-a4ef-4678-b039-06a8a8337ccf",
      "url": "http://payments.your-domain.com/public/onboarding/9988df6b-a4ef-4678-b039-06a8a8337ccf?
        signature=0e3e3bf17128d83fbf6676aa9c4b916e4364179b651682f319e5a638220d73bf",
      "return_url": "http://payments.your-domain.com/return",
      "refresh_url": "http://payments.your-domain.com/dashboard",
      "business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
    },
    {
      "id": "9988de81-f5f3-476b-af77-0a0cfae3ded8",
      "url": "http://payments.your-domain.com/public/onboarding/9988de81-f5f3-476b-af77-0a0cfae3ded8?
        signature=2d8b35ec511bb059dd532d9fa7bce80f9f9fed9dbb6040e55aa9b003292f3438",
      "return_url": "http://payments.your-domain.com/return",
      "refresh_url": "http://payments.your-domain.com/dashboard",
      "business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
    }
  ]
}

POSTapi/v1/payment-onboarding-links

This endpoint allows you to create a new payment onboarding link.

Body Parameters

  • Name
    return_url
    Type
    string
    Field Type
    required
    Description

    The URL to redirect after the business has completed the onboarding process.

  • Name
    refresh_url
    Type
    string
    Field Type
    optional
    Description

    The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new onboarding link with the same parameters used to create the original account link, then redirect the user to the new account link’s URL so they can continue with Onboarding. If a new link cannot be generated or the redirect fails you should display a useful error to the user.

Request

POST
api/v1/payment-onboarding-links
curl --request POST \
  "https://payments.your-domain.com/api/v1/payment-onboarding-links" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
  --data "{
    \"return_url\": \"http://payments.your-domain.com/dashboard\",
    \"refresh_url\": \"http://payments.your-domain.com/refresh\"
  }"

Response

{
  "data": {
    "id": "9988df6b-a4ef-4678-b039-06a8a8337ccf",
    "url": "http://payments.your-domain.com/public/onboarding/9988df6b-a4ef-4678-b039-06a8a8337ccf?
      signature=cf673747acb059a6357bd8ad4cc4ffb49f6b23344624ec36cbe4f64f5bad9fb5",
    "return_url": "http://payments.your-domain.com/dashboard",
    "refresh_url": "http://payments.your-domain.com/refresh",
    "business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
  }
}

GETapi/v1/payment-onboarding-links/{id}

This endpoint allows you to retrieve an onboarding link.

URL Parameters

  • Name
    id
    Type
    string
    Field Type
    required
    Description

    ID of the onboarding link.

Request

GET
api/v1/payment-onboarding-links/{id}
curl --request GET \
  --get "https://payments.your-domain.com/api/v1/payment-onboarding-links/9988df6b-a4ef-4678-b039-06a8a8337ccf" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \

Response

{
  "data": {
    "id": "9988df6b-a4ef-4678-b039-06a8a8337ccf",
    "url": "http://payments.your-domain.com/public/onboarding/9988df6b-a4ef-4678-b039-06a8a8337ccf?
      signature=cf673747acb059a6357bd8ad4cc4ffb49f6b23344624ec36cbe4f64f5bad9fb5",
    "return_url": "http://payments.your-domain.com/dashboard",
    "refresh_url": "http://payments.your-domain.com/refresh",
    "business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
  }
}

DELETEapi/v1/payment-onboarding-links/{id}

This endpoint allows you to delete a specific onboarding link.

URL Parameters

  • Name
    id
    Type
    string
    Field Type
    required
    Description

    The ID of the onboarding link.

Request

DELETE
api/v1/payment-onboarding-links/{id}
curl --request DELETE \
  "https://payments.your-domain.com/api/v1/payment-onboarding-links/9988df6b-a4ef-4678-b039-06a8a8337ccf" \
  --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \

Response

{
  "id": "9988df6b-a4ef-4678-b039-06a8a8337ccf",
  "object": "PaymentOnboardingLink",
  "deleted": true
}