Skip to content

Transfer API

Djamo Transfers provides a suite of services that enable you to send money seamlessly to Djamo users from your business account.

At the moment, what you can do trough the Business API, is debit your business account and credit one or many Djamo clients. ie: Send money to one or multiple Djamo clients.

You can also get the list of transactions that have impacted your business account or the status for a particular transaction.

The transaction object

Attribute Type Description
id String The ID for the transaction
amount Amount The amount charged for the transaction.
fee Amount The fee charged for the tranasction.
totalAmount Amount The total amount charged for the transaction (amount + fee).
msisdn Phone Number The msisdn of the Djamo client
status String The current status of the transaction. Can be one of the following : pending, completed or failed
reference String The reference that you indicated when creating the transaction. Can be your internal ID for exemple.
type String The type of the transaction. At the moment, the only type allowed is transfer.
batchId String The ID for the batch that created this transaction (only if the transation was created as part of a batch).
createdAt Timestamp Timestamp indicating when the transactions was created.
updatedAt Timestamp Timestamp indicating when the transaction has been updated.

Sending money to one Djamo client

POST /v1/transactions

Parameter Type Description
amount Amount The amount charged for the transaction. Should be in the range of 5.000 - 500.000
msisdn Phone Number The msisdn of the Djamo client
reference String A reference that you indicate. Can be your internal ID for exemple.
type String The type of the transaction. At the moment, the only type allowed is transfer.
curl \
-XPOST \
-H "Content-type: application/json" \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
      "msisdn": "+22507XXXXXX00",
      "amount": 50000,
      "reference": "17f99xApUe472A",
      "description": "Salaire de juin",
      "type": "transfer"
    }' \
<BASE_URL>/v1/transactions
{
  "id": "txn_2cdc8ab1-6d50-49cc-ba14-54e4ac7ec231",
  "createdAt": "2023-05-25T17:43:15.970Z",
  "updatedAt": "2023-05-25T17:43:15.970Z",
  "amount": 500000,
  "fee": 5000,
  "totalAmount": 505000,
  "status": "pending",
  "msisdn": "+22507XXXXXX00",
  "reference": "17f99xApUe472A",
  "description": "Prime de juin",
  "type": "transfer"
}

Sending money to multiple Djamo clients

The batch endpoint only available for transactions with type transfer. 2. You will receive a JSON representing the the batch object.

POST /v1/transactions/batch

Parameter Type Description
transactions Array A list of transaction parameters objects used in the endpoint to create a single transaction. See example below

Example

curl \
-XPOST \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
      "transactions": [
        {
          "msisdn": "+22507XXXXXX00",
          "amount": 500000,
          "reference": "17f99xApUe472A",
          "description": "Prime de juin"
        },
        {
          "msisdn": "+22507XXXXXX01",
          "amount": 550000,
          "reference": "12E94bDeOP209T",
          "description": "Prime de juin"
        }
      ]
    }' \
<BASE_URL>/v1/transactions/batch
{
  "id": "bat_27fb25f4-3246-44c9-9f30-f0df3d9188cf",
  "createdAt": "2023-03-16T22:01:11.070Z",
  "updatedAt": "2023-03-16T22:01:11.269Z",
  "totalAmount": 8300,
  "status": "processing",
  "totalFee": 5,
  "transactions": [
      {
        "id": "txn_2cdc8ab1-6d50-49cc-ba14-54e4ac7ec231",
        "createdAt": "2023-11-24T17:43:15.970Z",
        "updatedAt": "2023-11-24T17:43:15.970Z",
        "amount": 500000,
        "fee": 5000,
        "totalAmount": 505000,
        "status": "pending",
        "msisdn": "+22507XXXXXX00",
        "reference": "17f99xApUe472A",
        "description": "Prime de juin",
        "type": "transfer"
      },
      {
        "id": "txn_ae189ba6-0dc9-492a-9bde-ffdcf0decb0b",
        "createdAt": "2023-11-24T17:44:15.970Z",
        "updatedAt": "2023-11-24T17:44:15.970Z",
        "amount": 430000,
        "fee": 4300,
        "totalAmount": 434300,
        "status": "pending",
        "msisdn": "+22507XXXXXX01",
        "reference": "2E94bDeOP209T",
        "description": "Prime de juin",
        "type": "transfer"
      }
  ]
}

Retrieving details about a transaction

GET /v1/transactions/<id>

You can alternatively use webhooks to be notified about transaction status changes.

curl  \
-X GET \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
<BASE_URL>/v1/transactions/txn_fbf960c4-294b-43cd-99a4-920b61efb17d
{
  "id": "txn_fbf960c4-294b-43cd-99a4-920b61efb17d",
  "createdAt": "2023-11-24T17:43:15.970Z",
  "updatedAt": "2023-11-24T17:43:16.970Z",
  "amount": 5000,
  "fee": 50,
  "totalAmount": 5050,
  "status": "completed",
  "msisdn": "+225079932203",
  "reference": "17f9956f-0965-4964-b2c1-40b4fef141a7",
  "failureReason": null,
  "description": "July's salary",
  "type": "transfer",
  "batchId": "17f9956f-0965-4964-b2c1-40b4fef141a7"
}

Check customer

GET /v1/transactions/customers/check

This endpoint is used to check the information a user has entered. For the moment, it just returns the customer's KYC status. The complete status is the only one that indicates that the client has been validated by the system. Any other status indicates that there is a problem with client identification.

Note

From January 25, 2025, the response will just contain a boolean indicating whether or not the customer has a djamo account.

  {
    "result": true,
  }
Parameter Type Description
subCompanyId (Optional) String The ID of the sub company
msisdn (Required) Phone Number The msisdn of the Djamo client
curl  \
-X GET \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
<BASE_URL>/v1/transactions/customers/check?msisdn=%2B2250747105623
{
  "result": true
}

Check balance

GET /v1/balance

This represents your Djamo Business account balance. You can retrieve it to see what you currently have on your business account.

curl \
-X GET \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
<BASE_URL>/v1/balance
{
  "balance": 1000,
  "currency": "XOF"
}