Skip to main content
Danipa

API Reference

Complete reference for the Danipa Fintech API — transfers, wallets, exchange rates, KYC, payment requests, MTN MoMo integration, bill payments, savings, loans, invoices, POS, payroll, and more.

Base URL

All API requests use the following base URL:

https://api.danipa.com/ms/v1

The OpenAPI specification version is 3.1.0. For the full machine-readable spec, see openapi.json.


Authentication

The API uses two authentication schemes depending on the endpoint type:

Bearer Token (JWT) — App Users

Most endpoints require a JWT Bearer token obtained after user registration and login via Keycloak:

Authorization: Bearer <jwt_token>

HTTP Basic — MoMo API Operations

MTN Mobile Money endpoints (Collection, Disbursement, Remittance) use HTTP Basic authentication with your API user ID as the username and API key as the password, Base64-encoded:

Authorization: Basic <base64(apiUserId:apiKey)>

Common Headers

HeaderRequiredDescription
AuthorizationYesBearer <token> or Basic <credentials>
Content-TypeYes (POST/PUT)application/json
Ocp-Apim-Subscription-KeyYesYour subscription key from the API Manager portal
X-Target-EnvironmentYessandbox or production
X-Correlation-IDYesUUID for request tracing across distributed systems
Cache-ControlNoCache directive (e.g. no-cache)

1. Authentication

User registration and account recovery.

MethodPathDescription
POST/auth/registerRegister a new user (creates Keycloak account + wallet)
POST/auth/forgot-passwordRequest a password reset email

Register

POST /ms/v1/auth/register

Request Body:

FieldTypeRequiredDescription
firstNamestringYesFirst name (1-100 chars)
lastNamestringYesLast name (1-100 chars)
emailstringYesEmail address
phonestringYesPhone number (E.164, 7-15 digits)
passwordstringYesPassword (12-128 chars)
countrystringYesCountry code (2-3 chars, e.g. GH, CA)

2. Transfers

Create and track money transfers to saved recipients.

MethodPathDescription
POST/transactionsCreate a new transfer
GET/transactionsList transfers (paginated)
GET/transactions/{id}Get transfer detail

Create Transfer

POST /ms/v1/transactions

Request Body:

FieldTypeRequiredDescription
recipientIdstringYesID of a saved recipient
amountnumberYesAmount to send (min 0.01)
sendCurrencystringYesSend currency (3 chars, e.g. CAD)
receiveCurrencystringYesReceive currency (3 chars, e.g. GHS)
speedTierstringYesexpress or economy
quoteIdstringNoLocked FX quote ID (from /fx/quotes)

Example:

curl -X POST https://api.danipa.com/ms/v1/transactions \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "recipientId": "rec_8f3a2b1c",
    "amount": 250.00,
    "sendCurrency": "CAD",
    "receiveCurrency": "GHS",
    "speedTier": "express",
    "quoteId": "qt_x7k9m2p4"
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "dd657f12-49c7-4e30-8f57-5b2fa13a4865",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "id": "txn_r7kj2m9x",
    "type": "REMITTANCE",
    "status": "PENDING",
    "sendAmount": 250.00,
    "sendCurrency": "CAD",
    "receiveAmount": 1980.28,
    "receiveCurrency": "GHS",
    "fee": 1.49,
    "exchangeRate": 7.9211,
    "speedTier": "express",
    "providerRefId": "momo-ref-abc123",
    "createdAt": "2026-03-13T14:22:00Z",
    "events": []
  }
}

List Transfers

GET /ms/v1/transactions?page=0&size=20

ParameterTypeDefaultDescription
pageinteger0Page number (zero-based)
sizeinteger20Results per page

3. Recipients

Manage saved transfer recipients.

MethodPathDescription
POST/recipientsCreate a new recipient
GET/recipientsList all recipients (sorted by most recently used)
PUT/recipients/{id}Update a recipient
DELETE/recipients/{id}Delete a recipient

4. Exchange Rates

Get live FX rates and fee calculations for the send money flow.

MethodPathDescription
GET/exchange-ratesGet exchange rate and fee for a currency pair

Get Exchange Rate

GET /ms/v1/exchange-rates?from=CAD&to=GHS&amount=250&speed=express

ParameterTypeRequiredDefaultDescription
fromstringYes--Send currency (e.g. CAD, USD, GBP)
tostringYes--Receive currency (e.g. GHS)
amountnumberNo100Send amount for fee calculation (min 0.01)
speedstringNoexpressSpeed tier: express or economy

Example:

curl "https://api.danipa.com/ms/v1/exchange-rates?from=CAD&to=GHS&amount=250&speed=express" \
  -H "Authorization: Bearer <token>" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)"

5. FX Quotes

Lock an exchange rate for a configurable window before creating a transfer.

MethodPathDescription
POST/fx/quotesCreate a locked FX quote
GET/fx/quotes/{quoteId}Retrieve a quote by ID

The quoteId returned from POST /fx/quotes can be passed to POST /transactions to guarantee the quoted rate.


6. Wallet

Digital wallet with multi-currency accounts, peer-to-peer transfers, and MoMo integration.

MethodPathDescription
POST/walletsCreate wallet (one per user, default GHS account)
GET/wallets/meGet wallet details
GET/wallets/me/balancesGet all currency balances
GET/wallets/me/balances/{currency}Get balance for a specific currency
POST/wallets/me/transferP2P transfer to another wallet
POST/wallets/me/fund-inFund wallet via MoMo
POST/wallets/me/cash-outCash out to MoMo
POST/wallets/me/refundRequest a refund
PUT/wallets/me/accounts/{currency}Add a currency account
DELETE/wallets/me/accounts/{currency}Remove a currency account
GET/wallets/me/transactions/{currency}Get transaction history by currency
GET/wallets/me/fund-insList fund-in requests
GET/wallets/me/cash-outsList cash-out requests

Create Wallet

POST /ms/v1/wallets

No request body required. Creates a wallet with a default GHS account.

Example:

curl -X POST https://api.danipa.com/ms/v1/wallets \
  -H "Authorization: Bearer <token>" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)"

7. KYC (Know Your Customer)

Document upload, verification status, and tier upgrades.

MethodPathDescription
POST/kyc/documentsUpload a KYC document
GET/kyc/statusGet current KYC verification status
GET/kyc/tiersList available KYC tiers and requirements
POST/kyc/upgradeRequest upgrade to a higher KYC tier

8. Payment Requests

Request money from other Danipa users. Requests expire after 7 days.

MethodPathDescription
POST/payment-requestsCreate a payment request
POST/payment-requests/{id}/acceptAccept a payment request
POST/payment-requests/{id}/rejectReject a payment request
POST/payment-requests/{id}/cancelCancel a sent payment request
GET/payment-requests/sentList sent payment requests
GET/payment-requests/receivedList received payment requests

9. Payment Methods (Stripe)

Manage saved payment methods for card-based funding.

MethodPathDescription
GET/payment-methodsList saved payment methods
POST/payment-methods/syncSync payment methods from Stripe
POST/payment-methods/setup-intentCreate a Stripe setup intent for adding a new card
PUT/payment-methods/defaultSet a payment method as default
DELETE/payment-methods/{paymentMethodId}Remove a payment method

10. Collection -- MTN Mobile Money (MoMo)

Request payments from MoMo account holders. All collection endpoints use HTTP Basic authentication and return 202 Accepted for async processing.

MethodPathDescription
POST/collection/payment/requestRequest to pay (initiate payment from payer)
GET/collection/payment/request/{referenceId}/statusGet request-to-pay status
POST/collection/paymentInitiate payment via partner gateway
GET/collection/payment/{X-Reference-Id}/statusGet payment status
PUT/collection/payment/withdrawInitiate a withdrawal (cash-out) from payer
GET/collection/payment/withdraw/{referenceId}/statusGet withdrawal status
POST/collection/invoiceCreate an invoice
GET/collection/invoice/{X-Reference-Id}/statusGet invoice status
DELETE/collection/invoice/{referenceId}/cancelCancel an invoice
POST/collection/preapprovalCreate a pre-approval
GET/collection/preapproval/{referenceId}/statusGet pre-approval status
DELETE/collection/preapproval/{preApprovalId}/cancelCancel a pre-approval

Additional endpoints exist for account balance, account holder status, OAuth token management, and consent. See the full OpenAPI spec for details.


11. Disbursement -- MTN Mobile Money (MoMo)

Transfer funds to MoMo account holders. All disbursement endpoints use HTTP Basic authentication and return 202 Accepted for async processing.

MethodPathDescription
POST/disbursement/transferTransfer funds to a payee
GET/disbursement/transfer/{referenceId}/statusGet transfer status
POST/disbursement/depositDeposit to a payee account
GET/disbursement/deposit/{referenceId}/statusGet deposit status
POST/disbursement/refundRefund a completed transaction
GET/disbursement/refund/{referenceId}/statusGet refund status

Additional endpoints exist for account balance, account holder info/status, OAuth tokens, and consent. See the full OpenAPI spec for details.


12. Remittance -- MTN Mobile Money (MoMo)

Cross-border transfers via MoMo. All remittance endpoints use HTTP Basic authentication and return 202 Accepted for async processing.

MethodPathDescription
POST/remittance/transferTransfer funds to a recipient
GET/remittance/transfer/{referenceId}/statusGet transfer status
POST/remittance/cash/transferCash transfer to a payee
GET/remittance/cash/transfer/{referenceId}/statusGet cash transfer status

Additional endpoints exist for account balance, account holder info/status, OAuth tokens, and consent. See the full OpenAPI spec for details.


User Profile

MethodPathDescription
GET/users/meGet current user profile
PUT/users/meUpdate current user profile
POST/users/me/logout-allSign out all devices

💳 Bill Payments

Pay utility bills, airtime top-ups, and other services through integrated bill payment providers.

MethodPathDescription
GET/v1/bills/providersList bill payment providers (filter by category, country)
POST/v1/bills/payPay a bill
GET/v1/bills/historyBill payment history
POST/v1/bills/saved-billersSave a biller for quick access
GET/v1/bills/saved-billersList saved billers
POST/v1/bills/scheduledCreate a scheduled bill payment
GET/v1/bills/scheduledList scheduled bill payments

Pay a Bill

POST /ms/v1/bills/pay

Request Body:

FieldTypeRequiredDescription
providerIdstringYesBill provider ID (from /bills/providers)
accountNumberstringYesCustomer account or meter number
amountnumberYesPayment amount (min 0.01)
currencystringYesCurrency code (3 chars, e.g. GHS)

Example:

curl -X POST https://api.danipa.com/ms/v1/bills/pay \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "providerId": "bp_ecg_gh",
    "accountNumber": "0112345678",
    "amount": 150.00,
    "currency": "GHS"
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "id": "bill_x9k2m4p7",
    "providerId": "bp_ecg_gh",
    "providerName": "ECG Prepaid",
    "accountNumber": "0112345678",
    "amount": 150.00,
    "currency": "GHS",
    "status": "COMPLETED",
    "receiptNumber": "RCP-20260324-001",
    "token": "4567-8901-2345-6789",
    "paidAt": "2026-03-24T10:15:00Z"
  }
}

🎯 Savings Goals

Create and manage savings goals with target amounts and deadlines. Deposit or withdraw funds at any time.

MethodPathDescription
POST/v1/savings/goalsCreate a savings goal
GET/v1/savings/goalsList all savings goals
GET/v1/savings/goals/{id}Get savings goal detail
POST/v1/savings/goals/{id}/depositDeposit into a savings goal
POST/v1/savings/goals/{id}/withdrawWithdraw from a savings goal

Create Savings Goal

POST /ms/v1/savings/goals

Request Body:

FieldTypeRequiredDescription
namestringYesGoal name (1-100 chars)
targetAmountnumberYesTarget amount (min 1.00)
currencystringYesCurrency code (3 chars, e.g. GHS)
targetDatestringNoTarget date (ISO 8601, e.g. 2026-12-31)

Example:

curl -X POST https://api.danipa.com/ms/v1/savings/goals \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "name": "New Laptop",
    "targetAmount": 5000.00,
    "currency": "GHS",
    "targetDate": "2026-12-31"
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "id": "goal_m3k7p2x9",
    "name": "New Laptop",
    "targetAmount": 5000.00,
    "savedAmount": 0.00,
    "currency": "GHS",
    "progress": 0.0,
    "targetDate": "2026-12-31",
    "status": "ACTIVE",
    "createdAt": "2026-03-24T10:20:00Z"
  }
}

🔄 Savings Plans

Set up automated recurring deposits into your savings goals.

MethodPathDescription
POST/v1/savings/plansCreate an auto-save plan
GET/v1/savings/plansList all savings plans
PUT/v1/savings/plans/{id}/pausePause a savings plan
PUT/v1/savings/plans/{id}/resumeResume a paused savings plan

Create Auto-Save Plan

POST /ms/v1/savings/plans

Request Body:

FieldTypeRequiredDescription
goalIdstringYesSavings goal to fund
amountnumberYesRecurring deposit amount (min 1.00)
frequencystringYesdaily, weekly, or monthly
startDatestringYesStart date (ISO 8601)

Example:

curl -X POST https://api.danipa.com/ms/v1/savings/plans \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "goalId": "goal_m3k7p2x9",
    "amount": 200.00,
    "frequency": "weekly",
    "startDate": "2026-04-01"
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "id": "plan_j4n8r2v6",
    "goalId": "goal_m3k7p2x9",
    "amount": 200.00,
    "frequency": "weekly",
    "nextDebitDate": "2026-04-01",
    "status": "ACTIVE",
    "createdAt": "2026-03-24T10:25:00Z"
  }
}

🏦 Loans

Browse loan products, apply for loans, and manage repayments.

MethodPathDescription
GET/v1/loans/productsList available loan products
POST/v1/loans/applyApply for a loan
GET/v1/loansList user's loans
GET/v1/loans/{id}Get loan detail with repayment schedule
POST/v1/loans/{id}/repayMake a loan repayment

Apply for a Loan

POST /ms/v1/loans/apply

Request Body:

FieldTypeRequiredDescription
productIdstringYesLoan product ID (from /loans/products)
amountnumberYesRequested loan amount
currencystringYesCurrency code (3 chars, e.g. GHS)
termMonthsintegerYesLoan term in months
purposestringNoPurpose of the loan

Example:

curl -X POST https://api.danipa.com/ms/v1/loans/apply \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "productId": "lp_personal_standard",
    "amount": 10000.00,
    "currency": "GHS",
    "termMonths": 12,
    "purpose": "Business expansion"
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "d4e5f6a7-b8c9-0123-defa-234567890123",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "id": "loan_k5p9t3w7",
    "productId": "lp_personal_standard",
    "principalAmount": 10000.00,
    "currency": "GHS",
    "interestRate": 18.5,
    "termMonths": 12,
    "monthlyPayment": 916.80,
    "status": "PENDING_APPROVAL",
    "appliedAt": "2026-03-24T10:30:00Z"
  }
}

📊 Credit Score

Check your credit score, view score history, and determine loan eligibility.

MethodPathDescription
GET/v1/credit/scoreGet current credit score and grade
GET/v1/credit/historyGet credit score history over time
GET/v1/credit/eligibilityCheck loan eligibility based on credit profile

Get Credit Score

GET /ms/v1/credit/score

Example:

curl "https://api.danipa.com/ms/v1/credit/score" \
  -H "Authorization: Bearer <token>" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)"

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "e5f6a7b8-c9d0-1234-efab-345678901234",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "score": 720,
    "grade": "A",
    "maxScore": 850,
    "factors": [
      "Consistent on-time repayments",
      "Low credit utilization",
      "Active savings history"
    ],
    "lastUpdated": "2026-03-24T00:00:00Z"
  }
}

🧾 Invoices

Create and manage invoices for merchant transactions.

MethodPathDescription
POST/v1/merchants/me/invoicesCreate a new invoice
GET/v1/merchants/me/invoicesList all invoices
GET/v1/merchants/me/invoices/{id}Get invoice detail
POST/v1/merchants/me/invoices/{id}/voidVoid an invoice

Create Invoice

POST /ms/v1/merchants/me/invoices

Request Body:

FieldTypeRequiredDescription
customerEmailstringYesCustomer email address
itemsarrayYesLine items (see below)
currencystringYesCurrency code (3 chars, e.g. GHS)
dueDatestringNoPayment due date (ISO 8601)
notesstringNoAdditional notes

Line item fields:

FieldTypeRequiredDescription
descriptionstringYesItem description
quantityintegerYesQuantity
unitPricenumberYesPrice per unit

Example:

curl -X POST https://api.danipa.com/ms/v1/merchants/me/invoices \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "customerEmail": "customer@example.com",
    "items": [
      { "description": "Web Design Service", "quantity": 1, "unitPrice": 3500.00 },
      { "description": "Domain Registration", "quantity": 2, "unitPrice": 120.00 }
    ],
    "currency": "GHS",
    "dueDate": "2026-04-15",
    "notes": "Payment due within 30 days"
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "f6a7b8c9-d0e1-2345-fabc-456789012345",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "id": "inv_n6q0u4y8",
    "invoiceNumber": "INV-2026-0042",
    "customerEmail": "customer@example.com",
    "items": [
      { "description": "Web Design Service", "quantity": 1, "unitPrice": 3500.00, "total": 3500.00 },
      { "description": "Domain Registration", "quantity": 2, "unitPrice": 120.00, "total": 240.00 }
    ],
    "subtotal": 3740.00,
    "currency": "GHS",
    "status": "SENT",
    "dueDate": "2026-04-15",
    "createdAt": "2026-03-24T10:35:00Z"
  }
}

🤝 Referrals

Invite friends to Danipa and earn rewards when they sign up and transact.

MethodPathDescription
GET/v1/referrals/codeGet your unique referral code
GET/v1/referralsList all referrals and their status
GET/v1/referrals/rewardsGet referral reward history

Get Referral Code

GET /ms/v1/referrals/code

Example:

curl "https://api.danipa.com/ms/v1/referrals/code" \
  -H "Authorization: Bearer <token>" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)"

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "a7b8c9d0-e1f2-3456-abcd-567890123456",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "code": "DANIPA-PK7X9M",
    "shareUrl": "https://danipa.com/join?ref=DANIPA-PK7X9M",
    "totalReferrals": 12,
    "completedReferrals": 8,
    "totalRewardsEarned": 240.00,
    "rewardCurrency": "GHS"
  }
}

⚖️ Disputes

File and track disputes for transactions that require investigation or resolution.

MethodPathDescription
POST/v1/disputesFile a new dispute
GET/v1/disputesList all disputes
GET/v1/disputes/{id}Get dispute detail
POST/v1/disputes/{id}/commentsAdd a comment to a dispute

File a Dispute

POST /ms/v1/disputes

Request Body:

FieldTypeRequiredDescription
transactionIdstringYesID of the disputed transaction
reasonstringYesunauthorized, duplicate, not_received, incorrect_amount, or other
descriptionstringYesDetailed description (10-1000 chars)
evidencearrayNoArray of evidence file URLs

Example:

curl -X POST https://api.danipa.com/ms/v1/disputes \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "transactionId": "txn_r7kj2m9x",
    "reason": "not_received",
    "description": "Recipient has not received the funds after 48 hours. MoMo confirmation was received but balance not credited."
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "b8c9d0e1-f2a3-4567-bcde-678901234567",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "id": "dsp_p8s2v6z0",
    "transactionId": "txn_r7kj2m9x",
    "reason": "not_received",
    "description": "Recipient has not received the funds after 48 hours. MoMo confirmation was received but balance not credited.",
    "status": "OPEN",
    "priority": "MEDIUM",
    "createdAt": "2026-03-24T10:40:00Z",
    "expectedResolutionDate": "2026-03-31T23:59:59Z"
  }
}

🔔 Notifications

Manage notification preferences for email, SMS, and push notifications.

MethodPathDescription
GET/v1/notifications/preferencesGet current notification preferences
PUT/v1/notifications/preferencesUpdate notification preferences

Update Notification Preferences

PUT /ms/v1/notifications/preferences

Request Body:

FieldTypeRequiredDescription
emailobjectNoEmail notification settings
smsobjectNoSMS notification settings
pushobjectNoPush notification settings

Each channel object supports these boolean fields: transactions, promotions, security, reminders.

Example:

curl -X PUT https://api.danipa.com/ms/v1/notifications/preferences \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "email": { "transactions": true, "promotions": false, "security": true, "reminders": true },
    "sms": { "transactions": true, "promotions": false, "security": true, "reminders": false },
    "push": { "transactions": true, "promotions": true, "security": true, "reminders": true }
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "c9d0e1f2-a3b4-5678-cdef-789012345678",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "email": { "transactions": true, "promotions": false, "security": true, "reminders": true },
    "sms": { "transactions": true, "promotions": false, "security": true, "reminders": false },
    "push": { "transactions": true, "promotions": true, "security": true, "reminders": true },
    "updatedAt": "2026-03-24T10:45:00Z"
  }
}

🏪 POS (Point of Sale)

Process in-person sales and refunds, manage product catalogs, and view daily reports for merchant locations.

MethodPathDescription
POST/v1/pos/salesProcess a sale
POST/v1/pos/refundsProcess a refund
GET/v1/pos/catalogList catalog items
GET/v1/pos/reports/dailyGet daily sales report

Process a Sale

POST /ms/v1/pos/sales

Request Body:

FieldTypeRequiredDescription
itemsarrayYesArray of sale items
paymentMethodstringYesmomo, card, or cash
currencystringYesCurrency code (3 chars, e.g. GHS)
customerPhonestringNoCustomer phone for receipt delivery

Sale item fields:

FieldTypeRequiredDescription
catalogItemIdstringNoCatalog item ID (if from catalog)
descriptionstringYesItem description
quantityintegerYesQuantity
unitPricenumberYesPrice per unit

Example:

curl -X POST https://api.danipa.com/ms/v1/pos/sales \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "items": [
      { "catalogItemId": "cat_001", "description": "Wireless Mouse", "quantity": 2, "unitPrice": 85.00 },
      { "description": "USB Cable", "quantity": 1, "unitPrice": 25.00 }
    ],
    "paymentMethod": "momo",
    "currency": "GHS",
    "customerPhone": "+233241234567"
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "d0e1f2a3-b4c5-6789-defa-890123456789",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "id": "sale_q9t3w7a1",
    "receiptNumber": "POS-20260324-0017",
    "items": [
      { "description": "Wireless Mouse", "quantity": 2, "unitPrice": 85.00, "total": 170.00 },
      { "description": "USB Cable", "quantity": 1, "unitPrice": 25.00, "total": 25.00 }
    ],
    "subtotal": 195.00,
    "currency": "GHS",
    "paymentMethod": "momo",
    "status": "COMPLETED",
    "createdAt": "2026-03-24T10:50:00Z"
  }
}

💰 Payroll

Create and process payroll batches for bulk salary disbursements to employees via MoMo.

MethodPathDescription
POST/v1/payroll/batchesCreate a payroll batch
GET/v1/payroll/batchesList payroll batches
POST/v1/payroll/batches/{id}/processProcess a payroll batch
GET/v1/payroll/templatesList payroll templates

Create Payroll Batch

POST /ms/v1/payroll/batches

Request Body:

FieldTypeRequiredDescription
namestringYesBatch name (e.g. March 2026 Salaries)
currencystringYesCurrency code (3 chars, e.g. GHS)
templateIdstringNoPayroll template ID to pre-fill employees
employeesarrayYesArray of employee payment entries

Employee entry fields:

FieldTypeRequiredDescription
namestringYesEmployee name
phonestringYesMoMo phone number (E.164)
amountnumberYesPayment amount
referencestringNoInternal reference

Example:

curl -X POST https://api.danipa.com/ms/v1/payroll/batches \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: <your-key>" \
  -H "X-Target-Environment: production" \
  -H "X-Correlation-ID: $(uuidgen)" \
  -d '{
    "name": "March 2026 Salaries",
    "currency": "GHS",
    "employees": [
      { "name": "Kwame Asante", "phone": "+233241000001", "amount": 4500.00, "reference": "EMP-001" },
      { "name": "Ama Mensah", "phone": "+233241000002", "amount": 3800.00, "reference": "EMP-002" },
      { "name": "Yaw Boateng", "phone": "+233241000003", "amount": 5200.00, "reference": "EMP-003" }
    ]
  }'

Response (200 OK):

{
  "timeStamp": 1754347579330,
  "correlationId": "e1f2a3b4-c5d6-7890-efab-901234567890",
  "serverStatusCode": "200",
  "severity": "INFO",
  "data": {
    "id": "batch_r0u4x8b2",
    "name": "March 2026 Salaries",
    "currency": "GHS",
    "totalEmployees": 3,
    "totalAmount": 13500.00,
    "status": "DRAFT",
    "createdAt": "2026-03-24T10:55:00Z"
  }
}

Response Format

All responses follow a consistent envelope structure:

{
  "timeStamp": 1754347579330,
  "correlationId": "96e6837a-150c-4883-bf22-90664184e60b",
  "serverStatusCode": "200",
  "severity": "INFO",
  "details": {
    "code": "SUCCESS",
    "severity": "INFO",
    "description": "Operation completed successfully."
  },
  "data": { }
}

Error Response

{
  "timeStamp": 1754347579330,
  "correlationId": "96e6837a-150c-4883-bf22-90664184e60b",
  "serverStatusCode": "400",
  "severity": "ERROR",
  "details": {
    "code": "BAD_REQUEST",
    "severity": "ERROR",
    "description": "The request could not be understood or was missing required parameters."
  }
}

HTTP Status Codes

CodeDescription
200Success
202Accepted (async MoMo operations)
400Bad request / validation error
401Unauthorized (missing or invalid credentials)
403Forbidden (insufficient permissions)
404Resource not found
409Conflict (duplicate or stale resource)
500Internal server error
502Bad gateway (upstream provider error)
503Service unavailable (temporary overload)

Webhooks

The API delivers async transaction results via webhooks. Callbacks are HMAC-SHA256 signed via the X-Danipa-Signature header and include an X-Danipa-Timestamp for replay protection (300-second window). Each delivery is identified by a unique X-Danipa-Delivery UUID.

WebhookDescription
MoMo Transfer CallbackFired when a disbursement or remittance transfer completes or fails
MoMo Payment CallbackFired when a collection request-to-pay completes or fails

Rate Limits

PlanRequests/minuteRequests/day
Sandbox6010,000
Starter12050,000
Business600500,000
EnterpriseCustomCustom

Rate limit headers are included in every response:

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 118
X-RateLimit-Reset: 1710165060

Full OpenAPI Specification

The complete machine-readable API specification (OpenAPI 3.1.0) is available at /docs/openapi.json. It includes all endpoints, request/response schemas, and examples -- including admin endpoints not covered in this reference.