Create Transaction Products

This allows you to create the products you will offer in your app such as Bulk Pay, General Send Money, Lipa Karo, etc. You can have multiple Products in your app that charges different costs.

Overview

Transaction products allow app owners to define and manage the types of financial services they offer in their apps. Examples include Bulk Pay, General Send Money, Lipa Karo, Salary Pay, and Bursary Disbursement to Schools. Each product can have custom transaction costs and rules.

App users can create, edit, and manage these products, but each product requires verification and approval by Tuku Pay. Verified products are activated, while unverified or deactivated products cannot be used.


Key Features

  • Custom Products: App owners can create unique products to match their app’s goals.

  • Verification: Products are subject to verification by Tuku Pay for compliance and security.

  • Status Management: Products can be activated, deactivated, or rejected by Tuku Pay.

  • Editable: Products can be updated by app owners before or after verification.


Endpoints for Managing Transaction Products

1. Create Transaction Product

Used to create a new transaction product for an app.

Method

POST

URL

/api/transaction-products/create

Request Body:

{
  "appId": "app123",
  "productName": "Bulk Pay",
  "description": "Facilitate bulk payments to multiple recipients.",
  "transactionCosts": {
    "minAmount": 10,
    "maxAmount": 100000,
    "costPerTransaction": 20
  },
  "productRules": {
    "requiresApproval": true,
    "supportsBulk": true,
    "requiresBeneficiaryDetails": true
  }
}

Response:

{
  "status": "success",
  "message": "Transaction product created successfully.",
  "productId": "prod456",
  "verificationStatus": "pending"
}

2. Retrieve Transaction Products

Used to list all transaction products for an app.

Method

GET

URL

/api/transaction-products/list

Request Body:

{
  "appId": "app123"
}

Response:

{
  "status": "success",
  "products": [
    {
      "productId": "prod456",
      "productName": "Bulk Pay",
      "description": "Facilitate bulk payments to multiple recipients.",
      "verificationStatus": "verified",
      "isActive": true
    },
    {
      "productId": "prod789",
      "productName": "Salary Pay",
      "description": "Manage salary disbursements to employees.",
      "verificationStatus": "pending",
      "isActive": false
    }
  ]
}

3. Update Transaction Product

Used to modify an existing transaction product.

Method

PUT

URL

/api/transaction-products/update

Request Body:

{
  "appId": "app123",
  "productId": "prod456",
  "productName": "Bulk Payment",
  "description": "Bulk payments to multiple beneficiaries.",
  "transactionCosts": {
    "minAmount": 20,
    "maxAmount": 150000,
    "costPerTransaction": 25
  },
  "productRules": {
    "requiresApproval": true,
    "supportsBulk": true,
    "requiresBeneficiaryDetails": false
  }
}

Response:

{
  "status": "success",
  "message": "Transaction product updated successfully."
}

4. Delete Transaction Product

Used to remove a transaction product.

Method

DELETE

URL

/api/transaction-products/delete

Request Body:

{
  "appId": "app123",
  "productId": "prod456"
}

Response:

{
  "status": "success",
  "message": "Transaction product deleted successfully."
}

5. Verify Transaction Product

Used internally by Tuku Pay to verify transaction products.

Method

POST

URL

/internal/transaction-products/verify

Request Body:

{
  "productId": "prod456",
  "verificationStatus": "verified"
}

Response:

{
  "status": "success",
  "message": "Transaction product verified successfully."
}

6. Deactivate Transaction Product

Used by Tuku Pay to deactivate non-compliant or unused products.

Method

POST

URL

/internal/transaction-products/deactivate

Request Body:

{
  "productId": "prod456",
  "reason": "Non-compliance with transaction rules."
}

Response:

{
  "status": "success",
  "message": "Transaction product deactivated successfully."
}

Additional Notes

  1. Product Lifecycle:

    • Products begin with a pending verification status.

    • Once verified, they are activated and available for use.

    • Tuku Pay can deactivate or reject products at any time.

  2. Customization:

    • App owners can define unique transaction costs and rules for each product.

    • Products can support various features, like bulk payments, beneficiary details, or custom approvals.

  3. Verification Process:

    • All products require manual verification by Tuku Pay before activation.

    • Apps are notified of verification status changes via webhooks.

  4. Deactivation:

    • Deactivated products cannot process transactions.

    • Reasons for deactivation are provided in the response.