charges

POST /v1/charges

Request

  • Base URL
    https://apibusiness-staging-civ.djamo.io
  • Auth
    • HTTP bearer
    • or API key in header X-Company-Id

Request body

amountnumber required

The amount to charge.

externalIdstring required

The unique identifier of the transaction on your side.

descriptionstring

Description of the charge

onCanceledRedirectionUrlstring

URL to redirect the user to when the charge is canceled

onCompletedRedirectionUrlstring

URL to redirect the user to when the charge is completed

Example request

{
  "amount": 500,
  "externalId": "17f9956f-0965-4964-b2c1-40b4fef141a7",
  "description": "Charge for July's salary",
  "onCanceledRedirectionUrl": "https://merchant.com/djamo-success/1744728413766",
  "onCompletedRedirectionUrl": "https://merchant.com/djamo-success/1744728413766"
}

Response

idstring

The unique identifier of the charge.

createdAtstring

Date and time when the charge was created. The API returns this value in ISO 8601 format.

externalIdstring

The unique identifier of the transaction on your side.

descriptionstring required

Description of the charge

currencystring

Currency of the charge

amountnumber required

The amount to send to the account

duenumber

The amount due for the charge

status'due' | 'paid' | 'canceled' | 'expired' | 'failed'

Status of the charge

droppedReasonstring

The reason why the charge was dropped

paidnumber

The amount that has been paid

refundednumber

The amount that has been refunded

attemptsnumber

The number of attempts made to process the charge

metadataobject

Additional information about the charge

Example response

{
  "id": "2cc3fe81-e007-46be-a97c-ae888a35ea46",
  "createdAt": "2020-11-24T17:43:15.970Z",
  "externalId": "17f9956f-0965-4964-b2c1-40b4fef141a7",
  "description": "July's salary",
  "currency": "XOF",
  "amount": 500,
  "due": 500,
  "fees": {
    "amount": 50,
    "currency": "XOF",
    "rate": 50,
    "value": 50
  },
  "status": "due",
  "paid": 1,
  "refunded": 1,
  "attempts": 1,
  "metadata": {},
  "transactions": []
}

Changes

No recorded changes to this operation across all 2 revisions of this API.