Prodinit Software Solutions
LinkedinGithub
  • Prodinit's Engineering Blog
  • aws
    • Ways to delete AWS ECR images
    • Enable Cloudwatch Alarm and SNS Topic for AWS Billing Alert
    • A-Z of AWS VPC and other services - with Terraform
    • How Internet Works?
    • How to download/view code running in your lambda functions?
  • backend engineering
    • What is idempotency?
  • databases
    • Database Optimisation - Indexing vs Sharding with Postgres and Django ORM examples
  • devops
    • Docker Best Practices
    • Docker Networking - Bridge vs Host vs Overlay
    • A comparision between multistage build and singlestage build in Docker
    • Things to remember before building your first blue/green deployment in Kubernetes
    • How to export env variables in circleci? (You wont find this in circleci documentation)
  • frontend engineering
    • Host your static website with s3, CloudFront, Route53, and domain from godaddy in 4 easy steps
  • product management
    • You'll fail as a lead developer, here's why ...
  • python
    • Achieve Peak Performance in Python
    • Play with List of dictionaries in Python
    • How we develop a custom autoscaling metrics based on number of tasks in the queues?
  • Contact Us
    • Who are we?
    • Work with us.
Powered by GitBook
On this page
  1. backend engineering

What is idempotency?

PreviousHow to download/view code running in your lambda functions?NextDatabase Optimisation - Indexing vs Sharding with Postgres and Django ORM examples

Last updated 1 year ago

You might ignore idempotency but not when you are a fintech. Dealing with payments and not building idempotent APIs could be a nightmare.

But, What are idempotent APIs? An idempotent API endpoint is one that can be called any number of times while guaranteeing that the operation will occur only once.

How to design an idempotent payment API?

  1. Generate an idempotent key at the server side.

  2. Send it along with the payment request.

  3. Validate it before starting the payment process.

  4. Refer to the flow diagram below.

Tags

Enjoyed the blog? If so, you'll appreciate collaborating with the minds behind it as well.

Written by -

Dishant Sethi