Create an on-demand transfer authorization
Create an on-demand transfer authorization that allows Customers to pre-authorize variable amount ACH transfers from their bank account for future payments. This authorization is used when creating Customer funding sources to enable flexible payment processing. Returns UI text elements including authorization body text and button text for display in your application’s bank account addition flow.
POST https://api-sandbox.dwolla.com/on-demand-authorizations
Accept: application/vnd.dwolla.v1.hal+json
Content-Type: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY
{
"_links": {
"self": {
"href": "https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388"
}
},
"bodyText": "I agree that future payments to Company ABC inc. will be processed by the Dwolla payment system from the selected account above. In order to cancel this authorization, I will change my payment settings within my Company ABC inc. account.",
"buttonText": "Agree & Continue"
}// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
dwolla.post("on-demand-authorizations").then((res) => res.body.buttonText); // => "Agree & Continue"
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
on_demand_authorization = app_token.post('on-demand-authorizations')
on_demand_authorization.body['buttonText'] # => 'Agree & Continue'
<?php
// Using dwollaswagger - https://github.com/Dwolla/dwolla-swagger-php
$onDemandApi = new DwollaSwagger\OndemandauthorizationsApi($apiClient);
$onDemandAuth = $onDemandApi->createAuthorization();
$onDemandAuth->_links["self"]->href; # => "https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388"
?>
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
on_demand_authorization = app_token.post "on-demand-authorizations"
on_demand_authorization.buttonText # => "Agree & Continue"
{
"_links": {
"self": {
"href": "https://api.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388"
}
},
"bodyText": "I agree that future payments to Company ABC inc. will be processed by the Dwolla payment system from the selected account above. In order to cancel this authorization, I will change my payment settings within my Company ABC inc. account.",
"buttonText": "Agree & Continue"
}{
"code": "Forbidden",
"message": "The supplied credentials are not authorized for this resource."
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
- Token URL
- /token
Headers
The media type of the response. Must be application/vnd.dwolla.v1.hal+json
application/vnd.dwolla.v1.hal+json Response
Ok
Show child attributes
Show child attributes
"I agree that future payments to Company ABC inc. will be processed by the Dwolla payment system from the selected account above. In order to cancel this authorization, I will change my payment settings within my Company ABC inc. account."
"Agree & Continue"
Was this page helpful?
POST https://api-sandbox.dwolla.com/on-demand-authorizations
Accept: application/vnd.dwolla.v1.hal+json
Content-Type: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY
{
"_links": {
"self": {
"href": "https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388"
}
},
"bodyText": "I agree that future payments to Company ABC inc. will be processed by the Dwolla payment system from the selected account above. In order to cancel this authorization, I will change my payment settings within my Company ABC inc. account.",
"buttonText": "Agree & Continue"
}// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
dwolla.post("on-demand-authorizations").then((res) => res.body.buttonText); // => "Agree & Continue"
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
on_demand_authorization = app_token.post('on-demand-authorizations')
on_demand_authorization.body['buttonText'] # => 'Agree & Continue'
<?php
// Using dwollaswagger - https://github.com/Dwolla/dwolla-swagger-php
$onDemandApi = new DwollaSwagger\OndemandauthorizationsApi($apiClient);
$onDemandAuth = $onDemandApi->createAuthorization();
$onDemandAuth->_links["self"]->href; # => "https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388"
?>
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
on_demand_authorization = app_token.post "on-demand-authorizations"
on_demand_authorization.buttonText # => "Agree & Continue"
{
"_links": {
"self": {
"href": "https://api.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388"
}
},
"bodyText": "I agree that future payments to Company ABC inc. will be processed by the Dwolla payment system from the selected account above. In order to cancel this authorization, I will change my payment settings within my Company ABC inc. account.",
"buttonText": "Agree & Continue"
}{
"code": "Forbidden",
"message": "The supplied credentials are not authorized for this resource."
}