## TL;DR

In Ruby that is customer.credit_cards.map(&:subscriptions).flatten, one fetch instead of the transaction crawl.

## Steps

1. Go through the customer's payment methods: a customer has a credit_cards array and each card carries a subscriptions array. In Ruby that is customer.credit_cards.map(&:subscriptions).flatten, one fetch instead of the transaction crawl. The same shape exists in the other SDKs, each payment method object exposes its subscriptions, so iterate the customer's payment methods and collect them.

## When to use

You are seeing this: Go through the customer's payment methods: a customer has a credit_cards array and each card carries a subscriptions array. Use this skill when you run into "Get all of a Braintree customer's subscriptions via their payment methods".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
