Skip to content

Add Transfer Export endpoint#120

Merged
tolu-paystack merged 1 commit intoPaystackOSS:mainfrom
tolu-paystack:docs/add-transfer-export
Feb 5, 2026
Merged

Add Transfer Export endpoint#120
tolu-paystack merged 1 commit intoPaystackOSS:mainfrom
tolu-paystack:docs/add-transfer-export

Conversation

@tolu-paystack
Copy link
Copy Markdown
Contributor

Adds code snippets for the export transfers endpoint

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds code snippets for the Transfer Export API endpoint, providing examples in shell, JavaScript (Node.js), and PHP. The implementation follows established patterns in the codebase for export endpoints.

Changes:

  • Added code examples for the /transfer/export GET endpoint in three languages (shell, JavaScript, PHP)
  • Included sample response JSON showing the export file path structure
  • Created both source files and distribution files with embedded code snippets

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/api/transfers/export/response.json Sample JSON response showing successful export with CSV file path
src/api/transfers/export/index.sh Shell script example using curl to call the export endpoint
src/api/transfers/export/index.php PHP example using cURL to call the export endpoint
src/api/transfers/export/index.js Node.js example using the https module to call the export endpoint
src/api/transfers/export/config.yml Configuration file specifying the three supported languages
dist/api/transfers/export/response.json Distribution copy of the sample response JSON
dist/api/transfers/export/requests.js JavaScript module exporting the code snippets as template strings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +13 to +25
https.request(options, res => {
let data = ''

res.on('data', (chunk) => {
data += chunk
});

res.on('end', () => {
console.log(JSON.parse(data))
})
}).on('error', error => {
console.error(error)
})
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The https.request() call is missing a required .end() call to actually send the request. Without calling .end(), the request will not be sent to the server. The request should be assigned to a variable (e.g., const req) and then req.end() should be called after the error handler is attached. Note that this same issue exists in several other GET endpoints in the codebase (e.g., src/api/transfers/list/index.js, src/api/transfers/verify/index.js, src/api/transactions/export/index.js), but it should still be fixed.

Copilot uses AI. Check for mistakes.
@tolu-paystack tolu-paystack merged commit 8b9b330 into PaystackOSS:main Feb 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants