List payment methods on file for a profile
GET
/api/subscriptions/payment-methods/by-profile/{profileId}
const url = 'https://api.usegro.co/api/subscriptions/payment-methods/by-profile/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.usegro.co/api/subscriptions/payment-methods/by-profile/exampleReturns the payment methods on file in Shopify for the given profile, independent of any subscription. Used by the create-subscription flow to show payment methods for a customer who does not yet have a subscription.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”profileId
required
string
Responses
Section titled “Responses”Customer’s available payment methods
Media typeapplication/json
object
available
required
Array<object>
object
id
required
string
brand
required
string
last_digits
required
string
expiry_month
required
number
expiry_year
required
number
has_shopify_customer
required
False when the profile has no linked Shopify customer (available will be empty)
boolean
Example generated
{ "available": [ { "id": "example", "brand": "example", "last_digits": "example", "expiry_month": 1, "expiry_year": 1 } ], "has_shopify_customer": true}