# Remember Me
source: https://developer.mastercard.com/ob-accept-payments/documentation/features/return-user-experience/remember-payers-account-details/index.md

Mastercard Open Finance Pay can optionally remember the account details that a payer used during an initial successful payment.

When the payer returns to make another payment, you can use a Payer Token
to offer a streamlined user experience where they will not be required to select their bank account again.

## How It Works {#how-it-works}

When you set the `rememberPayer` flag to `true` in a [Create payment](https://developer.mastercard.com/ob-accept-payments/documentation/api-reference/index.md#createPayment) request,
Mastercard Open Finance Pay captures and stores the payer's account details upon
successful payment inititation.

You can then call the [Create payer token](https://developer.mastercard.com/ob-accept-payments/documentation/api-reference/index.md#createPayerToken)
endpoint and pass in the `paymentId` from the successful payment to get a `payerTokenId`.

Pass the `payertokenId` in future payment
requests to enable the streamlined return experience.
Diagram remember_payer_flow Note: The ability to capture and store a payer's source account details for use with Payer Tokens depends on the details returned to Mastercard Open Finance Pay by the ASPSP. This can vary by market and ASPSP so it is recommended that you discuss it with your implementations contacts at Mastercard Open Finance Pay before you start to use Payer Tokens.

The steps below describe how to create and use a Payer Token.

1. **Create the initial payment with `rememberPayer` set to `true`.** Create a
   payment and set `rememberPayer` to `true` so that Mastercard Open Finance Pay
   stores the payer's account details. Before you do this, tell the payer that
   their account will be stored for future payments and get their consent. If you
   do not set `rememberPayer` to `true`, the account details are not stored and
   you cannot create a Payer Token from this `paymentId`. Refer to
   [Single Immediate Payments](https://developer.mastercard.com/ob-accept-payments/documentation/payments/single-immediate-payments/single-immediate-payments/index.md)
   for how to create a payment.


   API Reference: `POST /payments`

2. **Create the Payer Token.** After the payment succeeds, call the **Create
   payer token** endpoint and pass the `paymentId` from the successful payment.
   The response returns the `payerTokenId` and a `displayAccountNumber` that you
   can show in your interface so the payer knows which account they are using.
   Store the `payerTokenId` so you can use it in future payments. A Payer Token
   is valid for 15 months.


   API Reference: `POST /payer-tokens`

3. **Create a later payment with the Payer Token.** When the payer returns to
   make another payment, create a payment and pass the `payerTokenId` inside the
   `preselectedSource` object in the request body. Mastercard Open Finance Pay
   validates the `payerTokenId` and returns a `flowUrl`. Redirect the payer to
   the `flowUrl` so they can complete the payment without selecting their bank
   again.

   * Use the `allowAccountChange` field to control whether the payer can pay from a different account.
     * If `allowAccountChange` is `false` (the default), the payer can only complete the payment flow using the account associated with the `payerTokenId`.
     * If `allowAccountChange` is `true`, the payer can navigate to the provider selector during the payment flow and complete the payment using a different account.
   * To extend the token's expiry, set `rememberPayer` to `true` when you pass the `payerTokenId`.   

4. **Get the details of a Payer Token.** Call the **Get payer token** endpoint
   with the `payer_token_id` to fetch the token's details.


   API Reference: `GET /payer-tokens/{payer_token_id}`

   This endpoint can return:
   * The `paymentRail` that the Payer Token can be used with.
   * The `providerId` that the Payer Token is associated with.
   * The `displayAccountNumber` for the Payer Token. You can show this in your interface so the payer knows the account they will use in the payment flow.
   * The `expiresAt` value. You can extend this by setting `rememberPayer` to `true` when you pass a `payerTokenId` in the `preselectedSource` object in the payment request body.
   * The `destinationId` associated with the Payer Token.   

5. **Delete a Payer Token.** Call the **Delete payer token** endpoint with the
   `payer_token_id` to delete a specific Payer Token. After you call this
   endpoint and get a 204 response, you can no longer use this `payerTokenId` in
   future payment requests.


   API Reference: `DELETE /payer-tokens/{payer_token_id}`

## End User Experience {#end-user-experience}

This section shows the user experience for a returning payer.

For the best viewing experience of app to app, click the **full screen** option or **zoom** using the controls located on the right.

### First Time User Journey Where rememberPayer Was Set to True {#first-time-user-journey-where-rememberpayer-was-set-to-true}

1. **Mastercard Open Finance Pay**   
   The payer searches for their bank, selects their bank, gives consent and proceeds with the Payment authorisation journey.
2. **Bank**   
   The payer authenticates themselves using the bank's existing authentication methods.
3. **Mastercard Open Finance Pay**   
   The payer is automatically redirected to Mastercard Open Finance Pay where they can see that the payment was initiated successfully and that the account they used has been stored.
This Figma diagram shows the user flow for making a payment and storing the account used for future payment.

For the best viewing experience, click the **full screen** option.

### Return User Journey Using a Payer Token: {#return-user-journey-using-a-payer-token}

1. **Mastercard Open Finance Pay**   

   The payer reviews the payment details as well as their preselected bank details and gives permission to the Payment Initiation Service Provider (PISP) to initiate the payment with the bank.

2. **Bank**   

   The payer authenticates themselves using the bank's existing authentication methods.

3. **Mastercard Open Finance Pay**   

   The payer is automatically redirected to Mastercard Open Finance Pay where they can see that the payment was initiated successfully and that the account they used has been stored.

This Figma diagram shows the user flow for making a payment using a stored account.

For the best viewing experience, click the **full screen** option.
