# 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:** 11\
**Page:** 3

<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:** [October 16, 2020, 2:38pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/42 "2020-10-16T14:38:55Z")

</div>

Hi Shyam, I removed your application Key from the above comment since it’s considered highly sensitive information that needs to be stored securely, at least in Production.

As for the request body, there is no Dwolla GUID in there that I can use to search in my logs. Is your sandbox account set up under the same email that you’re using to sign up here? If so, I can just use your email address to look up the account!

---

<div class="post-metadata">

**Author:** ![shyamsunder.sharma](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@shyamsunder.sharma](https://discuss.dwolla.com/u/shyamsunder.sharma)\
**Post date:** [October 16, 2020, 2:50pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/43 "2020-10-16T14:50:54Z")

</div>

yes i am using [shyamsunder.sharma@5exceptions.com](mailto:shyamsunder.sharma@5exceptions.com) for Sandbox account

---

<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:** [October 16, 2020, 5:29pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/44 "2020-10-16T17:29:27Z")

</div>

Thanks Shyam!

Looking at the logs, it looks like we had a blip in the Sandbox environment this morning that caused transfers to fail due to no services being available to receive the request.

The services are back up again and I am able to create transfers in my Sandbox test account. Would you be able to try creating transfers again?

As an aside, you should be able to catch the error and get the JSON response-body for errors. You can try wrapping the request in a try/catch and display the error response by calling the getResponseBody() method.

Example:

```auto
try{
    $new_customer = $customersApi->create([
        //request_body   
    ]);
} catch (Exception $e) {
    echo 'Caught exception: ', $e->getResponseBody(), "\n";
}

```

Let me know if you run into any issues!

---

<div class="post-metadata">

**Author:** ![shyamsunder.sharma](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@shyamsunder.sharma](https://discuss.dwolla.com/u/shyamsunder.sharma)\
**Post date:** [October 17, 2020, 10:56am UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/45 "2020-10-17T10:56:20Z")

</div>

Thanks, its working now,

How to change unverified funding-source to verified in Sandbox

i wait for your reply

---

<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:** [October 19, 2020, 1:47pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/46 "2020-10-19T13:47:38Z")

</div>

Hi @shyamsunder.sharma – you can verify a bank in one of the following ways,

- [Adding an unverified bank and using microdeposits to verify](https://developers.dwolla.com/guides/micro-deposit-verification).

- [Adding a verified bank via Dwolla + Plaid integration](https://developers.dwolla.com/guides/plaid#plaid-auth-for-bank-funding-source-authentication-in-seconds)

---

<div class="post-metadata">

**Author:** ![shyamsunder.sharma](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@shyamsunder.sharma](https://discuss.dwolla.com/u/shyamsunder.sharma)\
**Post date:** [October 28, 2020, 6:35am UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/47 "2020-10-28T06:35:41Z")

</div>

Thanks @shreya ji

i am using this doc for PHP integration & it works fine for me.

> **[Dwolla API docs](https://docs.dwolla.com/#initiate-micro-deposits)**

---

<div class="post-metadata">

**Author:** ![vikas](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/vikas/32/3453_2.png) [@vikas](https://discuss.dwolla.com/u/vikas)\
**Post date:** [March 21, 2022, 1:43pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/48 "2022-03-21T13:43:57Z")

</div>

@shreya

I am getting following error when initiate transfer:

1. code: 400
2. file: “dwolla/dwollaswagger/lib/ApiClient.php”
3. line: 320
4. message: “[400] Error connecting to the API ([https://api-sandbox.dwolla.com/transfers](https://api-sandbox.dwolla.com/transfers))”

---

<div class="post-metadata">

**Author:** ![spencer](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/spencer/32/2143_2.png) [@spencer](https://discuss.dwolla.com/u/spencer)\
**Post date:** [March 21, 2022, 3:18pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/49 "2022-03-21T15:18:39Z")

</div>

> [@shreya](#):
>
> As an aside, you should be able to catch the error and get the JSON response-body for errors. You can try wrapping the request in a try/catch and display the error response by calling the getResponseBody() method.

> [@Payment Gateway Error](https://discuss.dwolla.com/t/payment-gateway-error/6001/44):
>
> Thanks Shyam! Looking at the logs, it looks like we had a blip in the Sandbox environment this morning that caused transfers to fail due to no services being available to receive the request. The services are back up again and I am able to create transfers in my Sandbox test account. Would you be able to try creating transfers again? As an aside, you should be able to catch the error and get the JSON response-body for errors. You can try wrapping the request in a try/catch and display the err…

Hi @vikas , would you be able to move this to a try catch and log out the exception as referenced in Shreya’s reply above? It looks like the error response body may be getting swallowed and not returning a very helpful response.

---

<div class="post-metadata">

**Author:** ![vikas](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/vikas/32/3453_2.png) [@vikas](https://discuss.dwolla.com/u/vikas)\
**Post date:** [March 21, 2022, 4:38pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/50 "2022-03-21T16:38:34Z")

</div>

@shreya,

Thank so much for your quick response. As per your suggestion, I kept the code in try catch block and received the below response for your reference.

[DEBUG] HTTP Request body ~BEGIN~  
{“\_links”:{“source”:{“href”:“https://api-sandbox.dwolla.com/funding-sources/6cb298c8-edf5-4697-aa14-0581c059c27b”},“destination”:{“href”:“https://api-sandbox.dwolla.com/funding-sources/be4816ba-aeba-46f7-9f9a-b1cc89550b49”}},“amount”:{“currency”:“USD”,“value”:50}}  
~END~  
[DEBUG] HTTP Response body ~BEGIN~  
{“code”:“ValidationError”,“message”:“Validation error(s) present. See embedded errors list for more details.”,“\_embedded”:{“errors”:[{“code”:“NotAllowed”,“message”:“Receiver cannot receive from sender.”,“path”:“/\_links/destination/href”,“\_links”:{}}]}}  
~END~

- Trying 104.18.125.12:443…
- Connected to [api-sandbox.dwolla.com](http://api-sandbox.dwolla.com) (104.18.125.12) port 443 (#0)
- ALPN, offering h2
- ALPN, offering http/1.1
- successfully set certificate verify locations:
- CAfile: /etc/ssl/certs/ca-certificates.crt
- CApath: /etc/ssl/certs
- SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305
- ALPN, server accepted to use h2
- Server certificate:
- subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; [CN=dwolla.com](http://CN=dwolla.com)
- start date: Jun 9 00:00:00 2021 GMT
- expire date: Jun 8 23:59:59 2022 GMT
- subjectAltName: host “[api-sandbox.dwolla.com](http://api-sandbox.dwolla.com)” matched cert’s “\*.dwolla.com”
- issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
- SSL certificate verify ok.
- Using HTTP2, server supports multi-use
- Connection state changed (HTTP/2 confirmed)
- Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
- Using Stream ID: 1 (easy handle 0x55eeae2fb9d0)

> POST /transfers HTTP/2  
> Host: [api-sandbox.dwolla.com](http://api-sandbox.dwolla.com)  
> user-agent: php-swagger-1.7.0  
> accept: application/vnd.dwolla.v1.hal+json  
> content-type: application/vnd.dwolla.v1.hal+json  
> authorization: Bearer cmljvg89EGl3s67TqILFq63uxtokmz8vTVfyfRNiuPj6xdLHub  
> content-length: 272

- Connection state changed (MAX\_CONCURRENT\_STREAMS == 256)!
- We are completely uploaded and fine  
\< HTTP/2 400  
\< date: Mon, 21 Mar 2022 16:35:50 GMT  
\< content-type: application/vnd.dwolla.v1.hal+json; profile=“[http://nocarrier.co.uk/profiles/vnd.error/](http://nocarrier.co.uk/profiles/vnd.error/)”  
\< content-length: 252  
\< access-control-allow-origin: \*  
\< x-request-id: cfefbc0e-932a-4d23-a18f-92c718682c6a  
\< cf-cache-status: DYNAMIC  
\< expect-ct: max-age=604800, report-uri=“[https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct](https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct)”  
\< set-cookie: \_\_cf\_bm=K\_8ldcvhjS1sNUGmHRkn7x5At2Dj\_MuF5nLClPiN6z8-1647880550-0-AVjNvsRTpcqup7dJpWgyIN0Mod6bwkP1OOKHmK/fFw0535HpqjmbZxk+vFRPT9iRXgZ05n5LiYPbhy14DaToZO8=; path=/; expires=Mon, 21-Mar-22 17:05:50 GMT; [domain=.dwolla.com](http://domain=.dwolla.com); HttpOnly; Secure; SameSite=None  
\< server: cloudflare  
\< cf-ray: 6ef81a607f8d8c35-EWR  
\<
- Connection #0 to host [api-sandbox.dwolla.com](http://api-sandbox.dwolla.com) left intact  
{“error”:true,“message”:“{"code":"ValidationError","message":"Validation error(s) present. See embedded errors list for more details.","\_embedded":{"errors":[{"code":"NotAllowed","message":"Receiver cannot receive from sender.","path":"/\_links/destination/href","\_links":{}}]}}”}

---

<div class="post-metadata">

**Author:** ![vikas](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/vikas/32/3453_2.png) [@vikas](https://discuss.dwolla.com/u/vikas)\
**Post date:** [March 21, 2022, 4:41pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/51 "2022-03-21T16:41:17Z")

</div>

I noticed, why it says “Receiver cannot receive from sender.” however, I sent funding source URL properly for sender and receiver both. Kindly suggest me so that I can move forward.

---

<div class="post-metadata">

**Author:** ![spencer](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/spencer/32/2143_2.png) [@spencer](https://discuss.dwolla.com/u/spencer)\
**Post date:** [March 23, 2022, 1:50pm UTC](https://discuss.dwolla.com/t/payment-gateway-error/6001/52 "2022-03-23T13:50:48Z")

</div>

Hi @vikas , as referenced in our developer documentation on [Customer types](https://developers.dwolla.com/concepts/customer-types), a transfer between two parties requires that at least one party must be CIP verified. It is your decision about which party completes this process based on your business model. If you are facilitating a transfer between two different users, at least one of them needs to be onboarded as a [Verified Customer](https://developers.dwolla.com/concepts/customer-types#verified-customer).

[Previous page](https://discuss.dwolla.com/t/payment-gateway-error/6001.md?page=2)
