Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pay-rails/pay
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Aug 21, 2023
2 parents d50088d + 393ac0e commit 161cd03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/stripe/9_customer_reconciliation.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ end
### Backfilling subscriptions and charges for reconciled customers
When `Pay::Customer`s are created using `Model.set_payment_processor` or `Model.add_payment_processor`, existing Stripe subscriptions and charges are not automatically backfilled.

To backfill active subscriptions and the charges associated with those subscriptions, the `Pay::Customer.sync_subscriptions` method can be used. To backfill all subscriptions including canceled subscriptions, the `status: "all"` parameter can be provided (e.g. `Pay::Customer.sync_subscriptions(status: "all")`).
To backfill active subscriptions and the charges associated with those subscriptions, the `@user.payment_processor.sync_subscriptions` method can be used. To backfill all subscriptions including canceled subscriptions, the `status: "all"` parameter can be provided (e.g. `@user.payment_processor.sync_subscriptions(status: "all")`).

An equivalent method to backfilling charges not associated with subscriptions is not currently implemented within Pay, however `Pay::Charge`s can be created manually by the application such as in the example below.

```ruby
Stripe::Charge.list.auto_paging_each { |charge| Pay::Stripe::Charge.sync(charge.id) }
```
```

0 comments on commit 161cd03

Please sign in to comment.