A transaction represents a movement of funds on the Dots platform. There are two main types of transactions: wallet and credit. A wallet transaction is a movement of fiat funds and a credit transaction is a movement of credit balance that can be issued by the app but is not backed by money.

A transaction can only be created between a user’s wallet and your app’s wallet in both directions. User to User transactions aren’t directly allowed.

The Transaction Object

Example:

{
  "id": "5cfabe15-d452-4558-8e46-56d90ebe48f7",
  "date": "1997-06-05",
  "source_username": "sha",
  "destination_username": "kartikye",
  "amount": 700,
  "completed": true,
  "type": "wallet",
  "receipt": {
    "items": [
      {
        "name": "Pikachu Digital Pet",
        "unit_amount": 250,
        "quantity": 1,
        "description": "A little Pikachu for your desktop"
      },
      {
        "name": "Charmander Digital Pet",
        "unit_amount": 225,
        "quantity": 2,
        "description": "A ferocius Charmander for your desktop"
      }
    ],
    "breakdown": {
      "items_total": 700,
      "tax": 100,
      "shipping": 0
    }
  },
  "notes": {
    "internal_id": "tr_213124"
  }
}

Attributes

NameTypeDescription
idstring (uuid)UUID id of the transaction
datestringDate of the transaction
source_usernamestringUsername of the user the transaction came from
destination_usernamestringUsername of the user the transaction went to
amountfloatAmount in cents of the transaction
typestringwallet for regular transactions, credit for transactions made with user’s credit balance
completedbooleanStatus of the transaction
recieptobjectObject representing the items in the transaction
reciept.itemsarrayArray of objects representing the items in the transaction
reciept.items.namestringName of the item
reciept.items.unit_amountintegerUnit amount of the item in cents
reciept.items.quantityintegerQuantity of the item
reciept.items.descriptionstringDescription of the item
reciept.breakdownobjectObject representing the breakdown of the transaction
reciept.breakdown.items_totalintegerTotal amount of the items in the transaction in cents
reciept.breakdown.taxintegerTax amount of the transaction in cents
reciept.breakdown.shippingintegerShipping amount of the transaction in cents
notesobjectObject representing notes that can be customized