# Payment Gateway Error

**URL:** <https://discuss.dwolla.com/t/payment-gateway-error/6001>\
**Category:** Funding Sources\
**Created:** [July 22, 2020, 6:39am UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001 "2020-07-22T06:39:05Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [August 12, 2020, 7:47pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/28 "2020-08-12T19:47:21Z")

</div>

Hi @Sourabh_Kasliwal – are you using our PHP SDK by any chance? If so, you can capture the error message by following this post -

> [@ApiException in ApiClient.php line 315: \[400\] Error connecting to the API (https://api-sandbox.dwolla.com/customers)](https://discuss.dwolla.com/t/apiexception-in-apiclient-php-line-315-400-error-connecting-to-the-api-https-api-sandbox-dwolla-com-customers/5182/5):
>
> Hi @shreyas.p, You should be able to catch the error and get the JSON response-body. You can try wrapping the request in a try/catch and display the error response by calling the getResponseBody() method. Example: try{ $new\_customer = $customersApi-\>create([//request\_body]); } catch (Exception $e) { echo 'Caught exception: ', $e-\>getResponseBody(), "\n"; }

Meanwhile, I can try to dig up this request and what’s returned in the error response. Is this in Sandbox? Do you have any IDs you could share that are related to your account so that I can locate it?

---

_[View the full topic](https://discuss.dwolla.com/t/payment-gateway-error/6001)._
