on type
checking types at all is bad for interoperability. full stop. all you need to know something is a Link is that it has an href.
if people create subtypes, then activitystreams specifies they MUST also use a core type. examples given in as2-core include "type": ["Place", "gr:Location"] and "type": ["Person", "vcard:Individual"] which pull from goodrelations and from vcard. there is also "type": ["Like", "http://schema.org/LikeAction"] which uses a full iri.
When an implementation uses an extension type that overlaps with a core vocabulary type, the implementation MUST also specify the core vocabulary type. For instance, some vocabularies (e.g. The Good Relations Vocabulary) define their own types for describing locations. An implementation that wishes, for example, to use a http://purl.org/goodrelations/v1#Location as an object type MUST also identify the object as being a Place as illustrated in the following
When an implementation uses an extension type that overlaps with a core vocabulary type, the implementation MUST also specify the core vocabulary type. For instance, some vocabularies (e.g. VCard) define their own types for describing people. An implementation that wishes, for example, to use a vcard:Individual as an Actor MUST also identify that Actor as a Person as illustrated in the previous example.
^(activitypub i think relaxes this requirement, in that anything can be used as an actor; it’s actually weird that the phrasing is structured such that it reads “MUST be a Person” instead of using something non-normative since this is just an example, and the normative requirement just two sentences earlier already covers the intention.)
When an implementation uses an extension type that overlaps with a core vocabulary type, the implementation MUST also specify the core vocabulary type. For instance, some vocabularies (e.g. Schema.org) define their own types for describing actions. An implementation that wishes, for example, to use http://schema.org/LikeAction as an Activity MUST also identify that Object as being a Like as illustrated in the following
on name
you could just as reasonably show a list of href-values identified as payment links in a “payment” section
as2-core 4.1.1:
The name and summary MAY be absent, MAY lack explicit values in the end user’s current language, and MAY be longer than appropriate for use as a text representation of the Object in the current language context. Consumer implementations SHOULD have fallback strategies for text representation of Objects in these cases.
consider the perfectly-usable minimal example below:
href: https://donate.stripe.com/4gwcPCaMpcQ19RC4gg
rel: payment
this technically contains all you need. filter the attachment array for anything that has a rel and where rel includes payment. example python list comprehension:
payment_links = [item for item in attachment if 'rel' in item and 'payment' in item['rel']]
a name is nice to have, and you can recommend it as a SHOULD, but making it a MUST requirement is going to lead to fragility.