Contents

completePayment

Completes the payment authorization with a result.

Declaration

undefined completePayment();

Parameters

Mentioned in

Discussion

This method must be called by onpaymentauthorized.

Use status values of STATUS_SUCCESS or STATUS_FAILURE only. You should pass in STATUS_FAILURE along with the errors.

completePayment in Apple Pay JS API version 1 and 2

The parameter for completePayment in versions 1 and 2 is the following:

status

The status of the payment, whether it succeeded or failed. See Apple Pay Status Codes.

The Apple Pay payment sheet is dismissed when this method is called with a status value of STATUS_SUCCESS or STATUS_FAILURE. Other status values display an error on the payment sheet to prompt the user to update the information and authenticate again.

See Also

Related Documentation

Handling payment authorization