Skip to main content

Fees

Fees allow you to charge the customer custom fees according to your business rules, like monthly subscriptions. The fees will be paid to your Revenue Account and will show up on the customer monthly statements.

caution

Any fees charged must be disclosed in any required customer agreements or terms as determined by Unit compliance. Please consult with the Unit Compliance team prior to charging any customer fees.

Create Fee#

Creates a fee for an Account.

VerbPOST
Urlhttps://api.s.unit.sh/fees
Required Scopeaccounts-write
Data Typefee

Attributes#

NameTypeDescription
amountintegerThe amount (in cents) to charge the account.
descriptionstringDescription of the fee (maximum of 50 characters).
tagsobjectSee Tags.
idempotencyKeystringSee Idempotency.

Relationships#

NameTypeDescription
accountJSON:API RelationshipThe account to charge the fee.
Example Request:
curl -X POST 'https://api.s.unit.sh/fees'-H 'Content-Type: application/vnd.api+json'-H 'Authorization: Bearer ${TOKEN}'--data-raw '{  "data": {    "type": "fee",    "attributes": {      "amount": 1000,      "description": "Monthly Subscription"    },    "relationships": {      "account": {        "data": {          "type": "depositAccount",          "id": "10097"        }      }    }  }}'

Response#

Response is a JSON:API document.

201 Created#

FieldTypeDescription
dataFeeThe requested resource after the operation was completed.
Example Response:
{  "data": {    "type": "fee",    "id": "1234",    "attributes": {      "amount": 1000,      "description": "Monthly Subscription"    },    "relationships": {      "account": {        "data": {          "type": "depositAccount",          "id": "10097"        }      }    }  }}