diff --git a/source.go b/source.go index 0016bbbe20..3b05318de9 100644 --- a/source.go +++ b/source.go @@ -81,6 +81,7 @@ type SourceObjectParams struct { Currency Currency `form:"currency"` Customer string `form:"customer"` Flow SourceFlow `form:"flow"` + OriginalSource string `form:"original_source"` Owner *SourceOwnerParams `form:"owner"` Redirect *RedirectParams `form:"redirect"` StatementDescriptor string `form:"statement_descriptor"` diff --git a/source/client_test.go b/source/client_test.go index d83e354f99..2928433110 100644 --- a/source/client_test.go +++ b/source/client_test.go @@ -45,3 +45,16 @@ func TestSourceDetach(t *testing.T) { assert.Nil(t, err) assert.NotNil(t, source) } + +func TestSourceSharing(t *testing.T) { + params := &stripe.SourceObjectParams{ + Type: "card", + Customer: "cus_123", + OriginalSource: "src_123", + Usage: stripe.UsageReusable, + } + params.SetStripeAccount("acct_123") + source, err := New(params) + assert.Nil(t, err) + assert.NotNil(t, source) +}