---
title: Manage Payments Using Saved Wallet
url: amazon-pay-paymentmethodonfile-setupintent/manage-payments-using-payment-method-on-file.html
---

**[Step 4 of 8]** After the buyer has successfully completed setup of Saved Wallet, the <a href="../amazon-pay-paymentmethodonfile/checkout-session.md#complete-checkout-session" target="_blank" rel="noopener noreferrer">Complete Checkout Session</a> response will include a `ChargePermissionId` for a Saved Wallet Charge Permission object that you can use to charge the buyer and manage cancellations.

At the end of this step, you will be able to charge the buyer and manage cancellations.

* TOC
{:toc}
{::options toc_levels="3" /}

***

### 1. Managing charges and handling declines

Call <a href="../amazon-pay-paymentmethodonfile/charge.md#create-charge" target="_blank" rel="noopener noreferrer">Create Charge</a> each time you need to charge the customer. Set `CaptureNow` to true to capture payment immediately, set it to false to capture later. Note that Amazon Pay limits how much you can charge the buyer for each calendar month, see <a href="../amazon-pay-checkout/monthly-paymentmethodonfile-charge-limits.md" target="_blank" rel="noopener noreferrer">monthly Saved Wallet charge limits</a> for more info.

If <a href="../amazon-pay-paymentmethodonfile/charge.md#create-charge" target="_blank" rel="noopener noreferrer">Create Charge</a> returns a 201 response, authorization was either successfully completed or successfully initiated depending on whether `canHandlePendingAuthorization` was set to true. If <a href="../amazon-pay-paymentmethodonfile/charge.md#create-charge" target="_blank" rel="noopener noreferrer">Create Charge</a> returns a different HTTP status code, check the request response `reasonCode` to determine if you should retry <a href="../amazon-pay-paymentmethodonfile/charge.md#create-charge" target="_blank" rel="noopener noreferrer">Create Charge</a> or ask your buyer to use a different payment method.

#### Request

```
curl "https://pay-api.amazon.com/:version/charges/" \
-X POST
-H "authorization:Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE"
-H "x-amz-pay-date:20201012T235046Z"
-H "x-amz-pay-idempotency-key:AVLo5tI10BHgEk2jEXAMPLEKEY"
-d @request_body
```

#### Request body

```
{
    "chargePermissionId": "P21-1111111-1111111",
    "chargeAmount": {
        "amount": "14.00",
        "currencyCode": "USD"
    },
    "chargeInitiator":"CITU",
    "channel":"Web",
    "captureNow": true, // default is false
    "softDescriptor": "Descriptor",
    "canHandlePendingAuthorization": false //default is false
}
```


#### Request parameters

<table width="100%" border="1">
    <tbody>
        <tr id='OLS9CAejjWl'>
            <td id='s:OLS9CAejjWl;OLS9CAhZC2S' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Name
                <br /></td>
            <td id='s:OLS9CAejjWl;OLS9CAkcqjC' style='vertical-align: top; font-weight: bold; width: 20%;' class='bold'>Location
                <br /></td>
            <td id='s:OLS9CAejjWl;OLS9CAs0lqL' style='vertical-align: top; font-weight: bold; width: 50%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='OLS9CA77dB4'>
            <td id='s:OLS9CA77dB4;OLS9CAOL3El' style='vertical-align: top;'>x-amz-pay-idempotency-key<br><b>(required)</b><br><br>Type: string
                <br /></td>
            <td id='s:OLS9CA77dB4;OLS9CAJIYUN' style='vertical-align: top;'>Header
                <br /></td>
            <td id='s:OLS9CA77dB4;OLS9CAr63HH' style='vertical-align: top;'><a target="_blank" rel="noopener noreferrer" href="../amazon-pay-api-v2/idempotency.md">Idempotency key</a> to safely retry requests
                <br /></td>
        </tr>
        <tr id='OLS9CA74jkX'>
            <td id='s:OLS9CA74jkX;OLS9CAOL3El' style='vertical-align: top;'>chargePermissionId<br><b>(required)</b><br><br>Type: string
                <br /></td>
            <td id='s:OLS9CA74jkX;OLS9CAJIYUN' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:OLS9CA74jkX;OLS9CAr63HH' style='vertical-align: top;'>Charge Permission identifier
                <br /></td>
        </tr>
        <tr id='OLS9CAbQJii'>
            <td id='s:OLS9CAbQJii;OLS9CAOL3El' style='vertical-align: top;'>chargeAmount<br><b>(required)</b><br><br>Type: <a target="_blank" rel="noopener noreferrer" href="../amazon-pay-paymentmethodonfile/charge.md#type-price">price</a>
                <br /></td>
            <td id='s:OLS9CAbQJii;OLS9CAJIYUN' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:OLS9CAbQJii;OLS9CAr63HH' style='vertical-align: top;'>Transaction amount
                <br /></td>
        </tr>
        <tr id='OLS9CAoRCbH'>
            <td id='s:OLS9CAoRCbH;OLS9CAOL3El' style='vertical-align: top;'>captureNow<br><br>Type: boolean
                <br /></td>
            <td id='s:OLS9CAoRCbH;OLS9CAJIYUN' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:OLS9CAoRCbH;OLS9CAr63HH' style='vertical-align: top;'>Boolean that indicates whether or not Charge should be captured immediately after a successful authorization<br><br>Default: false
                <br /></td>
        </tr>
        <tr id='OLS9CATXn9U'>
            <td id='s:OLS9CATXn9U;OLS9CAOL3El' style='vertical-align: top;'>softDescriptor<br><br>Type: string
                <br /></td>
            <td id='s:OLS9CATXn9U;OLS9CAJIYUN' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:OLS9CATXn9U;OLS9CAr63HH' style='vertical-align: top;'>Description shown on the buyer payment instrument statement. You can only use this parameter if <code>CaptureNow</code> is set to true<br><br>Do not store sensitive data about the buyer or the transaction in this field. Sensitive data includes, but is not limited to: government-issued identification, bank account numbers, or credit card numbers<br><br>The soft descriptor sent to the payment processor is: "AMZ* &lt;soft descriptor specified here&gt;"<br><br>Default: "AMZ*&lt;SELLER_NAME&gt; pay.amazon.com"<br>Max length: 16 characters
                <br /></td>
        </tr>
        <tr id='OLS9CAUIIUV'>
            <td id='s:OLS9CAUIIUV;OLS9CAOL3El' style='vertical-align: top;'>canHandlePendingAuthorization<br><br>Type: boolean
                <br /></td>
            <td id='s:OLS9CAUIIUV;OLS9CAJIYUN' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:OLS9CAUIIUV;OLS9CAr63HH' style='vertical-align: top;'>Boolean that indicates whether or not merchant can handle pending response<br><br>If set to false, you will receive a response within a maximum of 15 seconds in US, EU, and UK regions or 30 seconds in JP region. If set to true, Amazon Pay will process the authorization asynchronously and you will receive a response within 24 hours. See <a href="../amazon-pay-checkout/asynchronous-processing.md" target="_blank" rel="noopener noreferrer">asynchronous processing</a> for more info
                <br /></td>
        </tr>
        <tr id=''>
            <td id='' style='vertical-align: top;'>merchantMetadata<br><br>Type: <a href="../amazon-pay-paymentmethodonfile/charge.md#type-merchantmetadata" target="_blank" rel="noopener noreferrer">merchantMetadata</a>
                <br /></td>
            <td id='' style='vertical-align: top;'>Body
                <br /></td>
            <td id='' style='vertical-align: top;'>Merchant-provided order details
                <br /></td>
        </tr>
         <tr id=''>
            <td id='' style='vertical-align: top;'>providerMetadata<br><br>Type: <a href="../amazon-pay-paymentmethodonfile/charge.md#type-providermetadata" target="_blank" rel="noopener noreferrer">providerMetadata</a>
                <br /></td>
            <td id='' style='vertical-align: top;'>Body
                <br /></td>
            <td id='' style='vertical-align: top;'>Payment service provider (PSP)-provided order details<br><br>Only PSPs should use these fields
                <br /></td>
        </tr>
        <tr id=''>
            <td id='' style='vertical-align: top;'>chargeInitiator<br /><br />Type: string
                <br /></td>
            <td id='' style='vertical-align: top;'>Body
                <br /></td>
            <td id='' style='vertical-align: top;'>Represents who initiated the charge.
                <br><br>Supported values: 'CITU', 'MITU', 'CITR', 'MITR'
                <br><br><b>CITU</b>: A <b>customer-initiated unscheduled</b> transaction is a transaction where the customer is present and provides their payment credentials. This can be through a terminal in-store, or online through a checkout experience. The customer-initiated transaction is the proof that the customer and merchant entered into a relationship and that the payment credential presented was in fact a validly presented payment instrument.
                <br><br><b>MITU</b>: A <b>merchant-initiated unscheduled</b> transaction is a transaction where the customer is <b>not</b> present and is conducted without any additional cardholder validation. In all cases, a merchant-initiated transaction must refer to a customer’s original interaction where a customer and merchant have entered into an agreement for a recurring product or service or an automated billing or unscheduled transactions etc.                
                <br><br>There are many different kinds of merchant-initiated transactions. Examples include:
                <ul>
                <li>Delayed Charges Transaction</li>
                <li>Incremental Authorization Transaction</li>
                <li>No Show Transaction</li>
                <li>Unscheduled Stored Credential Transaction</li>
                <li>Other Credential on File Transactions</li>
                </ul>
                <b>CITR</b>: A customer-initiated transaction representing the <b>first in a series</b> of recurring transactions. Use this if the customer will be charged upon signing up for a subscription in your own checkout experience (i.e., the buyer already has Saved Wallet set up)
                <br><br><b>MITR</b>: A merchant-initiated transaction for a recurring transaction. Use this for all subsequent recurring charges, regardless of how the first recurring charge was initiated.
                <br /></td>
        </tr>
        <tr id=''>
            <td id='' style='vertical-align: top;'>channel<br /><br />Type: string
                <br /></td>
            <td id='' style='vertical-align: top;'>Body
                <br /></td>
            <td id='' style='vertical-align: top;'>Represents the channel of the charge.
                <br><br>Supported values: 'Web', 'Phone', 'App', 'Alexa', 'PointOfSale', 'Firetv', 'Offline'
                <br><br>When to use these channels:
                <ol>
                <li>Web: Desktop or mobile browser</li>
                <li>Phone: Over phone call</li>
                <li>App: Mobile app</li>
                <li>Alexa: Alexa SDK</li>
                <li>Firetv: Fire TV</li>
                <li>Offline: Buyer not present</li>
                </ol>
                <br /></td>
        </tr>
        <tr id='OLS9CA74jkX'>
            <td id='s:OLS9CA74jkX;OLS9CAOL3El' style='vertical-align: top;'>checkoutResultReturnUrl<br><br>Type: string
                <br /></td>
            <td id='s:OLS9CA74jkX;OLS9CAJIYUN' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:OLS9CA74jkX;OLS9CAr63HH' style='vertical-align: top;'>Checkout result URL provided by the merchant. Amazon Pay will redirect to this URL after completing the transaction.<br><br>The parameter is <b>required</b> in case you need to handle charge when MFA challenge is required to be completed by buyer (for EU and UK merchants only)<br><br>Note: In the Live environment, URLs must use HTTPS protocol. In Sandbox environment, you don't need a SSL certificate and can use the HTTP protocol if you're testing on localhost (http://localhost)<br><br>Max length: 1024 characters/bytes
                <br /></td>
        </tr>
    </tbody>
</table>

#### Response

```
{
     "chargeId": "P21-1111111-1111111-C111111",
     "chargePermissionId": "P21-1111111-1111111",
     "chargeInitiator":"CITU",
     "channel":"Web",
     "chargeAmount": {
         "amount": "14.00",
         "currencyCode": "USD"
     },
     "captureAmount": {
         "amount": "14.00",
         "currencyCode": "USD"
     },
     "refundedAmount": {
         "amount": "0.00",
         "currencyCode": "USD"
     },
     "convertedAmount": "14.00",
     "conversionRate": "1.00",
     "softDescriptor": "Descriptor",
     "merchantMetadata": null,
     "providerMetadata": {
         "providerReferenceId": null
     },
     "statusDetails":{
         "state": "Captured",
         "reasonCode": null,
         "reasonDescription": null,
         "lastUpdatedTimestamp": "20190714T155300Z"
     },
     "creationTimestamp": "20190714T155300Z",
     "expirationTimestamp": "20190715T155300Z",
     "releaseEnvironment": "Sandbox"
}
```

Amazon Pay provides a decline handling flow that enables you to handle failed charges initiated via Create Charge API call while the buyer is present. Buyers can retry the transaction up to two times in order by selecting a valid payment method.

If you are a registered merchant in the EU/UK/NA region with the chargeInitiator set as `MITU` or `MITR`, or a registered merchant in the JP regions with any chargeInitiator value, and the Create Charge API returns a 4XX response, follow these steps based on the reason code received:

* If `reasonCode` is SoftDeclined or ProcessingFailure:
  1. Call <a href="../amazon-pay-paymentmethodonfile/charge-permission.md#get-charge-permission" target="_blank" rel="noopener noreferrer">Get Charge Permission</a> to confirm that the Charge Permission is in a Chargeable state
  2. Call <a href="../amazon-pay-paymentmethodonfile/charge.md#create-charge" target="_blank" rel="noopener noreferrer">Create Charge</a> to charge the buyer
* If `reasonCode` is HardDeclined, ask the buyer to update their payment instrument using the following link: https://payments.amazon.com/jr/your-account/ba/{ChargePermissionId}. Replace {ChargePermissionId} with the buyer's Charge Permission Id. <a href="../amazon-pay-paymentmethodonfile/set-up-instant-payment-notifications.md" target="_blank" rel="noopener noreferrer">Set up IPNs</a> to receive a notification once the payment instrument has been updated and then:
  1. Call <a href="../amazon-pay-paymentmethodonfile/charge-permission.md#get-charge-permission" target="_blank" rel="noopener noreferrer">Get Charge Permission</a> to confirm that the Charge Permission is in a Chargeable state
  2. Call <a href="../amazon-pay-paymentmethodonfile/charge.md#create-charge" target="_blank" rel="noopener noreferrer">Create Charge</a> to charge the buyer

For any other reasonCodes or non-4XX HttpStatusCodes, please review the <a href="../amazon-pay-paymentmethodonfile/charge.md#error-codes" target="_blank" rel="noopener noreferrer"> CreateCharge error code</a> to determine if you should retry the Create Charge API call or ask your buyer to use a different payment method.

If you are a registered merchant in the EU/UK/NA region with the chargeInitiator as `CITU` or `CITR`, and the Create Charge API returns a 4XX response with the amazonPayRedirectUrl and any of the reasonCodes: SoftDeclined, HardDeclined, PaymentMethodNotAllowed, or MFANotCompleted, redirect the buyer to the provided amazonPayRedirectUrl to finalize the charge.

For buyers with EU-issued payment instruments subject to PSD2 regulation, Amazon Pay will first present a Multi-Factor Authentication (MFA) challenge to the buyer.

Amazon Pay will render the decline handling page to the buyer to retry the transaction with the different payment method.

#### Request

```
curl "https://pay-api.amazon.com/:version/charges/" \
-X POST
-H "authorization:Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE"
-H "x-amz-pay-date:20201012T235046Z"
-H "x-amz-pay-idempotency-key:AVLo5tI10BHgEk2jEXAMPLEKEY"
-d @request_body
```

#### Request body

```
{
    "chargePermissionId": "P21-1111111-1111111",
    "chargeAmount": {
        "amount": "14.00",
        "currencyCode": "USD"
    },
    "chargeInitiator":"CITU",
    "channel":"Web",
    "captureNow": true, // default is false
    "softDescriptor": "Descriptor",
    "canHandlePendingAuthorization": false //default is false
    "webCheckoutDetails": {
        "checkoutResultReturnUrl": "URL"
    }
}
```


#### Response

```
{
  "reasonCode": "SoftDeclined",
  "message": "Charge was soft declined. Retry attempts may or may not by succesful. If repeated retry attempts are unsuccessful, please contact the buyer and have them choose a different payment method.",
  "webCheckoutDetails": {
    "checkoutResultReturnUrl": "URL",
    "amazonPayRedirectUrl": "https:payments.amazon.co.uk/checkoutprocessing?chargeId=P02-1111111-1111111-C111111&declineAction=retryCharge"
  }
}
```
Use <a href="../amazon-pay-paymentmethodonfile/checkout-session.md#complete-checkout-session" target="_blank" rel="noopener noreferrer">Complete Checkout Session</a> to confirm that the buyer has successfully returned to your site.

**Notes**: Amazon Pay will not finalize the Charge request until you confirm with Complete Checkout Session. If the request is not sent within 24 hours the payment authorization will be cancelled.

**Successful response:**

<a href="../amazon-pay-paymentmethodonfile/checkout-session.md#complete-checkout-session" target="_blank" rel="noopener noreferrer">Complete Checkout Session</a> will return a success response if the charge was processed successfully.

**Error response:**

<a href="../amazon-pay-paymentmethodonfile/checkout-session.md#complete-checkout-session" target="_blank" rel="noopener noreferrer">Complete Checkout Session</a> will return an error response for failed transactions. The buyer either canceled checkout or was unable to provide a valid payment instrument. You should:

1. Redirect the buyer to the start of checkout
2. Display a message such as: "Your payment was not successful. Please try another payment method."

#### Handling charge when MFA Challenge is required to be completed by buyer (for EU,UK and NA merchants only)

When `chargeInitiator` is CITU or CITR, buyers might be required to authenticate their payment methods (like Strong Customer Authentication as part of PSD2 regulation in Europe), <a href="../amazon-pay-paymentmethodonfile/charge.md#create-charge" target="_blank" rel="noopener noreferrer">Create Charge</a> will return a 202 response. Amazon Pay will move the charge to ActionRequired with reasonCode as BuyerActionRequired . To finalize the charge you need to 

1. Redirect the buyer to amazonPayRedirectUrl provided as part of charge. Amazon Pay will render the MFA challenge page for the buyer.
2. Use <a href="../amazon-pay-paymentmethodonfile/checkout-session.md#complete-checkout-session" target="_blank" rel="noopener noreferrer">Complete Checkout Session</a> to confirm that the buyer has successfully returned to your site.

#### Request

```
curl "https://pay-api.amazon.com/:version/charges/" \
-X POST
-H "authorization:Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE"
-H "x-amz-pay-date:20201012T235046Z"
-H "x-amz-pay-idempotency-key:AVLo5tI10BHgEk2jEXAMPLEKEY"
-d @request_body
```

#### Request body

```
{
    "chargePermissionId": "P21-1111111-1111111",
    "chargeAmount": {
        "amount": "14.00",
        "currencyCode": "USD"
    },
    "chargeInitiator":"CITU",
    "channel":"Web",
    "captureNow": true, // default is false
    "softDescriptor": "Descriptor",
    "canHandlePendingAuthorization": false //default is false
    "webCheckoutDetails": {
        "checkoutResultReturnUrl": "URL"
    }
}
```


#### Response

```
{
     "chargeId": "P21-1111111-1111111-C111111",
     "chargePermissionId": "P21-1111111-1111111",
     "chargeInitiator":"CITU",
     "channel":"Web",
     "chargeAmount": {
         "amount": "14.00",
         "currencyCode": "USD"
     },
     "captureAmount": {
         "amount": "14.00",
         "currencyCode": "USD"
     },
     "refundedAmount": {
         "amount": "0.00",
         "currencyCode": "USD"
     },
     "convertedAmount": "14.00",
     "conversionRate": "1.00",
     "softDescriptor": "Descriptor",
     "merchantMetadata": null,
     "providerMetadata": {
         "providerReferenceId": null
     },
     "statusDetails":{
         "state": "ActionRequired",
         "reasonCode": "BuyerActionRequired",
         "reasonDescription": "Charge requires buyer action to proceed.",
         "lastUpdatedTimestamp": "20190714T155300Z"
     },
     "webCheckoutDetails": {
        "checkoutResultReturnUrl": "URL",
        "amazonPayRedirectUrl": "URL" // post-order URL to complete MFA
     }
     "creationTimestamp": "20190714T155300Z",
     "expirationTimestamp": "20190715T155300Z",
     "releaseEnvironment": "Sandbox"
}
```

The buyer is redirected to checkoutResultReturnUrl after the MFA challenge has been solved and Amazon Pay processed the transaction. The Amazon Pay checkout session ID will be included as a query parameter. 

Use <a href="../amazon-pay-paymentmethodonfile/checkout-session.md#complete-checkout-session" target="_blank" rel="noopener noreferrer">Complete Checkout Session</a> to confirm that the buyer has successfully returned to your site.

**Notes**: Amazon Pay will not finalize the Charge request until you confirm with Complete Checkout Session. If the request is not sent within 24 hours the payment authorization will be cancelled.

**Successful response:**

<a href="../amazon-pay-paymentmethodonfile/checkout-session.md#complete-checkout-session" target="_blank" rel="noopener noreferrer">Complete Checkout Session</a> will return a success response if the charge was processed successfully. 

**Error response:**

<a href="../amazon-pay-paymentmethodonfile/checkout-session.md#complete-checkout-session" target="_blank" rel="noopener noreferrer">Complete Checkout Session</a> will return an error response for failed transactions. The buyer either canceled checkout or was unable to provide a valid payment instrument. You should:

1. Redirect the buyer to the start of checkout
2. Display a message such as: "Your payment was not successful. Please try another payment method."

### 2. Managing cancellations

Use <a href="../amazon-pay-paymentmethodonfile/charge-permission.md#close-charge-permission" target="_blank" rel="noopener noreferrer">Close Charge Permission</a> to inform Amazon Pay if a buyer cancels/removes their Saved Wallet. You will no longer be able to charge a buyer unless they consent again to setup Saved Wallet.

Buyers can also close Charge Permissions by signing in to <a href="https://pay.amazon.com" target="_blank" rel="noopener noreferrer">https://pay.amazon.com</a>. 

<a href="../amazon-pay-paymentmethodonfile/set-up-instant-payment-notifications.md" target="_blank" rel="noopener noreferrer">Set up IPNs</a> to receive notifications whenever a Charge Permission is closed. To minimize churn, we recommend that you proactively reach out to the subscriber for a new payment method before the next billing cycle.


### 3. Changing the Payment Method or Shipping Address

#### Changing the payment method with Amazon's YAUI

Buyers can update their payment method on Saved Wallet from <a href="https://pay.amazon.com" target="_blank" rel="noopener noreferrer">https://pay.amazon.com</a> section of the Amazon Pay website. Any subsequent charges are processed using the updated payment method. The payment method associated with any previous charges are not updated.  A direct link can also be provided to the buyer to allow easy updates of associated payment method using the following URL:  <a href="https://payments.amazon.com/jr/your-account/ba/{ChargePermissionId}" target="_blank" rel="noopener noreferrer">https://payments.amazon.com/jr/your-account/ba/{ChargePermissionId}</a>. Replace {ChargePermissionId} with the buyer's Charge Permission Id.

#### Changing the payment method or shipping address on Amazon Pay's hosted update page

You can also allow buyers to change payment method or shipping address on Amazon Pay’s hosted Update page. For details on how to integrate this solution, please refer to <a href="../amazon-pay-paymentmethodonfile/steps-to-integrate-with-amazon-pay-hosted-update-page.md" target="_blank" rel="noopener noreferrer">Steps to integrate with Amazon Pay’s hosted Update page</a>.

### 4. Saved Wallet Expiration

Charge Permissions with a type of `paymentMethodOnFile` do not have a set expiration and will persist until closed.

