# Fetch related payment_method Endpoint: GET /v2/payment_subscriptions/{id}/relationships/payment_method Version: 1.0 Security: bearerAuth ## Path parameters: - `id` (string, required) the identifier of the record ## Query parameters: - `fields` (string) sparse fieldsets: fields[TYPE]=field1,field2,... - `include` (string) list of included related resources ## Header parameters: - `User-Agent` (string, required) The name and version of the client making the request Example: "CHOAM EPT Client v10191 (Ruby Client v3)" ## Response 200 fields (application/vnd.api+json): - `data` (object) Use the PaymentMethod API to store customer credit/debit card details for immediate (charges) or later processing (subscriptions). The API does not accept raw card numbers or cvv values. Edge JS will provide tokenised values for card numbers (card_pan_token) and cvv (card_cvv_token). Edge currently supports credit and debit cards of Visa, Master, AMEX and Discovery. Edge intends to introduce support for ACH payments soon. Example: {"attributes":{"created_at":"2024-06-06T21:48:33.382755Z","updated_at":"2024-06-06T21:48:33.382755Z"},"id":"fc6ef2c8-b538-4452-808c-ad0503cbfaa3","links":{},"relationships":{},"type":"payment_methods"} - `data.attributes` (object) Members of the attributes object (attributes) represent information about the resource object in which it's defined. Example: {"created_at":"2024-06-06T21:48:33.382755Z","updated_at":"2024-06-06T21:48:33.382755Z"} - `data.attributes.card_bin` (string) First 6 digits of card number - `data.attributes.card_cvv_token` (string) The CVV token - `data.attributes.card_pan_token` (string) The card PAN token - `data.attributes.created_at` (string) Example: "2024-06-06T21:48:33.382755Z" - `data.attributes.description` (string) A description of the payment method - `data.attributes.discarded_at` (string) - `data.attributes.expiry_month` (integer) The month of the cards expiry date - `data.attributes.expiry_year` (integer) The year of the cards expiry date, in YYYY format - `data.attributes.external_state` (string) Enum: "pending", "confirmed", "failed", "errored" - `data.attributes.kind` (string) Enum: "checking", "savings", "visa", "mastercard", "amex", "discover", "diners", "elo", "hiper", "hipercard", "jcb", "maestro", "mir", "unionpay", "unknown" - `data.attributes.last_four` (string) Last 4 digits of card number - `data.attributes.nickname` (string) The name given by the cardholder to distinguish between other cards - `data.attributes.updated_at` (string) Example: "2024-06-06T21:48:33.382755Z" - `data.id` (string, required) [resource object identifier](https://jsonapi.org/format/#document-resource-object-identification) - `data.links` (object, required) The links of the type Example: {} - `data.relationships` (object) The relationships of the type Example: {} - `data.type` (string, required) [resource object type](https://jsonapi.org/format/#document-resource-object-identification) Enum: "payment_methods" - `jsonapi` (object) An object describing the server's implementation - `jsonapi.meta` (object) Non-standard meta-information that can not be represented as an attribute or relationship. - `jsonapi.meta.authors` (array) A list of all the authors of this work - `jsonapi.meta.copyright` (string) - `jsonapi.version` (string) - `links` (object, required) May contain self, related, or pagination links (first, last, prev, next). - `links.first` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `links.last` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `links.next` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `links.prev` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `links.related` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `links.self` (any) A link MUST be represented as either: a string containing the link's URL or a link object. ## Response 422 fields (application/vnd.api+json): - `errors` (array, required) - `errors.code` (string) An application-specific error code, expressed as a string value. - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. - `errors.id` (string) A unique identifier for this particular occurrence of the problem. - `errors.links` (object) May contain self, related, or pagination links (first, last, prev, next). - `errors.links.first` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `errors.links.last` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `errors.links.next` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `errors.links.prev` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `errors.links.related` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `errors.links.self` (any) A link MUST be represented as either: a string containing the link's URL or a link object. - `errors.meta` (object) Non-standard meta-information that can not be represented as an attribute or relationship. - `errors.meta.authors` (array) A list of all the authors of this work - `errors.meta.copyright` (string) - `errors.source` (object) - `errors.source.parameter` (string) A string indicating which query parameter caused the error. - `errors.source.pointer` (string) A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. /data for a primary data object, or /data/attributes/title for a specific attribute]. - `errors.status` (string) The HTTP status code applicable to this problem, expressed as a string value. - `errors.title` (string) A short, human-readable summary of the problem. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. - `jsonapi` (object) An object describing the server's implementation - `jsonapi.version` (string) ## Response 400 fields ## Response 401 fields ## Response 403 fields ## Response 404 fields ## Response 406 fields