Payment Gateway Error

Hello All,

While Trying to initiate payment gateway, it is giving error of bad syntax

Attached are the screenshot of code and error which is coming

Hi @Sourabh_Kasliwal, do you have a screenshot of the error that is getting returned back from this API request? Looks like the screenshot provided just shows your code.

Please check
Thanks

Hi @Sourabh_Kasliwal – it looks to be the extra " /funding-sources " in the source and destination URLs that’s causing the error.

Here’s an example of what a funding-source resource URL looks like -
https://api.dwolla.com/funding-sources/{funding-source-id}

1 Like

Hi,
How can I take payment from users in real time without creating customers account, I dont want there account to be created, I just need the transactions on my products that users can purchase using credit or debit cards.

Hi @Sourabh_Kasliwal – I’m afraid creating transfers requires your users to have a Customer account created in Dwolla. Perhaps you could create a lightweight Unverified Customer type which only requires their firstName, lastName and email address along with them agreeing to your platform’s as well as Dwolla’s ToS and PP.

Also, we currently only support creating transfers from a Bank account, and not Credit/Debit cards.

Hope that helps!

I want to charge customers for payment how do I do that?
As documentation is not clearly showing how to do that.

Hi @Sourabh_Kasliwal – You can do so by using the facilitator-fee object in a transfer request.

Let me know if you have any questions!

Okay
Can you please share php documents
So that I can some idea.

Sure! You can toggle the language selector in the above documentation to view the code request examples in PHP. Here’s also an example request in PHP for creating a transfer with facilitator-fee -

<?php

$transfersApi = new DwollaSwagger\TransfersApi($apiClient);

$transfer = $transfersApi->create([
  '_links' => [
    'source' => [
      'href' => 'https://api-sandbox.dwolla.com/funding-sources/707177c3-bf15-4e7e-b37c-55c3898d9bf4',
    ],
    'destination' => [
      'href' => 'https://api-sandbox.dwolla.com/funding-sources/a2152a8a-b1a6-4b5e-9354-79e2bb8753ee'
    ]
  ],
  'amount' => [
    'currency' => 'USD',
    'value' => '98.00'
  ],
  'fees' => [
     [
        '_links' => [
           'charge-to' => [
              'href' => 'https://api-sandbox.dwolla.com/customers/479ce4c8-385f-4cfa-9693-262c0c3b6408'
           ]
        ],
        'amount' => [
           'value' => '2.00',
           'currency' => 'USD'
        ]
     ]
  ]
 ]);

print_r($transfer); # => "https://api-sandbox.dwolla.com/transfers/74c9129b-d14a-e511-80da-0aa34a9b2388"

?>

when create customer funding source

Code which I use
function createcustomerfundingphp(){
Configuration::$access_token = ‘3ixqH9146o2tnUKfgpCEXuWGWjq5IbfesvwyFFPXWjC8qdloJp’;
$apiClient = new ApiClient($this->paymentmod_url);
$fundingApi = new FundingsourcesApi($apiClient);

$new_fs = $fundingApi->createCustomerFundingSource([
“routingNumber” => “222222989”,
“accountNumber” => “123456779”,
“bankAccountType” => “savings”,
“name” => “ashish1nuance - Savings 6788”
], “https://api-sandbox.dwolla.com/customers/d1f7ac27-920e-4dac-90af-e7425c57a512
);
print_r($new_fs);
}

But it gives error of connecting to the API, is that something to do with routing number.

Yeah, it’s likely the routing number. You can try any US routing number that passes our checksum, or you can also use this number for Sandbox - 222222226.

Going forward, you can also extract the actual API error message which provides more information on what’s causing the API to throw the error.

Is there any list for checksum?

Yes. You can find it listed in our API Docs - https://docs.dwolla.com/#create-a-funding-source-for-a-customer

A bank routing number that identifies a bank or credit union in the U.S. Note: Validation of the routing number includes: a checksum, the first two digits of the routing number must fall within the range “01” through “12”, or “21” through “32”, and the string value must consist of nine digits.

Once a customer is created, how can he pay for the product,
as I am not seeing any option for that, could you please explain on this.

Thanks

Hi Sourabh, that depends on how you’d like to charge your Customers.

You can either charge them outside of Dwolla, or even utilize the Dwolla’ API to create ACH transactions to debit their attached bank accounts.

How to create ACH transactions, and once that is done, how that will be possible
How can I know if they are getting request on there bank account.

You can check out our docs on how to create transfers here - https://docs.dwolla.com/#initiate-a-transfer

The only way to know that the banks are getting ACH requests is to reach out to the bank. Dwolla doesn’t have a way to know if the funds has left a bank, and have settled into a bank. To learn more about specific funds flows, and how you can utilize Dwolla for your user-case, these funds-flow specific guides might be helpful to check out - https://developers.dwolla.com/guides

Needed details for instant verification in sandbox mode,
Please share

Hi @Sourabh_Kasliwal – were you looking to test IAV in Sandbox? If so, here are some helpful guides -