Sharable Cash

Create a Transaction

A Transaction is a business-level request for the movement of funds. It is identified by Transaction Types and can further result in one or more Transfers.

Make sure you know your Program, Application, and Transaction Template before creating a Transaction. 

Please note that Facilitator is solely responsible for amounts transferred within Tranactions. Sharable Cash does not verify the amounts, which are funded and withdrawn within the platform.

To create a Transaction, use the following request:

POST /transactions

//Example request

{
    "program_id": "prm_gffsdiRdalN7Ixyo",
    "application_id": "app_97lZr7G7efm2tW57",
    "transaction_template_id": "trt_ffCHsIicGALMoUPF",
    "transaction_status_reason": "CashConnect transaction",
    "transaction_tags": [
        {
            "key": "TagKey",
            "value": "TagValue"
        }
    ],
    "transaction_parameters": [
        {
            "transaction_parameter_name": "@source_customers",
            "transaction_parameter_values": [
                {
                    "customer_profile_id": "csp_0TkQy3AufEfugFtk",
                    "amount": 500
                }
            ]
        },
        {
            "transaction_parameter_name": "@targets",
            "transaction_parameter_values": [
                {
                    "customer_profile_id": "csp_1fG8cuHKsFkWjKJj",
                    "amount": 150
                },
                {
                    "customer_profile_id": "csp_1V5N8dDWmycOfRbH",
                    "amount": 150
                }
            ]
        },
        {
            "transaction_parameter_name": "@facilitator",
            "transaction_parameter_values": [
                {
                    "customer_profile_id": "csp_s4xTSlPHLgxbrrTG",
                    "amount": 100
                }
            ]
        },
        {
            "transaction_parameter_name": "@target_checks",
            "transaction_parameter_values": [
                {
                    "customer_profile_id": "csp_0TkQy3AufEfugFtk",
                    "amount": 100,
                    "check_note": "Bill #123456",
                    "first_name": "John",
                    "last_name": "Doe",
                    "organization_name": null,
                    "country_id": 1,
                    "state_id": 15,
                    "address_line1": "Main str., 123",
                    "address_line2": null,
                    "city": "Springfield",
                    "zip": "71234"
                }
            ]
        }
    ]
}

As a result, you’ll get an id of the Transaction.

//Example response

{
 "paging": null,
 "data": [
   {
     "id": "trn_33CJMFt89EdlKwtD"
   }
 ],
 "errors": null
}

Having Transaction id allows you to get Transaction parameters if needed:

GET /transactions/{transaction_id}/parameters

//Sample response

{
  "paging": {
    "page_size": 50,
    "page_number": 1,
    "total_count": 4,
    "last_evaluated_key": null
  },
  "data": [
    {
      "transaction_parameter_id": 2101,
      "transaction_parameter_name": "@facilitator",
      "transaction_parameter_values": [
        {
          "customer_profile_id": "csp_s4xTSlPHLgxbrrTG",
          "amount": 100,
          "account_id": null,
          "check_note": null,
          "first_name": null,
          "last_name": null,
          "organization_name": null,
          "country_id": null,
          "state_id": null,
          "address_line1": null,
          "address_line2": null,
          "city": null,
          "zip": null
        }
      ],
      "created_by": "510E7392ED8E4149",
      "created_date_time": "2023-06-01T14:53:45.533",
      "modified_by": "510E7392ED8E4149",
      "modified_date_time": "2023-06-01T14:53:45.533"
    },
    {
      "transaction_parameter_id": 2102,
      "transaction_parameter_name": "@source_customers",
      "transaction_parameter_values": [
        {
          "customer_profile_id": "csp_0TkQy3AufEfugFtk",
          "amount": 450,
          "account_id": null,
          "check_note": null,
          "first_name": null,
          "last_name": null,
          "organization_name": null,
          "country_id": null,
          "state_id": null,
          "address_line1": null,
          "address_line2": null,
          "city": null,
          "zip": null
        }
      ],
      "created_by": "510E7392ED8E4149",
      "created_date_time": "2023-06-01T14:53:45.533",
      "modified_by": "510E7392ED8E4149",
      "modified_date_time": "2023-06-01T14:53:45.533"
    },
    {
      "transaction_parameter_id": 2103,
      "transaction_parameter_name": "@target_checks",
      "transaction_parameter_values": [
        {
          "customer_profile_id": "csp_0TkQy3AufEfugFtk",
          "amount": 100,
          "account_id": null,
          "check_note": "Bill #4587",
          "first_name": "John",
          "last_name": "Doe",
          "organization_name": null,
          "country_id": 1,
          "state_id": 15,
          "address_line1": "Main str., 123",
          "address_line2": null,
          "city": "Springfield",
          "zip": "71234"
        }
      ],
      "created_by": "510E7392ED8E4149",
      "created_date_time": "2023-06-01T14:53:45.533",
      "modified_by": "510E7392ED8E4149",
      "modified_date_time": "2023-06-01T14:53:45.533"
    },
    {
      "transaction_parameter_id": 2104,
      "transaction_parameter_name": "@targets",
      "transaction_parameter_values": [
        {
          "customer_profile_id": "csp_1fG8cuHKsFkWjKJj",
          "amount": 50,
          "account_id": null,
          "check_note": null,
          "first_name": null,
          "last_name": null,
          "organization_name": null,
          "country_id": null,
          "state_id": null,
          "address_line1": null,
          "address_line2": null,
          "city": null,
          "zip": null
        },
        {
          "customer_profile_id": "csp_1V5N8dDWmycOfRbH",
          "amount": 50,
          "account_id": null,
          "check_note": null,
          "first_name": null,
          "last_name": null,
          "organization_name": null,
          "country_id": null,
          "state_id": null,
          "address_line1": null,
          "address_line2": null,
          "city": null,
          "zip": null
        }
      ],
      "created_by": "510E7392ED8E4149",
      "created_date_time": "2023-06-01T14:53:45.533",
      "modified_by": "510E7392ED8E4149",
      "modified_date_time": "2023-06-01T14:53:45.533"
    }
  ],
  "errors": null
}

When the Transaction is created, it does not have Steps yet. The Steps get created in the background in several minutes, so you can track their status using the following request:

GET /transactions/{transaction_id}/transaction-steps

//Sample response

{
 "paging": {
   "page_size": 50,
   "page_number": 1,
   "total_count": 5,
   "last_evaluated_key": null
 },
 "data": [
   {
     "transaction_step_id": "trs_ck8PmyBrU7ExKeWo",
     "transaction_id": "trn_R9r5k4d0ByQo7Q0X",
     "transaction_step_status_id": 60,
     "transaction_step_status_reason": "Successfully completed.",
     "transfer_type_id": 1,
     "sequence": 1,
     "wait_to_complete": true,
     "created_by": "A848DF3F0B31B31A",
     "created_datetime": "2023-05-31T14:03:50.257",
     "modified_by": "DCC820D8D97C7652",
     "modified_datetime": "2023-05-31T16:35:08.047"
   },
   {
     "transaction_step_id": "trs_19Zsh1dzzhqdcjqY",
     "transaction_id": "trn_R9r5k4d0ByQo7Q0X",
     "transaction_step_status_id": 60,
     "transaction_step_status_reason": "Successfully completed.",
     "transfer_type_id": 2,
     "sequence": 2,
     "wait_to_complete": true,
     "created_by": "A848DF3F0B31B31A",
     "created_datetime": "2023-05-31T14:03:50.62",
     "modified_by": "DCC820D8D97C7652",
     "modified_datetime": "2023-05-31T16:38:51.54"
   },
   {
     "transaction_step_id": "trs_j2g87x8dJFrBH7PO",
     "transaction_id": "trn_R9r5k4d0ByQo7Q0X",
     "transaction_step_status_id": 60,
     "transaction_step_status_reason": "Successfully completed.",
     "transfer_type_id": 3,
     "sequence": 3,
     "wait_to_complete": false,
     "created_by": "A848DF3F0B31B31A",
     "created_datetime": "2023-05-31T14:03:51.117",
     "modified_by": "DCC820D8D97C7652",
     "modified_datetime": "2023-05-31T16:39:53.813"
   },
 ]
 "errors": null
}