Custom Sponsoring Link #20630
-
Hello all, It would be great if we could add custom links to the sponsor button. For example, when the "userx" clicks on the "heart" button of my "alifa98/example-repo/" repository, we redirect him/her to a custom web page "https://paymentCompany.xyz/exmaple-repo-of-ali.html," after payment we will call GitHub "add sponsor" API which adds the "userx" to the sponsor list of "alifa98/example-repo/". Another way of showing the sponsor list could be adding another button next to the heart button that links to this repo's custom sponsor list page; in this case, we do not need to call the "add sponsor" API. There are countries such as Iran that will never (at least in the next couple of years, because of sanctions) connect to the world payment networks (I don't know what the technical term is), so we can't support Iranian repositories properly and formally. Currently, we can't pay in another currency or use PayPal. Still, if GitHub develops this service and allows us to add links, we could support Iranian repositories with internal payment services without any problem. A drawback that comes to mind is fake payment pages for phishing attacks. But I think it will not be a problem for repositories that we want to support. we barely financially support unknown small repositories created just a few days ago. :) UPDATE: The custom link is available in the GitHub repositories, but there is no API or button for the list of sponsors. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi there! I'm a dev on the Sponsors team at GitHub. This is a good point, thank you! I'll open an issue internally to track exposing a repository's funding links via the API. For reference for anyone else reading this, https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository describes how to show a custom URL in the list when clicking the "Sponsor" button on your repository. |
Beta Was this translation helpful? Give feedback.
-
It looks like this is in the GraphQL API already! Try this query for example: query {
repository(name:"freeCodeCamp", owner:"freeCodeCamp") {
fundingLinks {
platform
url
}
}
} Try it here: https://docs.github.com/en/graphql/overview/explorer. See https://docs.github.com/en/graphql/reference/objects#repository for a reference. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
It looks like this is in the GraphQL API already! Try this query for example:
Try it here: https://docs.github.com/en/graphql/overview/explorer. See https://docs.github.com/en/graphql/reference/objects#repository for a reference.