Integrating Bulkpe’s API for dynamic VPA creation is essential for businesses looking to streamline their payment collection processes. This guide will walk you through setting up your Bulkpe account, importing the Postman collection, and making API calls to create dynamic VPAs. Let’s get started!

Step 1: Setting Up Your Bulkpe Account

Before making API calls, ensure you have an active Bulkpe account. Follow these steps to get started:

  • Sign Up for Bulkpe: Visit the Bulkpe website and create an account if you don’t have one.
  • Access API Keys: Log in to your Bulkpe Dashboard, navigate to Settings -> Developer Controls, and copy your API key. This key is crucial for authenticating your API requests.

Step 2: Importing the Bulkpe Postman Collection

Postman is a tool that helps you test APIs. Bulkpe provides a Postman collection to simplify API requests setup. Here’s how to import and use it:

  • Import the Bulkpe Postman Collection: Click the link to open and fork Bulkpe’s Postman collection into your workspace: Bulkpe’s Postman collection.
  • Configure the Environment:
    • After importing, set up the environment variables in Postman.
    • Refer to the Authorization Docs for further details.
    • Go to the Environments tab in Postman.
    • Create or select an environment and set the following variable:
      • api_token: Paste your Bulkpe API token here.

Step 3: Create Dynamic VPA

To collect payments, you can use the Bulkpe API to create a dynamic UPI VPA, which can be converted into a QR code or UPI intent link. Here’s how:

  • API URL: https://api.bulkpe.in/client/createDynamicVpa
  • Method: POST
  • Authorization: Bearer Token (API key)
  • Request Body: Use the following JSON structure for creating a dynamic VPA:
{
    "reference_id": "test0007", 
    "amount": 1
    // "merchantId": "BPSUBVA0013" 
}

Response: A successful request will return a JSON response with the transaction details. Example:

{
    "status": true,
    "statusCode": 200,
    "data": {
        "transcation_id": "BPOD24242",
        "amount": 1,
        "reference_id": "test0007",
        "upi": "upi://pay?pa=2498294829424@yesbank&pn=Bulkpe&am=1&cu=INR&tn=",
        "status": "SUCCESS"
    },
    "message": ""
}

After receiving the response, you can use the string provided in the "upi" field of the body to generate a QR code or create a button that redirects to this link, facilitating easy payments.

Step 4: Making the API Request from Postman

To make the API request in Postman:

  • Select the POST method.
  • Enter the API URL: https://api.bulkpe.in/client/createDynamicVpa.
  • In the Headers tab, add:
    • Key: Authorization
    • Value: Bearer {Your API token}
  • In the Body tab, choose raw and JSON format. Paste the JSON body from Step 3.
  • Click Send to make the request and view the response.

Step 5: Handling Webhooks for Scale UPI Callback

Bulkpe will notify you of the status of collection and refund via webhooks. To configure webhooks:

  • Log in to Bulkpe Web App -> Settings -> Webhooks -> UPI.
  • Set up your Webhook (callback) URL to receive collection status notifications.

Sample Callback Response:

{
    "status": true,
    "statusCode": 200,
    "data": {
        "transcation_id": "TEBPTR0016",
        "reference_id": "sathyaTest-1706550855",
        "order_id": "TEBPOD0015",
        "account_number": "9378738535",
        "ifsc": "UTIB0CCH274",
        "upi": "sathya@ybl",
        "amount": 6,
        "payment_mode": "UPI",
        "payment_remark": "",
        "statusDescription": "Collected Successfully",
        "status": "SUCCESS",
        "utr": "242424242424",
        "holderName": "",
        "type": "Credit",
        "charge": 0,
        "gst": 0,
        "createdAt": "2024-01-29T17:54:41.849Z",
        "updatedAt": "2024-01-29T17:54:42.455Z"
    },
    "message": "",
    "event": "DYNAMIC_UPI_COLLECTION"
}

Conclusion

By following these steps, you can seamlessly integrate Bulkpe’s API for creating dynamic VPAs and handling payment collection effectively. Whether online or offline, Bulkpe’s API provides a robust solution for your payment needs.

If you have any questions or encounter issues, refer to the Bulkpe API documentation or contact their support team.

Sign up Now!
Author John Doe