CBL | DevPortal
  • Welcome to the Central Bank of Libya Developer Portal | DevPortal
  • LYPay
    • LYPay Instant Payment System
    • Regulatory Guidelines & Compliance
    • Accounting & Settlement in LYPay
    • LYPay Instant Payment System – Technical Overview
    • API Documentation
      • About the APIs
      • API reference
        • Webhooks
        • Auth
          • Revoke
        • Api
          • V1
            • Miscs
              • Institutions
              • Transaction status
            • Payments
              • Funds transfers
                • Refund
                • Confirm
              • Debited funds transfers
              • Credited funds transfers
                • By internal merchant reference
              • Details
            • Auth
              • Token
              • Password
                • Reset
      • Specification
    • NUMO QR Code Standards
  • Contact & Support
Powered by GitBook
On this page
  1. LYPay
  2. API Documentation
  3. API reference
  4. Api
  5. V1
  6. Payments
  7. Funds transfers

Refund

PreviousFunds transfersNextConfirm

Initiate Funds Transfer Refund (M2P)

post

Initiates a refund for a funds transfer. The refund amount must be equal to or less than the original transaction amount.

Authorizations
Path parameters
UUIDstringRequired

Unique identifier of the original funds transfer transaction

Body
paymentReferencestringRequiredExample: 6645ef40eb9fe
transactionTimestampintegerRequiredExample: 1715859264
amountstringRequiredExample: 40000
descriptionstringOptionalExample: Text explaining the reason of this payment
Responses
200
Refund processed successfully
application/json
default
An error response object
application/json
post
POST /api/v1/payments/funds-transfers/{UUID}/refund HTTP/1.1
Host: 127.0.0.1:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "paymentReference": "6645ef40eb9fe",
  "transactionTimestamp": 1715859264,
  "amount": "40000",
  "description": "Text explaining the reason of this payment"
}
{
  "data": {
    "uuid": "3f9d6843-6329-4263-a465-7edc0f202c4e",
    "paymentReference": "d7c14ded-d0e1-4541-80c5-53fffa6e5e5",
    "status": {
      "name": "completed",
      "code": "01",
      "message": "SWITCH CODE + SWITCH MESSAGE"
    },
    "transactionDateTime": "2024-05-17T17:18:02+00:00",
    "transactionTimestamp": 1715966282,
    "valueDateTime": "2024-05-17T17:18:02+00:00",
    "transactionType": "P2P",
    "debtorAmount": {
      "currency": "lyd",
      "amount": "2000760",
      "fees": "10000"
    },
    "creditorAmount": {
      "currency": "lyd",
      "amount": "2000760",
      "fees": "100"
    },
    "debtorAccount": {
      "schemeName": "iban",
      "identification": "DE89370400440532013000",
      "name": "Ahmad"
    },
    "creditorAccount": {
      "schemeName": "iban",
      "identification": "DE89370400440532013001",
      "name": "Mohammed"
    },
    "creditorInstitution": {
      "name": "JBANK",
      "code": "01"
    },
    "additionalData": {},
    "numoNotice": {},
    "description": "Text explaining the reason of this payment"
  }
}