Real-time account updater for direct merchants

DocsCurrentAdvancedLast updated: January 24th 2024, @ 8:33:12 pm


Use real-time account updates to reduce declined card payments. Real-time account updater increases payment success by asking the card issuer for updates about the buyer's card, and applying any changes to the current card.

Use this integration guide if you are a merchant and have a direct integration with PayPal.

What is real-time account updater?

A buyer's credit or debit card can be declined for many reasons. When a card on file expires, is lost or stolen, or changes for any other reason, payments using that saved card are declined. A declined card can interrupt or prevent a transaction and impact your relationship with that customer.

Only cards that the customer has saved on PayPal's Commerce Platform for future payments are eligible for real-time updates. When triggered, real-time account updater obtains the updated card information to use for the payment. The API response includes data about the card used to complete the payment. For details on how to save a card for future payments, visit Save payment methods.

Examples of payments using a card on file include:

  • Recurring payments on a subscription for a service or a product.
  • Online or mobile checkout using a previously saved credit or debit card.

Real-time account updater doesn't apply to mobile payments from a digital wallet, such as Apple Pay, Google Pay, and Samsung Pay.

Note: Even cards that qualify for real-time updates may not be updated during a transaction. Read PayPal's Online Card Payment Services Agreement for details.

Eligibility

Real-time account updater is a limited early access program for all merchants with the following integrations enabled:

Real-time account updates only occur on subsequent card payments using a card on file. For examples of subsequent payment scenarios, see the Strong Customer Authentication payment indicators page.

Real-time account updater works when issuers agree to share card updates via card networks. PayPal can’t provide a card update when the card issuer or cardholder opts out of automatic updates. When a card account doesn’t support real-time account updates, request a card update directly from the cardholder.

If you're interested in using real-time account updater, go to our article about Real-Time Account Updater and integration.

Supported countries

The following table shows the card types and countries that real-time account updater supports.

  • Issuing country: The country of the bank that issues the card.
  • Merchant country: The country where the merchant receives the payment.
Card networkCard typeIssuing countryMerchant country
MastercardCredit and debit cardsAT, AU, BE, BG, CA, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HU, IE, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE, SI, SK, UK, USAT, AU, BE, BG, CA, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HU, IE, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE, SI, SK, UK, US
VisaCredit and debit cardsUSAT, AU, BE, BG, CA, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HU, IE, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE, SI, SK, UK, US

How it works

PayPal works with Mastercard and Visa to reduce declined payments using real-time account updates.

  1. Mastercard
  2. Visa

Mastercard

When a partner or direct merchant has real-time account updater enabled for their account, PayPal checks if the card information is current and eligible for updates.

Real-time account updater workflow for Mastercard

  1. A merchant has a card on file that was saved for future payments with the customer's consent.
  2. The buyer makes a purchase using the saved card on file, or the merchant uses the card on file for a recurring payment.
  3. PayPal processes the payment as an advanced credit or debit transaction.
  4. Mastercard sends the payment to the card issuer, but the card on file has expired, has been cancelled, or is otherwise not available for payment.
  5. Mastercard notifies PayPal that the issuer declined the card.
  6. PayPal checks to see if the card on file is eligible for real-time account updater.
  7. PayPal sends a request to Mastercard to check whether the card's information is current.
  8. Mastercard confirms that the card has changed, and sends the updated card information.
  9. PayPal resubmits the payment on the merchant's behalf using the updated card information.
  10. PayPal returns the updated card information to the merchant. If the card on file was a vaulted token, PayPal updates the card on file in the PayPal Complete Payments Platform vault.

API responses for real-time account updater

Real-time account updates use specific fields and error codes that could impact your existing integration.

Payment requests with a token

Payment requests that use a payment token return 2 additional parameters: expiry and last_digits.

When PayPal completes a payment using an updated expiration or primary account number:

  • The response fields pass the new values instead of the old values stored in the payment method in PayPal's vault.
  • PayPal updates the vaulted payment method with the new values.

expiry response

The expiry response field is included in the card object and returns the expiration date of the card used for payment.

last_digits response

The last_digits response field is included in the card object and returns the last 4 digits of the card number used for payment.

Sample payment response

1{
2 "payment_source": {
3 "card": {
4 "last_digits": "2557",
5 "expiry": "2040-12",
6 "brand": "MASTER_CARD",
7 "type": "CREDIT"
8 }
9 }
10}

Sample payment response for closed card error

The HTTP 422 error response is returned when a card on file that is marked as closed is used for payment.

1{
2 "name": "UNPROCESSABLE_ENTITY",
3 "details": [
4 {
5 "field": "payment_source/card",
6 "location": "body",
7 "issue": "CARD_CLOSED",
8 "description": "The card is closed."
9 }
10 ],
11 "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
12 "debug_id": "6a20810eaecc5",
13 "links": [
14 {
15 "href": "https://developer.paypal.com/docs/api/orders/v2/#error-CARD_CLOSED",
16 "rel": "information_link",
17 "method": "GET"
18 }
19 ]
20 }

Postman collection

Download the Postman collection for real-time account updater to test making updates to cards.

Sample card change scenarios

This section shows how real-time account updater responds to 3 different card changes.

Note: The payment token id in these code samples is a placeholder. Generate and use your own payment token.

  1. Expired token
  2. Updated token
  3. Closed token

This sample shows what happens when a token for an expired card is used for a payment. The response returns the updated expiration date for the same card.

If you call GET /v3/vault/payment-tokens/{id} using the token before you submit the order using POST /v2/checkout/orders, the POST response includes the updated values that PayPal used to complete the payment. Compare the expiry returned by the GET call to the expiry returned by the POST call.

API endpoint: /v2/checkout/orders

  1. Request
  2. Response
1{
2 "intent": "CAPTURE",
3 "payment_source": {
4 "token": {
5 "id": "0rjdehvx",
6 "type": "PAYMENT_METHOD_TOKEN"
7 }
8 },
9 "payer": {
10 "name": {
11 "given_name": "kakashi Hatakae",
12 "surname": "user"
13 },
14 "address": {
15 "address_line_1": "123 Main St.",
16 "address_line_2": "Floor 6",
17 "admin_area_2": "Anytown",
18 "admin_area_1": "CA",
19 "postal_code": "12345",
20 "country_code": "US"
21 }
22 },
23 "purchase_units": [
24 {
25 "description": "Item bought at Hemm Store",
26 "custom_id": "1111",
27 "soft_descriptor": "",
28 "amount": {
29 "currency_code": "USD",
30 "value": "45.00"
31 },
32 "shipping": {
33 "address": {
34 "address_line_1": "123 Main St.",
35 "address_line_2": "Building 17",
36 "admin_area_2": "Anytown",
37 "admin_area_1": "CA",
38 "postal_code": "12345",
39 "country_code": "US"
40 }
41 }
42 }
43 ]
44}