The goal of checkout is to have Stripe Checkout for Shiny.
You can install checkout from github with:
# install.packages("devtools")
devtools::install_github("muschellij2/checkout")
This is a basic example which shows you how to solve a common problem:
# Define the UI
ui <- bootstrapPage(
checkoutInput(id = "shinytoken", publickey = "pk_test_6pRNASCoBOKtIshFeQd4XMUh"),
# an element for unformatted text
verbatimTextOutput("results")
)
# Define the server code
server <- function(input, output) {
output$results = renderPrint({
input$shinytoken
})
}
# Return a Shiny app object
shinyApp(ui = ui, server = server)