Idempotency

If a request timeout error occurs when you call an API, you might attempt to resend the request. In this case, you can configure the specified idempotency fields in the request to help avoid unwanted duplication in case of failures and retries.    

An API call is idempotent if it has the same result no matter how many times the API call is applied. For example, idempotency can guarantee that the payment is charged only once if the same API payment call is retried multiple times in the case of a timeout error. You can retry the request via using the same idempotency field to guarantee that no more than one charge is created.

Idempotency fields

The following table lists the idempotency fields of specific OpenAPIs.  

Interface Name

Idempotency Field

Rule

paymentRequestId

This field is used for the idempotence control. For the payment requests which are initiated with the same 

paymentRequestId and reach a final status (S or F), the Mobile Payment Partner must return the unique result.

refundRequestId

This field is used for the idempotence control. For the refund requests which are initiated with the same 

refundRequestId and reach a final status (S or F), the Mobile Payment Partner must return the unique result.