Yes, our idempotency key feature can help you to prevent sending double requests. This can be implemented in your API integration and the full documentation can be seen here: https://docs.flip.id/#idempotent-request
The following narrative is the example of the incorrect implementation of idempotency key:
- Flip for Business user sends disbursement request to Flip with idempotency key
- Flip return with error (any status other than PENDING, DONE, or CANCELLED, for example: 500 Internal Server Error).
- Flip for Business user retry the disbursement request to Flip, with different idempotency key
- Flip processes both requests, because we see them as different request (different idempotency key)
In order to prevent that, you need to implement the same idempotency key request if you need to retry a disbursement. Example of the right usage of idempotency key is as follows:
- Flip for Business users send disbursement request to Flip with idempotency key
- Flip responds with status that is not PENDING (for example: 500 Internal Server Error)
- Flip for Business users can respond with retrying their transaction using identical idempotency key used by previous transaction until Flip responds with PENDING/CANCELLED/DONE status
In short, if Flip responds with status that is not PENDING/CANCELLED/DONE, please retry using identical idempotency key. If there are multiple requests with different idempotency keys, we will consider it as different transactions.
With this explanation, we highly recommend you & will require your company (per October 6, 2020) to implement idempotency key in your requests and save the idempotency key in your system, so that it can be re-used to retry transactions.
Artikel ditutup - tidak bisa memberikan komentar.