{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/agreements/debit/:region/:type","auth":"optional","examples":{"codes":[]},"method":"post","results":{"codes":[{"code":"","language":"text"}]},"settings":"57ee593a21ceb20e0061959e","params":[{"name":"region","type":"string","default":"","desc":"Represents the country. Possible Values: `au`, `ca`","required":false,"in":"path","ref":"","_id":"57b6ec9e49a12a0e007b469d"},{"name":"type","type":"string","default":"","desc":"Represents the mandate type. Possible Values: `onetime`,`recurring`, `ondemand`","required":false,"in":"path","ref":"","_id":"61080fadeea914000fc20680"},{"name":"planid","type":"string","default":"","desc":"SKU number","required":false,"in":"query","ref":"","_id":"62e41f6a2b8c07001a5af226"},{"name":"overriderecurringchargeamount","type":"string","default":"","desc":"the amount which overrides recurring charge","required":false,"in":"query","ref":"","_id":"62e41f6a2b8c07001a5af227"}]},"next":{"description":"","pages":[]},"title":"Create Debit Agreement","type":"endpoint","slug":"create-debit-agreement","excerpt":"for Australia and Canada","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"This API can be used with BECS Direct Debit and Pre-Authorized Debit. Both are currently in Beta.\"\n}\n[/block]\nThe Create Debit Agreement request should generate a new mandate.\n\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\nEnter the `region` and `type` path parameters into the web service URL, in the format:\n`services/2/batch-transactions/:region/:type`\n\nFor example:\n`services/2/agreements/debit/ca/onetime`\n\nNext, add any query parameters you choose.\n\nFor example:\n`services/2/agreements/debit/ca/recurring?planId=2203220&overrideRecurringChargeAmount=23.85`\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK and will contain the agreement text.\n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/agreements/debit/ca/onetime \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\",\n      \"language\": \"curl\",\n      \"name\": \"Create Debit Agreement\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/agreements/debit/ca/recurring?planId=2203220&overrideRecurringChargeAmount=23.85 \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\",\n      \"language\": \"curl\",\n      \"name\": \"with planid, overriderecurringchargeamount\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"region\\\": \\\"Canada\\\",\\n    \\\"debitType\\\": \\\"ONETIME\\\",\\n    \\\"agreementName\\\": \\\"Pre-Authorized Debit Agreement\\\",\\n    \\\"agreementId\\\": 523,\\n    \\\"agreementText\\\": \\\"I / we authorize onboardingDefault to debit the bank account I / we have identified on any future purchase that I / we make. \\\\nThe amount debited should equal the checkout amount. \\\\nonboardingDefault is not required to get my / our authorization for any future sporadic debit. \\\\n\\\\nI / we may revoke this authority at any time, subject to providing notice of (30 days). \\\\nTo obtain a sample cancellation form, or for more information on my right to cancel a PAD Agreement, I may contact my financial institution or visit www.payments.ca \\\\n\\\\nonboardingDefault \\\\n303 Wyman Street, Suite 300  \\\\nCampbell, United States 02451 \\\\nTel: +1 (866) 312-7733\\\\nEmail: john.doe:::at:::bluesnap.com\\\\n\\\\nI have certain recourse rights if any debit does not comply with this agreement for example, I have the right to receive reimbursement for any debit that is not consistent with this PAD Agreement.  \\\\nTo obtain more information on my recourse rights, I may contact my financial institution or visit www.payments.ca.  \\\\n\\\\nI authorize BlueSnap, Inc to process payments on behalf of onboardingDefault.\\\",\\n    \\\"status\\\": \\\"UNUSED\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Create Debit Agreement: 200 OK\"\n    },\n    {\n      \"code\": \"{\\n    \\\"region\\\": \\\"Canada\\\",\\n    \\\"debitType\\\": \\\"RECURRING\\\",\\n    \\\"agreementName\\\": \\\"Pre-Authorized Debit Agreement\\\",\\n    \\\"agreementId\\\": 1069,\\n    \\\"agreementText\\\": \\\"I / we authorize Best Shop Ever to debit the bank account I / we have identified as per my instructions on the regular recurring payments for payments arising under my / our account.   \\n\\nI will be debited 23.85 USD on the 26th every 2 months (or around that day if it is not a business day).\\n\\nI / we may revoke this authority at any time, subject to providing notice of (30 days).\\n\\nTo obtain a sample cancellation form, or for more information on my right to cancel a PAD Agreement, I may contact my financial institution or visit www.payments.ca \\n\\nI/ we waive our right to receive pre-notification of the amount of the PAD and agreed that I/we do not require advance notice of the amount of PADs before the debit is processed.  \\n\\nBest Shop Ever\\n\\nApartment 10F 300 East 56 St  \\n\\nNew York, United States 10022  \\n\\nTel: +1-212-552-0482\\n\\nEmail: [email protected] \\n\\nI have certain recourse rights if any debit does not comply with this agreement for example, I have the right to receive reimbursement for any debit that is not consistent with this PAD Agreement.  \\n\\nTo obtain more information on my recourse rights, I may contact my financial institution or visit www.payments.ca.  \\n\\nI authorize BlueSnap, Inc to process payments on behalf of Best Shop Ever.\\\",\\n    \\\"status\\\": \\\"UNUSED\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with planid, overriderecurringchargeamount: 200 OK\"\n    }\n  ]\n}\n[/block]\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##Example Descriptions\nFor details about the above examples, see:\n\n* [Create Debit Agreement](https://developers.bluesnap.com/v8976-JSON/docs/create-debit-agreement#section-create-debit-agreement)\n* [With planid and overriderecurringchargeamount](https://developers.bluesnap.com/v8976-JSON/docs/create-debit-agreement#section-with-planid-and-overriderecurringchargeamount)\n\n### Create Debit Agreement\nThis example shows a Create Debit Agreement request that contains the path params: `region` and `type`.\n\n### With planid and overriderecurringchargeamount\nThis example shows a Create Debit Agreement request that contains the path parameters: `region` and `type` and the query parameters: `planid` and `overriderecurringchargeamount`.\n\n##API Explorer\nTo test a call, enter `region` and `type` into the available fields. This automatically inserts the ID into the request URL. You can use the use the values from the examples above as a as a starting point. Click **Try It** when you're ready to run your request.","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"62e41743505d06004b1bac8b","createdAt":"2022-07-29T17:22:11.619Z","user":"606df105d9ab93003f73cb10","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Mandates","slug":"mandates","order":17,"from_sync":false,"reference":false,"_id":"62e1d5717d2b2c0073d572f2","createdAt":"2022-07-28T00:16:49.375Z","version":"62e153e6f9a69e007d2a5dc1","project":"57336fd5a6a9c40e00e13a0b","__v":0},"version":{"version":"8976-JSON","version_clean":"8976.0.0-JSON","codename":"3.43 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["62e153e6f9a69e007d2a5d03","62e153e6f9a69e007d2a5d04","62e153e6f9a69e007d2a5d05","62e153e6f9a69e007d2a5d06","62e153e6f9a69e007d2a5d07","62e153e6f9a69e007d2a5d08","62e153e6f9a69e007d2a5d09","62e153e6f9a69e007d2a5d0a","62e153e6f9a69e007d2a5d0b","62e153e6f9a69e007d2a5d0c","62e153e6f9a69e007d2a5d0d","62e153e6f9a69e007d2a5d0e","62e153e6f9a69e007d2a5d0f","62e153e6f9a69e007d2a5d10","62e153e6f9a69e007d2a5d11","62e153e6f9a69e007d2a5d12","62e153e6f9a69e007d2a5d13","62e153e6f9a69e007d2a5d14","62e153e6f9a69e007d2a5d15","62e153e6f9a69e007d2a5d16","62e15419e4138b00a861da23","62e1c7b1fad68000919a63b4","62e1d5717d2b2c0073d572f2"],"_id":"62e153e6f9a69e007d2a5dc1","project":"57336fd5a6a9c40e00e13a0b","__v":3,"forked_from":"628531cd1258c8003f6dd27d","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z"},"project":"57336fd5a6a9c40e00e13a0b","__v":12,"parentDoc":null}

postCreate Debit Agreement

for Australia and Canada

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

region:
string
Represents the country. Possible Values: `au`, `ca`
type:
string
Represents the mandate type. Possible Values: `onetime`,`recurring`, `ondemand`

Query Params

planid:
string
SKU number
overriderecurringchargeamount:
string
the amount which overrides recurring charge

Documentation

This API can be used with BECS Direct Debit and Pre-Authorized Debit. Both are currently in Beta.

The Create Debit Agreement request should generate a new mandate.

Try it in the API Explorer

Request Content

Enter the region and type path parameters into the web service URL, in the format:
services/2/batch-transactions/:region/:type

For example:
services/2/agreements/debit/ca/onetime

Next, add any query parameters you choose.

For example:
services/2/agreements/debit/ca/recurring?planId=2203220&overrideRecurringChargeAmount=23.85

Response Details

If successful, the response HTTP status code is 200 OK and will contain the agreement text.


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/agreements/debit/ca/onetime \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
curl -v -X POST https://sandbox.bluesnap.com/services/2/agreements/debit/ca/recurring?planId=2203220&overrideRecurringChargeAmount=23.85 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

Response Examples

{
    "region": "Canada",
    "debitType": "ONETIME",
    "agreementName": "Pre-Authorized Debit Agreement",
    "agreementId": 523,
    "agreementText": "I / we authorize onboardingDefault to debit the bank account I / we have identified on any future purchase that I / we make. \nThe amount debited should equal the checkout amount. \nonboardingDefault is not required to get my / our authorization for any future sporadic debit. \n\nI / we may revoke this authority at any time, subject to providing notice of (30 days). \nTo obtain a sample cancellation form, or for more information on my right to cancel a PAD Agreement, I may contact my financial institution or visit www.payments.ca \n\nonboardingDefault \n303 Wyman Street, Suite 300  \nCampbell, United States 02451 \nTel: +1 (866) 312-7733\nEmail: [email protected]\n\nI have certain recourse rights if any debit does not comply with this agreement for example, I have the right to receive reimbursement for any debit that is not consistent with this PAD Agreement.  \nTo obtain more information on my recourse rights, I may contact my financial institution or visit www.payments.ca.  \n\nI authorize BlueSnap, Inc to process payments on behalf of onboardingDefault.",
    "status": "UNUSED"
}
{
    "region": "Canada",
    "debitType": "RECURRING",
    "agreementName": "Pre-Authorized Debit Agreement",
    "agreementId": 1069,
    "agreementText": "I / we authorize Best Shop Ever to debit the bank account I / we have identified as per my instructions on the regular recurring payments for payments arising under my / our account.   

I will be debited 23.85 USD on the 26th every 2 months (or around that day if it is not a business day).

I / we may revoke this authority at any time, subject to providing notice of (30 days).

To obtain a sample cancellation form, or for more information on my right to cancel a PAD Agreement, I may contact my financial institution or visit www.payments.ca 

I/ we waive our right to receive pre-notification of the amount of the PAD and agreed that I/we do not require advance notice of the amount of PADs before the debit is processed.  

Best Shop Ever

Apartment 10F 300 East 56 St  

New York, United States 10022  

Tel: +1-212-552-0482

Email: avish.yeshurun@bluesnap.com 

I have certain recourse rights if any debit does not comply with this agreement for example, I have the right to receive reimbursement for any debit that is not consistent with this PAD Agreement.  

To obtain more information on my recourse rights, I may contact my financial institution or visit www.payments.ca.  

I authorize BlueSnap, Inc to process payments on behalf of Best Shop Ever.",
    "status": "UNUSED"
}

Back to Top


Example Descriptions

For details about the above examples, see:

Create Debit Agreement

This example shows a Create Debit Agreement request that contains the path params: region and type.

With planid and overriderecurringchargeamount

This example shows a Create Debit Agreement request that contains the path parameters: region and type and the query parameters: planid and overriderecurringchargeamount.

API Explorer

To test a call, enter region and type into the available fields. This automatically inserts the ID into the request URL. You can use the use the values from the examples above as a as a starting point. Click Try It when you're ready to run your request.


User Information

Try It Out


post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}