#Sophia123

1 messages · Page 1 of 1 (latest)

safe sierraBOT
solid ferry
subtle quiver
#

When a link is used, the payment type is the link

data.type = link
#

eg

    "id": "pm_1NVB952eAB6s7U3SzvOSNOpL",
    "object": "payment_method",
    "billing_details": {
        "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "postal_code": null,
            "state": null
        },
        "email": null,
        "name": null,
        "phone": null
    },
    "created": 1689676123,
    "customer": "cus_OHkc8RwY1gWeh5",
    "link": {
        "email": "ppintegrations@piano.io",
        "persistent_token": "AfXgYewaPJd4hsgqj-YAOQXgmbuvscBAplbr8LBLsVzdqGLO3jCCwUp5XLC_xuqCGNhl2q7pV8rru6M-FasWpI64Xfc7jHMurX3V2gRHV_uBP76NxxMS91_lrMJ2KIAqXsj52OGec3_TdlsuogN_tuV7S_Yn-Lk9GgloInjd-KuYP87iNLZF48scBrbKuPy9VR9dbRIn1EcjVQol5jfhn32udN67lqvT_s79dXFRBX5ablBkkawQZDujIvG2E8UYhsfF2zjRQujNHQ45OhxO4kozPIxNp8qzK-thY2VwkOGk-QMpntkRR-aXkApEjBUlyuWBYcn9UOl6A1oz54XtNIH9TR69dod4tR7lt7PWEbuvSieGlzPyAJTZSooLqNbXyHG2Vb7iGyXy53sO0UYbaM7NWjHeKz-MFrSd7eD5-MQGZShWDuh97-7P_qBDUHE"
    },
    "livemode": false,
    "metadata": {},
    "type": "link"
}```
#

here we see card, and in the stripe dashboard payment method is card

#

Here I see that the card data was changed, but type is link

  "request": {
    "idempotency_key": null,
    "id": null
  },
  "data": {
    "previous_attributes": {
      "card": {
        "exp_year": 2026
      }
    },
    "object": {
      "billing_details": {
        "address": {
          "country": "US",
          "city": null,
          "state": null,
          "postal_code": "20169",
          "line2": null,
          "line1": null
        },
        "phone": null,
        "name": "XXX",
        "email": "XXX"
      },
      "metadata": {},
      "livemode": true,
      "created": 1646512487,
      "id": "pm_1Ka4JPBRgsVldG0QqDDtRYPX",
      "type": "card",
      "card": {
        "country": "US",
        "last4": "6969",
        "funding": "credit",
        "checks": {
          "cvc_check": "unchecked",
          "address_line1_check": null,
          "address_postal_code_check": "unchecked"
        },
        "three_d_secure_usage": {
          "supported": true
        },
        "wallet": {
          "link": {},
          "dynamic_last4": null,
          "type": "link"
        },
        "generated_from": null,
        "fingerprint": "93JxTruCTiH0cY0i",
        "exp_month": 4,
        "exp_year": 2027,
        "networks": {
          "available": [
            "visa"
          ],
          "preferred": null
        },
        "brand": "visa"
      },
      "object": "payment_method",
      "customer": "cus_LGbWrTceRZjkkL"
    }
  },
  "livemode": true,
  "created": 1689556133,
  "id": "evt_1NUfvlBRgsVldG0QMSesQYYP",
  "api_version": "2022-08-01",
  "type": "payment_method.automatically_updated",
  "account": "XXX",
  "pending_webhooks": 1,
  "object": "event"
}```
safe sierraBOT
solid ferry
#

Ah I miss understand your first message, then, thanks for sharing a complete sample.

#

Here the event is that a PaymentMethod card details was updated automatically,

#

If data.type = card you just ignore wallet, I'm not sure but maybe this card was reigstred first via Stripe Link

mystic yarrow
#

👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

subtle quiver
#

I am not sure about this because for other wallet methods, the logic is different.
If data.type = card you just ignore wallet, I'm not sure but maybe this card was reigstred first via Stripe Link
For GooglePay we have this

    "id": "pm_1NAVBVGpAAGAcv18NveTqaz1",
    "object": "payment_method",
    "billing_details": {
        "address": {
            "city": "XXX",
            "country": "SK",
            "line1": "XXX",
            "line2": null,
            "postal_code": "96801",
            "state": null
        },
        "email": null,
        "name": "XXX",
        "phone": null
    },
    "card": {
        "brand": "visa",
        "checks": {
            "address_line1_check": "pass",
            "address_postal_code_check": "pass",
            "cvc_check": null
        },
        "country": "US",
        "exp_month": 11,
        "exp_year": 2026,
        "fingerprint": "2LJfqYRfJI6EVRAW",
        "funding": "credit",
        "generated_from": null,
        "last4": "0460",
        "networks": {
            "available": [
                "visa"
            ],
            "preferred": null
        },
        "three_d_secure_usage": {
            "supported": true
        },
        "wallet": {
            "dynamic_last4": "1111",
            "google_pay": {},
            "type": "google_pay"
        }
    },
    "created": 1684748265,
    "customer": "cus_NwNgzpKB3Ivpf3",
    "livemode": false,
    "metadata": {},
    "type": "card"
}```
data.type = card
but this is a wallet pm and we see data.card.wallet.type = google_pay
#

What does link message payment_method.automatically_updated (or other webhooks) look like?

mystic yarrow
#

this is not related to link

subtle quiver
#

It follows from the documentation that in first level type we will not see google_pay, but why we can see the link code in both fields (type, card.wallet.type), this confuses us very much