Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7865257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:01:55+00:00 2026-06-03T00:01:55+00:00

What are best practices for doing multiple transactions with POST requests to the payment

  • 0

What are best practices for doing multiple transactions with POST requests to the payment gateway?

Our use case is:

  • We need to initiate one immediate payment, and schedule other for a later time (month, etc)
  • We want to avoid forcing the user to enter the same (CC/ACH) info twice
  • We want to avoid sensitive data ever touching our server, so looking into POSTing it directly to the payment gateway
  • We want to handle all the UI presented to the user (ie don’t want user to need to interact with payment gateway ui/forms/etc)
  • Most payment gateways we’ve seen aren’t flexible enough to do initial + schedule in one POST call (some of them can save the sensitive info and return a token with which we can do subsequent transactions, but most can’t, and we’d like to keep our options open)
  • We can rely on user having javascript enabled in the browser

What’s the best way to do this?

Our current plan is to:

  • make two ajax POST calls to the payment gateway (one for initial payment, other to set up scheduled payment)
  • wait for the gateway to redirect each of them to our sever, and record the succcess/failures
  • in the meantime, the form page polls the server to see whether both transactions finished/timed out, displays an error (and give the user chance to correct immediately in the form) if there was an error, or redirect to success page if both transactions succeeded

Is there a better way of doing it and/or are there problems with doing it like this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:01:56+00:00Added an answer on June 3, 2026 at 12:01 am

    Answering my own question in case someone else has the same dilemma:

    The solution we ended up doing is selecting a payment gateway which can store payment information about the user and return a reference ID to use for future payments.

    We did a normal single POST request to the service, which processed the first transaction and stored the info. After redirect back to our app, we created another transaction using the provided payment method reference ID.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Got a question regarding best practices for doing parallel web service calls, in a
What are the best practices for using use cases to model system behavior that
How do you create a read-only dependancy property? What are the best-practices for doing
Duplicate: Multiple javascript/css files: best practices? Hi guys, my application is almost done but
Does anyone have any suggestions/ best practices for doing master/ detail pages using the
Best practices or tools for installing a SQL Server database I have a SQL
What best practices have you used in unit testing embedded software that are peculiar
What are the best practices for creating exceptions? I just saw this, and I
What's the best practices way to test that a model is valid in rails?
Assuming that best practices have been followed when designing a new database, how does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.