Skip to content

v1.5.0

Choose a tag to compare

@payware payware released this 14 Oct 18:09
· 2 commits to main since this release

Optional Idempotency-Key on the create and process tools.

payware's API now accepts an optional Idempotency-Key header on the calls that create a payment. A retry with the same key and the same body, within 24 hours, returns the payment the first call created instead of creating a second one.

  • payware_operations_create_transaction and payware_operations_process_transaction take an optional idempotencyKey for every role (merchant, ISV, payment institution) and send it as the header only when given.
  • The result reports replayed: true when the server answered from the first call.
  • The same key with a different body is refused with 422 ERR_IDEMPOTENCY_KEY_REUSED; a retry while the first call is still running gets 409 ERR_IDEMPOTENCY_KEY_IN_PROGRESS.
  • Process, finalize and cancel error notes now list ERR_TRANSACTION_EXPIRED (404), which payware answers for a transaction whose time to live has run out, instead of ERR_MISSING_TRANSACTION.

Documentation: Retrying requests.