Idempotency
Idempotency is a property where an action will result in the same outcome, regardless of how many times you run that action. In payments, idempotency is particularly important because it eliminates the risk of accidentally charging someone twice.
In order to prevent unintentional duplicate API requests, Moov includes an idempotency key (X-Idempotency-Key) in the header for the following endpoints:
POSTCreate transferPOSTRefund transferPOSTCancel or refund a card transfer
You are responsible for generating an idempotency key and setting it in the transfer header. An idempotency key should be deterministic, producing the exact same key each time. An idempotency key can be a unique ID from your system up to 36 characters, or a UUID comprised of unique identifiers for the action. Moov supports UUID v5. An idempotency key will not expire.
Moov will flag any transfer with the same idempotency key as a duplicate. If you try to create a transfer with the same idempotency key twice, your second attempt will result in a 409 error response indicating that a transfer was previously created with that idempotency key.