Loopay API

Loopay API Documentation

Authentication 7

User authentication to access the API

Description

Register User

Send a request to register a new user

Body
{ "firstName": "John", "lastName": "Doe", "userName": "johndoe", "email": "johndoe@gmail.com", "phoneNumber": "8012345678", "password": "123456", "country": { "code": "NG", "name": "Nigeria" }, "countryCode": "+234", "localCurrencyCode": "NGN", "currencyDetails": { "symbol": "₦", "name": "Nigerian Naira", "symbol_native": "₦", "decimal_digits": 2, "rounding": 0, "code": "NGN", "name_plural": "Nigerian nairas" } }
Description

Login Request

Send a login request including the email and password

Body
{ "email": "toyibe233@gmail.com", "password": "251101" }
Body
{ "email": "toyibe25@gmail.com" }
Body
{ "otp": "0744", "email": "johndoe@gmail.com", "session": { "deviceManufacturer": "Postman", "deviceName": "postman", "deviceID": "ece3ee06-464e-4bc3-93d4-81cab0af6584", "osName": "Android", "osVersion": "12", "firstSignIn": "2023-07-24T19:52:13.966Z", "lastSeen": "2023-07-24T19:53:32.710Z" } }

Sessions 4

Body
{ "deviceManufacturer": "Postman", "deviceName": "postman", "deviceID": "ece3ee06-464e-4bc3-93d4-81cab0af6584", "osName": "Android", "osVersion": "12", "firstSignIn": "2023-07-24T19:52:13.966Z", "lastSeen": "2023-07-24T19:53:32.710Z" }

Beneficiary 4

Body
{ "email": "toyibe233@gmail.com", "fullName": "Khalid Odenike", "tagName": "iamsaif", "phoneNumber": "9073002598", "photo": "", "accNo": "9030582706" }
Body
{ "accNo": "2123503170", "bank": { "active": true, "code": "033", "country": "Nigeria", "createdAt": "2016-07-14T10:04:29.000Z", "currency": "NGN", "gateway": "emandate", "id": 18, "is_deleted": false, "longcode": "033153513", "name": "United Bank For Africa", "pay_with_bank": false, "slug": "united-bank-for-africa", "type": "nuban", "updatedAt": "2022-03-09T10:28:57.000Z" } }

Transactions 1

Query
KeyValueDescription
currencyNGN,naira

Transaction PIN 2

Transfer 4

Body
{ "fromCurrency": "naira", "id": "d033c888-c941-43b5-914c-cc9ad0d5fa77", "toCurrency": "dollar", "toReceive": 12.61, "toSwap": 10000 }
Body
{ "_id": "64f5cb9a612144d297d8685", "accNo": "70123456789", "amount": 50, "currency": "naira", "description": "", "email": "johndoe@gmail.com", "fullName": "John Doe", "id": "378c08e3-87d5-46c0-84fa-a413e1f869b", "phoneNumber": "+2347053941511", "photo": "https://res.cloudinary.com/geekycoder/image/upload/v1694304706/loopay/usersIcon/loopay_photo_johndoe%40gmail.com_64f66b76ca0f2e21495d8c1d.jpg", "saveAsBeneficiary": true, "senderPhoto": "https://res.cloudinary.com/geekycoder/image/upload/v1699179718/loopay/usersIcon/loopay_photo_toyibe25%40gmail.com_64f5cb9a612144d297d86856.png", "tagName": "johndoe" }
Body
{ "email": "toyibe233@gmail.com", "phoneNumber": "+2349030582706", "type": "nuban", "name": "Toyib Lawal", "accNo": "9073002599", "bankCode": "999992", "currency": "NGN", "bankName": "OPay Digital Services Limited (OPay)", "slug": "paycom", "recipientCode": "RCP_64vfk3fpm8n2pr2", "bankData": { "id": 171, "name": "OPay Digital Services Limited (OPay)", "slug": "paycom", "code": "999992", "longcode": "", "gateway": "ibank", "pay_with_bank": true, "supports_transfer": true, "active": true, "country": "Nigeria", "currency": "NGN", "type": "nuban", "is_deleted": false, "createdAt": "2020-11-24T10:20:45.000Z", "updatedAt": "2023-10-06T09:16:49.000Z" }, "reason": "", "amount": "1.00", "fee": 10, "id": "311ae15c-0d6e-4913-8c5b-99453b73f643", "allCurrencies": [ { "currency": "naira", "fullName": "Nigerian Naira", "acronym": "NGN", "symbol": "₦", "minimumAmountToAdd": 1, "isLocal": true, "status": "active" }, { "currency": "dollar", "fullName": "United State Dollar", "acronym": "USD", "symbol": "$", "minimumAmountToAdd": 1, "status": "active" }, { "currency": "euro", "fullName": "European Dollar", "acronym": "EUR", "symbol": "€", "minimumAmountToAdd": 1 }, { "currency": "pound", "fullName": "Great British Pound", "acronym": "GBP", "symbol": "£", "minimumAmountToAdd": 1 } ], "scheduleData": null }
Query
KeyValueDescription
currencyNGN

User Data 5

Query
KeyValueDescription
popuptrue
Description

Update user profiles for authenticated users

Body
{ "accountType": "Personal" }
Description

Update User profile

Body
{ "firstName": "John", "lastName": "Doe" }
Description

Upload User Photo

This request is used in handling avatar upload by authenticated user to Cloudinary file storage


Body
KeyValueDescription
file

Wallet 2

Body
{ "firstName": "John", "middleName": "Karen", "lastName": "Doe", "userName": "iamjohndoe", "email": "johndoe@gmail.com", "phoneNumber": "+2348100000000" }

Webhook 1

Body
{ "event": "charge.success", "data": { "id": 2112891182, "domain": "test", "status": "success", "reference": "1691523940636d97c26jll2pohss", "amount": 50000, "message": null, "gateway_response": "Approved", "paid_at": "2023-08-08T19:45:41.000Z", "created_at": "2023-08-08T19:45:41.000Z", "channel": "dedicated_nuban", "currency": "NGN", "ip_address": null, "metadata": { "receiver_account_number": "1238075081", "receiver_bank": "Test Bank", "custom_fields": [] }, "fees_breakdown": null, "log": null, "fees": 2500, "fees_split": null, "authorization": { "authorization_code": "AUTH_rgq974zjft", "bin": "008XXX", "last4": "X553", "exp_month": "07", "exp_year": "2023", "channel": "dedicated_nuban", "card_type": "transfer", "bank": null, "country_code": "NG", "brand": "Managed Account", "reusable": false, "signature": null, "account_name": null, "sender_country": "NG", "sender_bank": null, "sender_bank_account_number": "XXXXXX4553", "receiver_bank_account_number": "1238075081", "receiver_bank": "Test Bank" }, "customer": { "id": 130796347, "first_name": "Toyyib", "last_name": "Lawal", "email": "toyibe25@gmail.com", "customer_code": "CUS_iriumgn1avi1aq8", "phone": "+2349073002599", "metadata": {}, "risk_action": "default", "international_format_phone": "+2349073002599" }, "plan": {}, "subaccount": {}, "split": {}, "order_id": null, "paidAt": "2023-08-08T19:45:41.000Z", "requested_amount": 250000, "pos_transaction_data": null, "source": null } }

RequestFunds 2

Body
{ "id":"22", "tagName": "johndoe", "requesterAccount": "geeky_coder", "requesterName": "Toyyib Lawal", "requesterPhoto": "https://res.cloudinary.com/geekycoder/image/upload/v1694443488/loopay/usersIcon/loopay_photo_toyibe25%40gmail.com_64ff2124cda16ce4e55d10da.jpg", "requesteeAccount": "johndoe", "requesteeName": "John Doe", "currency": "dollar", "amount": 251101, "fee": 0, "description": "251101", "reference": "TRF71ab0037-d20c-4d73-89f4-9c3a1a17a85e" }

Airtime 4

Query
KeyValueDescription
phone09073002599
countryNG
Body
{ "network": "mtn", "amount": "1000", "phoneNo": "09030582706", "operatorId": 341, "id": "db934716-1928-480a-8522-7ac4ffcaea48", "currency": "naira", "type": "airtime", "countryCode": "NG" }
Query
KeyValueDescription
providermtn
countryNG

Bill Payments 3

Description

Get bills like (electricity, water, scholl, cable) by passing the string value in the request url as query

Description

Pay bills like (electricity, water, scholl, cable) by passing it in the request url as query

Query
KeyValueDescription
electricity
Body
{ "provider": { "id": 7, "name": "Ibadan Electricity Postpaid", "countryCode": "NG", "countryName": "Nigeria", "type": "ELECTRICITY_BILL_PAYMENT", "serviceType": "POSTPAID", "localAmountSupported": true, "localTransactionCurrencyCode": "NGN", "minLocalTransactionAmount": 500, "maxLocalTransactionAmount": 300000, "localTransactionFee": 112.5, "localTransactionFeeCurrencyCode": "NGN", "localDiscountPercentage": 0, "internationalAmountSupported": true, "internationalTransactionCurrencyCode": "NGN", "minInternationalTransactionAmount": 500, "maxInternationalTransactionAmount": 300000, "internationalTransactionFee": 0, "internationalTransactionFeeCurrencyCode": "NGN", "internationalDiscountPercentage": 8, "fx": { "rate": 1, "currencyCode": "NGN" }, "denominationType": "RANGE", "localFixedAmounts": null, "internationalFixedAmounts": null }, "subscriberAccountNumber": "02559695", "amount": "10000.00", "referenceId": "103286bf-2fe6-4dc1-a146-10de52d60e14", "routeId": "electricity" }

Verification 2

Query
KeyValueDescription
image
Body
KeyValueDescription
front
back
data{"country": {"name": "Nigeria"}, "idType":{"name": "National ID"}}
Body
{ "country": { "name": "Nigeria" }, "idType": { "name": "National ID", "value": "52151225" } }

Admin Requests 16

Description

Get all regsitered users (admin)

Query
KeyValueDescription
userDatatrue
Description

Get a singer user with tag name, email or account number (admin)

Description

Finalize withdraw transfer from loopay

Body
{ "email": "johndoe@gmail.com" }
Body
{ "email": "johndoe@gmail.com", "blockEnd": "01/01/2024" }
Body
{ "email": "johndoe@gmail.com" }
Body
{ "email": "johndoe@gmail.com" }
Query
KeyValueDescription
currencynaira,dollar,euro,pound
limit40
page1
userIdphoneNumber:+2349073002599
Query
KeyValueDescription
currencynaira
startWed%20Nov%2001%202023%2000:00:00%20GMT+0100
endThu%20Nov%2030%202023%2000:00:00%20GMT+0100
Headers
KeyValueDescription
principal3D3A120F-498C-4688-AD1C-E6151900D974
credentialsqG6%=PzXPTQUJdf
hash4bd289fa4ba745e6a2acead0c61a63e86137c83ff6354548a7f2e2fc59970c9c45ddd98cce1c42de85788c0acb142efa29c856efff064d72aaaeeecba529dfd9
Body
{ "reference": "TRc011c3b3-f9e9-43a6-b45c-f4a2cdc304d1" }