Billing API (LATEST)

Download OpenAPI specification:Download

API Integration Support: integration@dintero.com License: UNLICENSED

Changelog

All notable changes to the API.

2024-06-01

Add pagination to report configuration listing

2023-04-01

new Add filter on namespace and currency

2022-06-01

new Add filter on payout_destination_id

2020-12-01

new Support filter user payout rules with include_deleted query parameter.

2020-05-01

Payout Rules Add new endpoint for managing Payout rules.

Reports

Get billing reports

List costs

Get the costs aggregated by periode

scopes:

  • admin:billing
  • read:billing
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
year
required
integer
Example: year=2019

filter result by year

month
required
integer [ 1 .. 12 ]
Example: month=8

filter result by month

limit
integer [ 1 .. 1000 ]
Default: 100

A limit on the number of objects to be returned. Limit can range between 1 and 1000 items, and the default is 100 items.

starting_after
string

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, end the result contains paging_token=pt1, your subsequent call can include starting_after=pt1 in order to fetch the next page of the list.

type
string
Example: type=checkout/capture

filter result by cost type

date
string <date>

filter result by date, requires to be combined with type parameter

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List reports

Get billing reports

scopes:

  • admin:billing
  • read:billing
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

A limit on the number of objects to be returned. Limit can range between 1 and 1000 items, and the default is 100 items.

starting_after
string

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, end the result contains paging_token=pt1, your subsequent call can include starting_after=pt1 in order to fetch the next page of the list.

Responses

Response samples

Content type
application/json
{
  • "starting_after": "string",
  • "reports": [
    ]
}

Rules

Manage payout rules

List payout rules

Get payout rules

scopes:

  • admin:billing
  • read:billing
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

A limit on the number of objects to be returned. Limit can range between 1 and 1000 items, and the default is 100 items.

starting_after
string

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, end the result contains paging_token=pt1, your subsequent call can include starting_after=pt1 in order to fetch the next page of the list.

rule_type
string

Filter payment rules by rule_type

rule_id
string

Filter payment rules by rule_id. Must be used together with rule_type.

include_deleted
boolean
Default: false

include deleted payout rules in the response

Responses

Response samples

Content type
application/json
{
  • "starting_after": "string",
  • "payout_rules": [
    ]
}

Create payout rule

Create payout rules

scopes:

  • admin:billing
  • write:billing
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

Request Body schema: application/json
required
rule_id
required
string

Unique ID given the rule type.

rule_type
required
string
required
Array of objects (BillingPayoutRuleDestination)

Destinations for the payout splits tree. The splitting is done in the order of the destinations.

  • A destination must include a destination or destinations.
  • The destination value is required for destinations with type percentage and flat_amount
metadata
object <= 10 properties

Additional metadata about the payout rule

Responses

Request samples

Content type
application/json
{
  • "rule_type": "order.items.store.id",
  • "rule_id": "sc029",
  • "destinations": [
    ],
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
  • "deleted_at": "2019-08-24T14:15:22Z",
  • "account_id": "string",
  • "rule_type": "order.items.store.id",
  • "rule_id": "sc029",
  • "rule_version": 1,
  • "destinations": [
    ],
  • "metadata": { }
}

Update payout rule

Update payout with new destinations

Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string <uuid>

payout rule id

Request Body schema: application/json
required
rule_id
required
string

Unique ID given the rule type.

rule_type
required
string
required
Array of objects (BillingPayoutRuleDestination)

Destinations for the payout splits tree. The splitting is done in the order of the destinations.

  • A destination must include a destination or destinations.
  • The destination value is required for destinations with type percentage and flat_amount
metadata
object <= 10 properties

Additional metadata about the payout rule

Responses

Request samples

Content type
application/json
{
  • "rule_type": "order.items.store.id",
  • "rule_id": "sc029",
  • "destinations": [
    ],
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
  • "deleted_at": "2019-08-24T14:15:22Z",
  • "account_id": "string",
  • "rule_type": "order.items.store.id",
  • "rule_id": "sc029",
  • "rule_version": 1,
  • "destinations": [
    ],
  • "metadata": { }
}

Remove payout rule

Remove payout rule

Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string <uuid>

payout rule id

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
  • "deleted_at": "2019-08-24T14:15:22Z",
  • "account_id": "string",
  • "rule_type": "order.items.store.id",
  • "rule_id": "sc029",
  • "rule_version": 1,
  • "destinations": [
    ],
  • "metadata": { }
}

Plans

Get subscription plans

List subscription plans

Get subscriptions

scopes:

  • admin:billing
  • read:billing
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
namespace
string

Filter subscriptions by namespace

currency
string <iso-4217>
Example: currency=NOK

Filter subscriptions by prices currency

limit
integer [ 1 .. 1000 ]
Default: 100

A limit on the number of objects to be returned. Limit can range between 1 and 1000 items, and the default is 100 items.

starting_after
string

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, end the result contains paging_token=pt1, your subsequent call can include starting_after=pt1 in order to fetch the next page of the list.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Reports

Get settlement reports

List settlements

List settlements

scopes:

  • admin:billing
  • read:billing
  • admin:reports
  • read:reports
  • admin:settlements
  • read:settlements
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
limit
integer [ 1 .. 1000 ]
Default: 10

A limit on the number of objects to be returned. Limit can range between 1 and 1000 items, and the default is 10 items.

starting_after_id
string

cursor for use in pagination. starting_after_id is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo and settled_at=2021-02-02, your subsequent call can include starting_after_id=obj_foo&starting_after_date=2021-02-02 in order to fetch the next page of the list.

Must be used together with starting_after_date

starting_after_date
string

cursor for use in pagination. starting_after_date is the settled_at that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo and settled_at=2021-02-02, your subsequent call can include starting_after_id=obj_foo&starting_after_date=2021-02-02 in order to fetch the next page of the list.

Must be used together with starting_after_id

created_at.gte
string <date>

Settlement created after

created_at.lte
string <date>

Settlement created before a date

payment_provider
Array of strings

The payment provider

payout_destination_id
string

The seller id to filter on

search
string

Will try to match the search to settlement_id.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "last_evaluated_key": {
    }
}

Download attachment

Download a settlement attachment

scopes:

  • admin:billing
  • read:billing
  • admin:reports
  • read:reports
  • admin:settlements
  • read:settlements
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

settlementid
required
string

An id that uniquely identifies the settlement.

attachmentid
required
string

An id that uniquely identifies the attachment.

Responses

Response samples

Content type
application/json
"string"

Configuration

Configure settlement reports

List settlement report configurations

List settlement report configurations

scopes:

  • admin:billing
  • read:billing
  • admin:reports
  • read:reports
  • admin:settlements
  • read:settlements
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
starting_after
string

cursor for use in pagination

limit
integer [ 1 .. 1000 ]
Default: 100

A limit on the number of objects to be returned. Limit can range between 1 and 1000 items, and the default is 100 items.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "starting_after": "string"
}

Create settlement report configurations

Create settlement report configurations

scopes:

  • admin:billing
  • admin:reports
  • admin:settlements
  • write:settlements
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

Request Body schema: application/json
required
filetypes
required
Array of strings

The filetypes that should be sent

required
Array of objects

List of destinations. If empty, the report is just stored and visible from the backoffice.

providers
required
Array of strings

List of providers to send report for. If empty, send for all.

send_every
number

Deprecated report configuration is not used for controlling when to create and send report

Value in milliseconds describing how often reports should be sent.

Array of objects

The report will only be sent to the provided destinations if it satisfies these criterias.

id
string

Responses

Request samples

Content type
application/json
{
  • "send_every": 86400000,
  • "filetypes": [
    ],
  • "destinations": [
    ],
  • "providers": [
    ],
  • "filters": [
    ],
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "send_every": 86400000,
  • "filetypes": [
    ],
  • "destinations": [
    ],
  • "providers": [
    ],
  • "filters": [
    ],
  • "id": "string",
  • "last_send_at": 0,
  • "last_modified_at": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "account_id": "string"
}

Get settlement report configuration

Get settlement report configuration

scopes:

  • admin:billing
  • read:billing
  • admin:reports
  • read:reports
  • admin:settlements
  • read:settlements
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string <uuid>

report config id

Responses

Response samples

Content type
application/json
{
  • "send_every": 86400000,
  • "filetypes": [
    ],
  • "destinations": [
    ],
  • "providers": [
    ],
  • "filters": [
    ],
  • "id": "string",
  • "last_send_at": 0,
  • "last_modified_at": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "account_id": "string"
}

Update settlement report configuration

Update settlement report configuration

scopes:

  • admin:billing
  • write:billing
  • admin:settlements
  • write:settlements
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string <uuid>

report config id

Request Body schema: application/json
required
filetypes
required
Array of strings

The filetypes that should be sent

required
Array of objects

List of destinations. If empty, the report is just stored and visible from the backoffice.

providers
required
Array of strings

List of providers to send report for. If empty, send for all.

send_every
number

Deprecated report configuration is not used for controlling when to create and send report

Value in milliseconds describing how often reports should be sent.

Array of objects

The report will only be sent to the provided destinations if it satisfies these criterias.

Responses

Request samples

Content type
application/json
{
  • "send_every": 86400000,
  • "filetypes": [
    ],
  • "destinations": [
    ],
  • "providers": [
    ],
  • "filters": [
    ]
}

Response samples

Content type
application/json
{
  • "send_every": 86400000,
  • "filetypes": [
    ],
  • "destinations": [
    ],
  • "providers": [
    ],
  • "filters": [
    ],
  • "id": "string",
  • "last_send_at": 0,
  • "last_modified_at": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "account_id": "string"
}

Delete settlement report configuration

Delete settlement report configuration

scopes:

  • admin:billing
  • write:billing
  • admin:settlements
  • write:settlements
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string <uuid>

report config id

Responses

Response samples

Content type
application/json
{
  • "send_every": 86400000,
  • "filetypes": [
    ],
  • "destinations": [
    ],
  • "providers": [
    ],
  • "filters": [
    ],
  • "id": "string",
  • "last_send_at": 0,
  • "last_modified_at": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "account_id": "string"
}