Integration Flow

  1. Payment Request
  • Functionality:Handles the submission of payments against invoices, crucial for closing the financial loop on transactions.

  • Flow: After an invoice is confirmed and due for payment, this API is used to process the payment, marking the invoice as paid.

  • Use the below endpoint to Payment Request.

    POST: https://api.zwitch.io/v1/bharat-connect/payment
    

Below is a sample request and response for the Payment Request API.

{
    "invoice": {
        "id": "bcinv_k3pbaALyh1CmzTPTOToHywYey"
    },
    "netPaidAmount": 4,
    "netAdjustmentAmount": 0,
    "totalAmount": 4,
    "paid_mode": "",
    "initiated_at":"",
    "metadata":""
}

{
    "id":"bcpa_k3pbaBewh1CmzTPTOToHywYey",
    "object":"bharat_connect.payment",
    "type":"OUTGOING",
    "invoice": {
        "id": "bcinv_k3pbaALyh1CmzTPTOToHywYey",
        "status":"PAYMENT INITIATED"
    },
    "netPaidAmount": 4,
    "netAdjustmentAmount": 0,
    "totalAmount": 4,
    "paid_mode": "",
    "initiated_at":"",
     "response":{
	    "status":"SUCCESS",
	    "message":""
    }
    "metadata":""
}

  1. Payment Confirmation Request
  • Functionality: Acknowledges the receipt of payment, confirming the transaction's completion from a financial standpoint.

  • Flow:This API is the final step in the billing process, securing the transaction trail by confirming payments, which is essential for both accounting and audit purposes.

  • Use the below endpoint of Payment Confirmation Request.

POST: https://api.zwitch.io/v1/bharat-connect/payment/acknowledge

Below is a sample request and response for the Payment Confirmation Request API.

{
    "invoice": {
        "id": "bcinv_k3pbaALyh1CmzTPTOToHywYey"
    },
    "supplier_action":"ACCEPT",
    "payment_type": "OFFPLATFORM"
    "remarks":"test"
    "metadata":"{}"
}


{
    "id":"bcre_k3pbaBewh1CmzTPTOToHywYey",
    "object":"bharat_connect.payment",
    "type":"INCOMING",
    "invoice": {
        "id": "bcinv_k3pbaALyh1CmzTPTOToHywYey",
        "status":"PAID"
    },
    "metadata":"",
    "supplier_action":"ACCEPT",
    "payment_type": "OFFPLATFORM"
    "remarks":"test"
    "response":{
	    "status":"SUCCESS",
	    "message":""
    }
}