Skip to content

List payment methods on file for a profile

GET
/api/subscriptions/payment-methods/by-profile/{profileId}
curl --request GET \
--url https://api.usegro.co/api/subscriptions/payment-methods/by-profile/example

Returns 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.

profileId
required
string

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
}