Managing payouts efficiently is crucial for any business handling financial transactions. Whether you’re disbursing salaries, making vendor payments, or issuing refunds, Bulkpe provides a robust API for managing these transactions seamlessly. In this guide, we’ll walk you through how to integrate Bulkpe’s payout API, including how to authorize your requests and initiate payouts using Postman with the provided collection.
Step 1: Setting Up Your Bulkpe Account
Before you can start making API calls, ensure you have an active Bulkpe account. Here’s how to get started:
- Sign Up for Bulkpe: Go to the Bulkpe website and create an account if you haven’t already.
- Access API Keys: Log in to your Bulkpe Dashboard, navigate to Settings -> Developer Controls, and copy your API key from the API Key section. This key is crucial for authenticating your API requests.
Step 2: Importing the Bulkpe Postman Collection
Postman is a popular tool for testing APIs. Bulkpe has provided a convenient Postman collection that simplifies the process of setting up and sending API requests. Here’s how to use it to initiate a payout:
- Import the Bulkpe Postman Collection: Click on the following link to open the Bulkpe Postman collection: Bulkpe’s Postman collection. This link will open Postman and allow you to fork (copy) the collection into your workspace.
-
Configure the Environment:
- After importing the collection, you need to set up the environment variables.
- Refer the Authorization Docs for futher information
- Go to the Environments tab in Postman.
-
Add a new environment or select an existing one, and set the
following variable:
- api_token: Paste your Bulkpe API token here.
Step 3: Understanding the Payout API
Bulkpe’s Payout API allows you to transfer funds from your Bulkpe Virtual Account to a beneficiary’s bank account or UPI VPA. Here’s a breakdown of the API endpoint you’ll be using:
-
API URL:
https://api.bulkpe.in/client/initiatepayout
- Method: POST
- Authentication: Bearer Token (API key)
- Request Body: Here’s the JSON structure for initiating a payout:
{ "amount": 1, "account_number": "77220101845051", "payment_mode": "UPI", "reference_id": "Sathya-test6", "transcation_note": "Refund03", "beneficiaryName": "Sathya Narayanan", "ifsc": "FDRL0007777", "upi": "aintworried@axl" }
Response: A successful request will return a JSON response with the transaction details. Here’s an example:
{ "status": true, "statusCode": 200, "data": { "beneCode": "APIBENEF453", "beneName": "Sathya Narayanan", "beneAccNum": "77220101845051", "beneIfscCode": "FDRL0007777", "beneAcType": 10, "transcation_id": "TRAREF00034637453", "reference_id": "Internal1718712497", "amount": 1, "payment_remark": "From Pied Piper using Bulkpe - Refund03", "payment_mode": "IMPS", "status": "PENDING", "message": "Transaction Initiated!" }, "message": "Transaction Processing" }
Step 4: Making a Payout Request with Postman
Here’s how to use Postman to initiate a payout:
-
Initiate the Payout Request:
- In the imported Bulkpe collection, find the Initiate Payout request under the Payouts folder.
- Click on the request to open it.
-
Set Up the Request Body: Go to the Body tab in
the request. The body is pre-configured with placeholders.
Replace these placeholders with actual values based on your
payout requirements. Here’s a sample JSON you can use:
{ "amount": 1, "account_number": "77220101845051", "payment_mode": "UPI", "reference_id": "Sathya-test6", "transcation_note": "Refund03", "beneficiaryName": "Sathya Narayanan", "ifsc": "FDRL0007777", "upi": "aintworried@axl" }
-
Add Authorization Header Manually: Go to the
Headers tab within the Initiate Payout request.
Ensure you manually add the Authorization header:
- Key: Authorization
- Value: Bearer {{api_token}}
- Send the Request: Click on the Send button to initiate the payout request. You should see a response in the Postman console, detailing the transaction status.
Sample API Call
curl --location 'https://api.bulkpe.in/client/initiatepayout' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_API_TOKEN' \ --data-raw '{ "amount": 1, "payment_mode": "UPI", "reference_id": "Internal1714458729", "transcation_note": "Payment", "upi": "rich@ybl", "beneficiaryName": "Richard" }'
Remember to replace YOUR_API_TOKEN with your actual API token from the Bulkpe dashboard.
Common Errors and Troubleshooting
- Getting "You Don't Have Access" response? Ensure you are passing the bearer token correctly in the headers.
- Getting IP blacklisted? If you encounter the error message "Your IP is blocked, please contact [email protected]", it means your IP address has been blocked due to too many bad requests. To resolve this, contact support with your IP address.
That’s it! You’ve successfully integrated Bulkpe’s Payout API and initiated your first payout. For more advanced features and troubleshooting, refer to the Bulkpe API documentation.
If you have any questions or run into issues, feel free to reach out to the Bulkpe support team for assistance.
Sign up Now!