Skip to content

Create a transfer.

POST https://api.leapa.co/v2/transfers

This endpoint needs your API key

Send it as a bearer token in the Authorization header. A request without one is answered with 401. See Authentication for where to find your key and how to keep it secret.

Request

curl -X POST "https://api.leapa.co/v2/transfers" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 45000,
    "description": "Room 204, two nights",
    "type": "deposit",
    "merchant_id": "mer_1b47d0e9ca"
  }'

Response

Created

{
  "id": "obj_5f21c8a40b",
  "object": "string",
  "amount": 45000,
  "currency": "BIF",
  "description": "Room 204, two nights",
  "type": "deposit",
  "created_date": 0,
  "merchant_id": "mer_1b47d0e9ca",
  "merchant_name": "Jeanne Ndayishimiye",
  "live": false,
  "modified_date": 0,
  "reversal_id": "string"
}

Request body

application/json

Required. Send it as JSON.

  • amountinteger<int64>required

    Amount to be transferred. Contraint: Not null, Max: 99999999

    Must be:at most 99999999
  • descriptionstringrequired

    Short description of the transfer. Constraints: Not null, Size(min=3, max=100)

    Must be:3 to 100 characters
  • typestringrequired

    Type of the transfer. Either deposit or reversal. constraint: Not null

    Allowed values:depositreversal
  • merchant_idstringrequired

    ID of the merchant receiving the funds for a Deposit or Sending a fund for a Reversal. Constraint: Required for deposit type

Response

application/json
  • idstring

    Id of the transfer

  • objectstring

    object to be returned

  • amountinteger<int64>

    Amount to be transferred.

  • currencystring

    Three-Letter ISO currency code

    Allowed values:BIFUSDKESXAF
  • descriptionstring

    Description of the payout.

  • typestring

    Type of the transfer. Either deposit or reversal

    Allowed values:depositreversal
  • created_dateinteger<int64>

    UTC UNIX Epoch Timestamp in millisecond at which the record was created.

  • merchant_idstring

    ID of the merchant receiving the fund

  • merchant_namestring

    Name of the merchant receiving the fund

  • liveboolean

    Whether the object exist in live or test mode.

  • modified_dateinteger<int64>

    UTC UNIX Epoch Timestamp in millisecond at which the object was modified.

  • reversal_idstring

    ID of the reversal transfer for a deposit. Only valid for bank and card type.

Status codes

  • 201Created
  • 400Bad request
  • 401Unauthorized
  • 402Payment required
  • 403Forbidden
  • 404Not found
  • 428Precondition required
  • 500Server error

Request

curl -X POST "https://api.leapa.co/v2/transfers" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 45000,
    "description": "Room 204, two nights",
    "type": "deposit",
    "merchant_id": "mer_1b47d0e9ca"
  }'

Response

Created

{
  "id": "obj_5f21c8a40b",
  "object": "string",
  "amount": 45000,
  "currency": "BIF",
  "description": "Room 204, two nights",
  "type": "deposit",
  "created_date": 0,
  "merchant_id": "mer_1b47d0e9ca",
  "merchant_name": "Jeanne Ndayishimiye",
  "live": false,
  "modified_date": 0,
  "reversal_id": "string"
}