For example, a 3 call transaction might look like:
- Add a card
- Run an authorization retaining on success
- Run a capture
If this is a repeat/recurring transaction, it could be as simple as running a purchase, and thus be only one API call.
As always, if you have any questions about our pricing or would like to speak with someone about the best practices for optimizing your technical flow, write to us at success@spreedly.com, and we’ll be happy to help!
Are test transactions free?
Under API pricing, paid Spreedly subscribers will pay for all API calls used for test transactions as well as production transactions. For load testing, we recommend simulating the load rather than using the Spreedly test gateway for load testing. Or maintaining a separate trial account post-subscription. For more information, you can visit our documentation on testing.
How can I make my API calls more efficiently?
Each API request can take 100-400 milliseconds - that’s without considering gateway latency, which can be as high as 60 seconds. Reducing the number of API calls made in the transaction process could shave seconds or even minutes off of your customers’ checkout experience, creating a more efficient (and cost-effective) workflow.
Over the last year, we looked at the most common ways users interact with our API, and compiled some tips to help reduce the number of API calls made to Spreedly and streamline your workflow:
- Log important metadata details server-side in case you need to access them later. Repeatedly calling the list and show API calls for reconciliation can be avoided by systematically logging transaction responses when they are first performed. When you create a payment method or perform a transaction, Spreedly returns information in the response body that includes data like the card brand, first six and last four digits of the card, customer name, address and more. If you need that data, it is more effective to log it at the time of the corresponding transaction response than to make separate API calls every time it is needed.
- Use the retain_on_success flag to store payment methods. Performing an authorize, capture, verify, or another transaction call with this flag turned on will store the card in one API call, whereas making a separate call just to retain a card will be counted as an additional API call. This also bypasses the need to use the `add payment method` call.
- If your flow uses Authorize + Capture, consider trying a single-transaction flow like a Purchase call. Businesses that ship physical goods may want a confirmed successful authorize to ship a product. However, other users may benefit from trimming down the transaction process and reducing the number of API calls made.
- Make sure you aren’t creating a new gateway before every transaction. Gateways only need to be created once, and you can reference the already-created gateway token in the future to make a purchase.
- Turn off AVS requirements at your gateway, if applicable. You’ll eliminate the need to update a user’s entire payment method record in order to make successful transactions, just because their address associated with the card changes. You may want to discuss this approach with your gateway first, as passing an incorrect address could affect your transaction success rate.
- Send API calls to Spreedly in proper JSON/XML formatting. Every day, we see thousands of authenticated API calls passing through Spreedly that aren’t formatted with JSON or XML. Be sure that you’re adhering to conventions when you’re interacting with the API.
- Increase your pagination limit when using the List call. When you use the list call, the default number of records displayed is 20. If you’re planning to paginate through many results, set the number of records returned to the maximum (100) as each pagination call will count as a billable API call.
- Use Spreedly’s debugging UI in your Dashboard to pull transaction transcripts and response bodies for troubleshooting. Your Dashboard provides the resources you need to debug your transaction and reach out to your gateway/Spreedly to address any problems.
- Keep track of automated testing scripts running in the background. Test transactions on paid Spreedly accounts will count as a billable API call, so take inventory of any testing you’re currently performing in order to reduce the number of test transactions counting towards your monthly bill. Check out our documentation for testing for more advice.
- Enable number formatting on iFrame or Express. Number formatting prevents your users from entering numbers that have more/fewer digits than expected for their card type. It can be helpful in ensuring that you’re only storing or attempting transactions with valid card data.
- Secure your access secrets by never sharing them through unsecured channels like unencrypted e-mails or chats. By protecting the security of your Spreedly account, you can take control over how many API calls are being made through your organization.
- Stay informed on Spreedly uptime by subscribing to updates on our StatusPage or ping core.spreedly.com with an unauthenticated request. With status.spreedly.com, you can receive e-mail, text, Twitter, and Atom/RSS notifications if there is an incident with Spreedly. Our StatusPage updates also populate to our Support Twitter, and you can turn on notifications to be alerted of any activity from us there. You can also ping our core API at core.spreedly.com with an unauthenticated call such as the list supported gateways call and track whether or not Spreedly provides a response.
NOTE: If you are an existing customer not on API-based pricing reach out to your Customer Success Manager or reach out to success@spreedly.com.