{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/alt-transactions","auth":"optional","results":{"codes":[{"code":"","language":"text"}]},"settings":"57ee593a21ceb20e0061959e","examples":{"codes":[]},"method":"post","params":[]},"next":{"description":"","pages":[]},"title":"Create BECS Direct Debit Transaction","type":"endpoint","slug":"create-becs-transaction","excerpt":"","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"This payment method is currently in Beta.\"\n}\n[/block]\nThe Create BECS Direct Debit Transaction request performs a transaction (purchase) using the BECS Direct Debit payment method. For more information about this payment method, see the  [BECS Direct Debit guide](https://support.bluesnap.com/docs/becs-direct-debit).\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"In the Merchant Portal, go to **Checkout Page** > **Payment Methods **and select **Show** in the menu next to the BECS Direct Debit payment method. Click **Submit** to save your changes.\",\n  \"title\": \"Prerequisite: Enable the BECS Direct Debit payment method in your account\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\nSend an **[altTransaction](doc:alt-transaction)** object with the following:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`merchantTransactionId` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`softDescriptor` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`amount` &nbsp;&nbsp;&nbsp; *decimal* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`currency` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`taxReference` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vendorsInfo` *object* &nbsp;&nbsp;&nbsp;optional (see [vendorsInfo](doc:vendorsinfo))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`payerInfo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;<span style=\"color:#F38A00\">**required** if `vaultedShopperId` is not sent</span> (see [payerInfo](doc:payer-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaultedShopperId` &nbsp;&nbsp;&nbsp; *integer* &nbsp;&nbsp;&nbsp;<span style=\"color:#F38A00\">**required** if `payerInfo` is not sent</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`pfToken` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`becsDirectDebitTransaction` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [becsDirectDebitTransaction](https://developers.bluesnap.com/v8976-JSON/docs/becsdirectdebittransaction))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`authorizedByShopper` &nbsp;&nbsp;&nbsp; *boolean* &nbsp;&nbsp;&nbsp;<span style=\"color:#F38A00\">**required**, value must be **true**</span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionMetaData` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transactionMetaData](doc:transaction-meta-data))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionFraudInfo` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;optional (see [transactionFraudInfo](doc:transaction-fraud-info))\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the request properties plus these additions:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionId`\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`vaultedShopperId`\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`processingInfo`&nbsp;&nbsp;&nbsp;(see [processingInfo](doc:processing-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`fraudResultInfo`&nbsp;&nbsp;&nbsp;(see [fraudResultInfo](doc:fraud-result-info))\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/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"becsDirectDebitTransaction\\\": {\\n        \\\"bsbNumber\\\": \\\"980201\\\",\\n        \\\"accountNumber\\\": \\\"9990000002\\\",\\n        \\\"accountName\\\": \\\"Boris Britva\\\",\\n        \\\"financialInstitution\\\": \\\"financialInstitution\\\",\\n        \\\"branchName\\\": \\\"branchName\\\",\\n        \\\"agreementId\\\": 81\\n    },\\n    \\\"amount\\\": 77,\\n    \\\"payerInfo\\\": {\\n        \\\"zip\\\": \\\"12345\\\",\\n        \\\"firstName\\\": \\\"Boris\\\",\\n        \\\"lastName\\\": \\\"Britva\\\",\\n        \\\"country\\\": \\\"au\\\"\\n    },\\n    \\\"currency\\\": \\\"AUD\\\",\\n    \\\"authorizedByShopper\\\": true\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"Create BECS Direct Debit Transaction with guest shopper\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n\\\"becsDirectDebitTransaction\\\": {},\\n\\\"amount\\\": 11,\\n\\\"currency\\\": \\\"AUD\\\",\\n\\\"vaultedShopperId\\\":19610968,\\n\\\"authorizedByShopper\\\": true\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"with vaulted shopper (one saved account)\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n\\\"becsDirectDebitTransaction\\\": {\\n\\\"bsbNumber\\\": \\\"951000\\\",\\n\\\"publicAccountNumber\\\": \\\"5557\\\",\\n\\\"agreementId\\\": 81\\n},\\n\\\"amount\\\": 11,\\n\\\"currency\\\": \\\"AUD\\\",\\n\\\"vaultedShopperId\\\":19602910,\\n\\\"authorizedByShopper\\\": true\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"with vaulted shopper (multiple saved accounts)\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"transactionId\\\": \\\"38701844\\\",\\n    \\\"amount\\\": 77,\\n    \\\"currency\\\": \\\"AUD\\\",\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"Boris\\\",\\n        \\\"lastName\\\": \\\"Britva\\\",\\n        \\\"country\\\": \\\"au\\\",\\n        \\\"zip\\\": \\\"12345\\\"\\n    },\\n    \\\"vaultedShopperId\\\": 19610968,\\n    \\\"becsDirectDebitTransaction\\\": {\\n        \\\"bsbNumber\\\": \\\"980201\\\",\\n        \\\"accountName\\\": \\\"Boris Britva\\\",\\n        \\\"financialInstitution\\\": \\\"financialInstitution\\\",\\n        \\\"branchName\\\": \\\"branchName\\\",\\n        \\\"publicAccountNumber\\\": \\\"0002\\\",\\n        \\\"agreementId\\\": 81,\\n        \\\"preNotificationRef\\\": \\\"https://localhost:8444/services/2/agreements/prenotification/38701844\\\"\\n    },\\n    \\\"processingInfo\\\": {\\n        \\\"processingStatus\\\": \\\"PENDING\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Create BECS Direct Debit Transaction with guest shopper\"\n    },\n    {\n      \"code\": \"{\\n\\\"transactionId\\\": \\\"38702772\\\",\\n\\\"amount\\\": 11,\\n\\\"currency\\\": \\\"AUD\\\",\\n\\\"vaultedShopperId\\\": 19610968,\\n\\\"becsDirectDebitTransaction\\\": {\\n\\\"bsbNumber\\\": \\\"980201\\\",\\n\\\"accountName\\\": \\\"Boris Britva\\\",\\n\\\"financialInstitution\\\": \\\"financialInstitution\\\",\\n\\\"branchName\\\": \\\"branchName\\\",\\n\\\"publicAccountNumber\\\": \\\"0002\\\",\\n\\\"agreementId\\\": 81,\\n\\\"preNotificationRef\\\": \\\"https://localhost:8444/services/2/agreements/prenotification/38702772\\\"\\n},\\n\\\"processingInfo\\\": {\\n\\\"processingStatus\\\": \\\"PENDING\\\"\\n}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with vaulted shopper (one saved account)\"\n    },\n    {\n      \"code\": \"{\\n\\\"transactionId\\\": \\\"38702776\\\",\\n\\\"amount\\\": 11,\\n\\\"currency\\\": \\\"AUD\\\",\\n\\\"vaultedShopperId\\\": 19602910,\\n\\\"becsDirectDebitTransaction\\\": {\\n\\\"bsbNumber\\\": \\\"951000\\\",\\n\\\"accountName\\\": \\\"Vasya Pupkin\\\",\\n\\\"financialInstitution\\\": \\\"financialInstitution\\\",\\n\\\"branchName\\\": \\\"branchName\\\",\\n\\\"publicAccountNumber\\\": \\\"5557\\\",\\n\\\"agreementId\\\": 81,\\n\\\"preNotificationRef\\\": \\\"https://localhost:8444/services/2/agreements/prenotification/38702776\\\"\\n},\\n\\\"processingInfo\\\": {\\n\\\"processingStatus\\\": \\\"PENDING\\\"\\n}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with vaulted shopper (multiple saved accounts)\"\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\n\n### Create BECS Direct Debit transaction with guest shopper\nThis example shows a basic create BECS Direct Debit Transaction request, including the minimum required fields to process a BECS Direct Debit transaction with basic information about a guest shopper.\n\nFor all BECS Direct Debit transactions, you must obtain permission from the shopper to debit their account by having them authorize the mandate.   \n\nInclude the authorizedByShopper element with the value set to true to indicate that you have obtained the shopper's permission.\n\n### Create BECS Direct Debit transaction with Vaulted Shopper\nTo perform a BECS Direct Debit Transaction with an existing vaulted shopper (with saved bank account details), you must include the vaultedShopperId property within the [altTransaction](https://developers.bluesnap.com/v8976-JSON/docs/alt-transaction) resource in your request.\n\nAbove is an example of a Create BECS Direct Debit Transaction request with an existing vaulted shopper. When you use a vaulted shopper, the becsDirectDebitTransaction property can be left empty, as shown in the example.\n\n### Create BECS Direct Debit transaction with multiple vaulted Bank Accounts\nThis example shows a Create BECS Direct Debit Transaction request when the customer has more than one BECS Direct Debit account. When your vaulted shopper has multiple BECS Direct Debit accounts use becsDirectDebitInfo to identify which bank account to use for the transaction.\n\n\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##API Explorer\nTo test out a call, enter the request content below and then click **Try it!**\n\n**Tip**: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. *The request headers, including authorization, are already built in for you in this test area, so you should not include them here.*\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"becsDirectDebitTransaction\\\": {\\n        \\\"bsbNumber\\\": \\\"980201\\\",\\n        \\\"accountNumber\\\": \\\"9990000002\\\",\\n        \\\"accountName\\\": \\\"Boris Britva\\\",\\n        \\\"financialInstitution\\\": \\\"financialInstitution\\\",\\n        \\\"branchName\\\": \\\"branchName\\\",\\n        \\\"agreementId\\\": 81\\n    },\\n    \\\"amount\\\": 77,\\n    \\\"payerInfo\\\": {\\n        \\\"zip\\\": \\\"12345\\\",\\n        \\\"firstName\\\": \\\"Boris\\\",\\n        \\\"lastName\\\": \\\"Britva\\\",\\n        \\\"country\\\": \\\"au\\\"\\n    },\\n    \\\"currency\\\": \\\"AUD\\\",\\n    \\\"authorizedByShopper\\\": true\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"62e15433525d19075b42b1b8","createdAt":"2022-07-27T15:05:23.318Z","user":"606df105d9ab93003f73cb10","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"BECS Direct Debit Transactions","slug":"becs","order":4,"from_sync":false,"reference":false,"_id":"62e15419e4138b00a861da23","createdAt":"2022-07-27T15:04:57.331Z","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":0,"parentDoc":null}

postCreate BECS Direct Debit Transaction


Definition

{{ api_url }}{{ page_api_url }}

Documentation

This payment method is currently in Beta.

The Create BECS Direct Debit Transaction request performs a transaction (purchase) using the BECS Direct Debit payment method. For more information about this payment method, see the BECS Direct Debit guide.

Prerequisite: Enable the BECS Direct Debit payment method in your account

In the Merchant Portal, go to Checkout Page > Payment Methods and select Show in the menu next to the BECS Direct Debit payment method. Click Submit to save your changes.

Try it in the API Explorer

Request Content

Send an altTransaction object with the following:

      merchantTransactionId     string    optional
      softDescriptor     string    optional
      amount     decimal    required
      currency     string    required
      taxReference     string    optional
      vendorsInfo object    optional (see vendorsInfo)
      payerInfo     object    required if vaultedShopperId is not sent (see payerInfo)
      vaultedShopperId     integer    required if payerInfo is not sent
      pfToken     string    optional
      becsDirectDebitTransaction     object    required (see becsDirectDebitTransaction)
      authorizedByShopper     boolean    required, value must be true
      transactionMetaData     object    optional (see transactionMetaData)
      transactionFraudInfo     object    optional (see transactionFraudInfo)

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the request properties plus these additions:

      transactionId
      vaultedShopperId
      processingInfo   (see processingInfo)
      fraudResultInfo   (see fraudResultInfo)


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "becsDirectDebitTransaction": {
        "bsbNumber": "980201",
        "accountNumber": "9990000002",
        "accountName": "Boris Britva",
        "financialInstitution": "financialInstitution",
        "branchName": "branchName",
        "agreementId": 81
    },
    "amount": 77,
    "payerInfo": {
        "zip": "12345",
        "firstName": "Boris",
        "lastName": "Britva",
        "country": "au"
    },
    "currency": "AUD",
    "authorizedByShopper": true
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"becsDirectDebitTransaction": {},
"amount": 11,
"currency": "AUD",
"vaultedShopperId":19610968,
"authorizedByShopper": true
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/alt-transactions/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"becsDirectDebitTransaction": {
"bsbNumber": "951000",
"publicAccountNumber": "5557",
"agreementId": 81
},
"amount": 11,
"currency": "AUD",
"vaultedShopperId":19602910,
"authorizedByShopper": true
}

Response Examples

{
    "transactionId": "38701844",
    "amount": 77,
    "currency": "AUD",
    "payerInfo": {
        "firstName": "Boris",
        "lastName": "Britva",
        "country": "au",
        "zip": "12345"
    },
    "vaultedShopperId": 19610968,
    "becsDirectDebitTransaction": {
        "bsbNumber": "980201",
        "accountName": "Boris Britva",
        "financialInstitution": "financialInstitution",
        "branchName": "branchName",
        "publicAccountNumber": "0002",
        "agreementId": 81,
        "preNotificationRef": "https://localhost:8444/services/2/agreements/prenotification/38701844"
    },
    "processingInfo": {
        "processingStatus": "PENDING"
    }
}
{
"transactionId": "38702772",
"amount": 11,
"currency": "AUD",
"vaultedShopperId": 19610968,
"becsDirectDebitTransaction": {
"bsbNumber": "980201",
"accountName": "Boris Britva",
"financialInstitution": "financialInstitution",
"branchName": "branchName",
"publicAccountNumber": "0002",
"agreementId": 81,
"preNotificationRef": "https://localhost:8444/services/2/agreements/prenotification/38702772"
},
"processingInfo": {
"processingStatus": "PENDING"
}
}
{
"transactionId": "38702776",
"amount": 11,
"currency": "AUD",
"vaultedShopperId": 19602910,
"becsDirectDebitTransaction": {
"bsbNumber": "951000",
"accountName": "Vasya Pupkin",
"financialInstitution": "financialInstitution",
"branchName": "branchName",
"publicAccountNumber": "5557",
"agreementId": 81,
"preNotificationRef": "https://localhost:8444/services/2/agreements/prenotification/38702776"
},
"processingInfo": {
"processingStatus": "PENDING"
}
}

Back to Top


Example Descriptions

Create BECS Direct Debit transaction with guest shopper

This example shows a basic create BECS Direct Debit Transaction request, including the minimum required fields to process a BECS Direct Debit transaction with basic information about a guest shopper.

For all BECS Direct Debit transactions, you must obtain permission from the shopper to debit their account by having them authorize the mandate.

Include the authorizedByShopper element with the value set to true to indicate that you have obtained the shopper's permission.

Create BECS Direct Debit transaction with Vaulted Shopper

To perform a BECS Direct Debit Transaction with an existing vaulted shopper (with saved bank account details), you must include the vaultedShopperId property within the altTransaction resource in your request.

Above is an example of a Create BECS Direct Debit Transaction request with an existing vaulted shopper. When you use a vaulted shopper, the becsDirectDebitTransaction property can be left empty, as shown in the example.

Create BECS Direct Debit transaction with multiple vaulted Bank Accounts

This example shows a Create BECS Direct Debit Transaction request when the customer has more than one BECS Direct Debit account. When your vaulted shopper has multiple BECS Direct Debit accounts use becsDirectDebitInfo to identify which bank account to use for the transaction.



Back to Top


API Explorer

To test out a call, enter the request content below and then click Try it!

Tip: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.

{
    "becsDirectDebitTransaction": {
        "bsbNumber": "980201",
        "accountNumber": "9990000002",
        "accountName": "Boris Britva",
        "financialInstitution": "financialInstitution",
        "branchName": "branchName",
        "agreementId": 81
    },
    "amount": 77,
    "payerInfo": {
        "zip": "12345",
        "firstName": "Boris",
        "lastName": "Britva",
        "country": "au"
    },
    "currency": "AUD",
    "authorizedByShopper": true
}

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 }}