Mass Payment Not Working

@shreya

I am trying to do mass payment using https://github.com/Dwolla/dwolla-swagger-php.
But working with single item data only.

Here, I have added my demo code for,

$massPayment = $massPaymentsApi->create([
							'_links' =>
							[
							  'source' =>
							  [
								'href' => 'funding source url',
							  ],
							],
							'items' =>
							[
							  [
								'_links' =>
								[
								  'destination' =>
								  [
									'href' => 'customer destination url',
								  ],
								],
								'amount' =>
								[
								  'currency' => 'USD',
								  'value' => '1.10',
								]
							  ],
							  [
								'_links' =>
								[
								  'destination' =>
								  [
									'href' => 'customer destination url',
								  ],
								],
								'amount' =>
								[
								  'currency' => 'USD',
								  'value' => '2.20',
								]
							  ],
							]
						  ]);

Error :
Whoops, looks like something went wrong.

ApiException in ApiClient.php line 322:[400] Error connecting to the API (https://api-sandbox.dwolla.com/mass-payments)

Please let me know the actual issue in script.

Thanks

Hi @shreyas.p,

I tried running your request, and it ran fine on my end, which makes me think the error lies either in the the Customer url, or the funding-source url. What error response do you see when you wrap the request in a try/catch?

Example -

try{
    $massPayments = $massPaymentsApi->create([
        //request_body   
    ]);
} catch (Exception $e) {
    echo 'Caught exception: ',  $e->getResponseBody(), "\n";
}
1 Like

@shreya

Thanks for your help.

I have one more query that “facilitator-fee” does not work with Mass-Payment?

You’re welcome!

That’s correct. We don’t currently have the functionality of including facilitator-fees with masspayments, however, this is definitely something we can look to add to the API in the future! I’ll pass this along as feedback to our Product team.

@shreya

Thanks for your help :slight_smile:

1 Like