📚 | Documentation
Transfers
Make Transfer

Initiate a transfer

This API is utilized for the transfer of funds from the merchant's account to a customer's account. It enables the seamless movement of money, allowing businesses or platforms to disburse payments to their customers efficiently and securely.

For the security sake, we need to start generating an access which will be used on transfer request

Here below, the API specification to create the access token

POST /v1/tokens HTTP/1.1
Host: kepissasbc.execute-api.eu-west-1.amazonaws.com
Authorization: Basic {base64(wallet_adress:wallet_private_key)}

Create Access Token Sample API Request

curl --location --request POST 'https://kepissasbc.execute-api.eu-west-1.amazonaws.com/v1/tokens' \
--header 'Authorization: Basic base64_encoded_value'

Create Access Token Sample API Response

HTTP 200 OK
{
    "jwt": "eyJhbGciOiJSUzI1NiJ9.eyJhZGRyZXNzIjoiMUdDelQ1NGtBNTRxVmhIWkRZR050S2RFenY4eHVEN0ZwSCIsInN1YiI6IndhbGxldF8yVnQzNUk1WDNvRkdwSUhsa0FZNnJGWkhDNmUiLCJpYXQiOjE2OTY1MzUwMDMsImlzcyI6ImlkLmxpZ2h0cGF5LmlvIiwiZXhwIjoxNjk2NTM4NjAzfQ.aSgQRqlqQQR5CpqfdHE5rlRj__FTjv3ZKQf79IPAbG4-9kJMnmh0_X5vi9ZHS25TqGfK6h7NflwZP6ziL5AxDcuAcj1lHKUYkRlLQSv7_rM2BxuVdAPQdNk2Fu5Kzw-zI8pE794DRtLnGkUyR3vgvaLyPeUcdrJsgscQz2A0l21jsXj1Vbz6qwsVvDluJvpe-Awfklb07c1d42foClkZB1c9pF77rkw6tut8AUrq_7AB7MaX5L650SsKDsCdRahWLSDKk85jpmufah7VY7cIdKBDJAK2xNkGXSFhccezz5321Jkt_suOLwF_fn8gbGi7HiJ6p2R2smAVmuguQJWMVN-T8lwRJtIXLokK2hrN8mCO3PFXDOm_fod774PAz1ZebJb8Ttx42tufsrYDrr2hwJ3-uiF2omAxvAzxM-bvTnejxP-i224kIvTgoC7X0FWaV9W89WbkyQK791xyVu04HPV9Ohr-BlztCgJrR9anu9GJqakg26o4GeYzv79jaa8WuXHTXhcEOjU6mTVMPH1CkWhINVB7cpalIyyXQ0G2FhjCYJXEvJX_NZ_IOWruINfpG5Hlrl_kWg_oOuyWY2ZRV8WCw33pYV1COAbsDNirxn4jyf3WKFL7P6DIcDQNKp4p9vZwBgHO4jGWjVdhkvftmsaJPhusR0ls9N_MOIf94_E"
}

Once the access token create, we can proceed on the Transfer Request

POST /v1/transfers HTTP/1.1
Host: kepissasbc.execute-api.eu-west-1.amazonaws.com
x-callback-url: https://staging.fnstack.dev/webhooks/light-pay/transfers
Content-Type: application/json
Authorization: Bearer access_token
Content-Length: 211
 
{
    "externalId": "string",
    "amount": int,
    "recepient": {
        "recepientId": "string",
        "recepientIdType": "EMAIL | MSISDN"
    },
    "description": "string"
}

Please note that x-callback-url header is not mandatory

Here below, the API specification for transfer request

Transfer Request Sample API Request

curl --location 'https://kepissasbc.execute-api.eu-west-1.amazonaws.com/v1/payments' \
--header 'x-callback-url: https://staging.fnstack.dev/webhooks/light-pay/payments' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer access_token' \
--data '{
    "externalId": "txn_2WO0catb7yoa8g0r6R1yfsZ3neC",
    "amount": 1000,
    "payer": {
        "payerId": "242067895263",
        "payerIdType": "MSISDN"
    },
    "description": "test"
}'

Transfer Request Sample API Response

HTTP 202 ACCEPTED
{
    "transferId": "transfer_2Wd3JuaeMQpGozEomNRvRLvl7kg",
    "externalId": "txn_2WO0catb7yoa8g0r6R1yfsZ3neC",
    "status": "PENDING"
}