Skip to content

Instantly share code, notes, and snippets.

@Brotzka
Created March 4, 2019 04:07
Show Gist options
  • Save Brotzka/9d5be1e9f84fe1d5f0a01ac0a0b2429d to your computer and use it in GitHub Desktop.
Save Brotzka/9d5be1e9f84fe1d5f0a01ac0a0b2429d to your computer and use it in GitHub Desktop.
Create Stripe-Source on connected account
<?php
$stripeConnectedAccount = Account::retrieve("acct_XXX");
$stripeConnectedAccountSource = Source::create([
"type" => "sepa_debit",
"sepa_debit" => ["iban" => "DE89370400440532013000"],
"currency" => "eur",
"owner" => [
"name" => $localCustomer->full_name,
],
"mandate" => [
"acceptance" => [
"status" => "accepted",
"date" => $timestamp,
"ip" => $clientIp,
"online" => [
"date" => $timestamp,
"ip" => $clientIp,
"user_agent" => $clientUserAgent
],
"type" => "online",
"user_agent" => $clientUserAgent
]
],
"usage" => "reusable"
], ["stripe_account" => $stripeConnectedAccount->id]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment