{"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 Pre-Authorized Debit Transaction","type":"endpoint","slug":"create-pre-authorized-debit-transaction","excerpt":"","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"This payment method is currently in Beta.\"\n}\n[/block]\nThe Create Pre-Authorized Debit Transaction request performs a transaction (purchase) using the Pre-Authorized Direct Debit payment method. Note that the shopper's account is not immediately debited - it takes about 3 business days for the shopper's bank to approve the charge and for their account to be debited. For more information about this payment method, see the  [Pre-Authorized Direct Debit guide](https://support.bluesnap.com/docs/pre-authorized-debit-payments).\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 Pre-Authorized Direct Debit payment method. Click **Submit** to save your changes.\",\n  \"title\": \"Prerequisite: Enable the Pre-Authorized 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;`acssDirectDebitTransaction` &nbsp;&nbsp;&nbsp; *object* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required** (see [acssDirectDebitTransaction](https://developers.bluesnap.com/v8976-JSON/docs/acssdirectdebittransaction))\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    \\\"acssDirectDebitTransaction\\\": {\\n        \\\"routingNumber\\\": \\\"9999999999\\\",\\n        \\\"accountNumber\\\": \\\"4099999992\\\",\\n        \\\"accountType\\\": \\\"PERSONAL\\\",\\n        \\\"agreementId\\\": 87\\n    },\\n    \\\"amount\\\": 11,\\n    \\\"payerInfo\\\": {\\n        \\\"zip\\\": \\\"12345\\\",\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\",\\n        \\\"country\\\": \\\"CA\\\"\\n    },\\n    \\\"currency\\\": \\\"CAD\\\",\\n    \\\"authorizedByShopper\\\": true\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"Create Pre-Authorized 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  \\\"acssDirectDebitTransaction\\\": {\\n    \\\"routingNumber\\\": \\\"1234567806\\\",\\n    \\\"publicAccountNumber\\\": \\\"7772\\\",\\n    \\\"agreementId\\\": 87\\n  },\\n  \\\"amount\\\": 11,\\n  \\\"vaultedShopperId\\\": 19610966,\\n  \\\"currency\\\": \\\"CAD\\\",\\n  \\\"authorizedByShopper\\\": true\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"with vaulted shopper (multiple saved accounts)\"\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 (1 bank account)\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"transactionId\\\": \\\"38701842\\\",\\n    \\\"amount\\\": 11,\\n    \\\"currency\\\": \\\"CAD\\\",\\n    \\\"payerInfo\\\": {\\n        \\\"firstName\\\": \\\"John\\\",\\n        \\\"lastName\\\": \\\"Doe\\\",\\n        \\\"country\\\": \\\"ca\\\",\\n        \\\"zip\\\": \\\"12345\\\"\\n    },\\n    \\\"vaultedShopperId\\\": 19610966,\\n    \\\"acssDirectDebitTransaction\\\": {\\n        \\\"routingNumber\\\": \\\"9999999999\\\",\\n        \\\"accountType\\\": \\\"PERSONAL\\\",\\n        \\\"publicAccountNumber\\\": \\\"9992\\\",\\n        \\\"agreementId\\\": 87\\n    },\\n    \\\"processingInfo\\\": {\\n        \\\"processingStatus\\\": \\\"PENDING\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Create Pre-Authorized Direct Debit Transaction with guest shopper\"\n    },\n    {\n      \"code\": \"{\\n  \\\"transactionId\\\": \\\"38702780\\\",\\n  \\\"amount\\\": 11,\\n  \\\"currency\\\": \\\"CAD\\\",\\n  \\\"vaultedShopperId\\\": 19610966,\\n  \\\"acssDirectDebitTransaction\\\": {\\n    \\\"routingNumber\\\": \\\"1234567806\\\",\\n    \\\"accountType\\\": \\\"BUSINESS\\\",\\n    \\\"publicAccountNumber\\\": \\\"7772\\\",\\n    \\\"agreementId\\\": 87\\n  },\\n  \\\"processingInfo\\\": {\\n    \\\"processingStatus\\\": \\\"PENDING\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"with vaulted shopper (multiple saved accounts)\"\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 (1 bank account)\"\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 Pre-Authorized Direct Debit Transaction request, including the minimum required fields to process a Pre-Authorized Direct Debit transaction with basic information about the shopper.\n\nFor all Pre-Authorized Direct Debit transactions, you must obtain permission from the shopper to debit their account by having them authorize a mandate, known as a Pre-Authorized Debit Agreement.    \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 Pre-Authorized 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 Pre-Authorized Direct Debit Transaction request with an existing vaulted shopper. When you use a vaulted shopper, the acssDirectDebitTransaction property can be left empty, as shown in the example.\n\n### Create Pre-Authorized Direct Debit transaction with multiple vaulted Debit Accounts\nThis example shows a Create Pre-Authorized Direct Debit Transaction request when the customer has more than one debit account. When your vaulted shopper has multiple Pre-Authorized Direct Debit accounts use acssDirectDebitInfo to identify which debit 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  \\\"acssDirectDebitTransaction\\\": {\\n    \\\"routingNumber\\\": \\\"9999999999\\\",\\n    \\\"accountNumber\\\": \\\"4099999992\\\",\\n    \\\"accountType\\\": \\\"PERSONAL\\\",\\n    \\\"agreementId\\\": 87\\n  },\\n  \\\"amount\\\": 11,\\n  \\\"payerInfo\\\": {\\n    \\\"zip\\\": \\\"12345\\\",\\n    \\\"firstName\\\": \\\"John\\\",\\n    \\\"lastName\\\": \\\"Doe\\\",\\n    \\\"country\\\": \\\"CA\\\"\\n  },\\n  \\\"currency\\\": \\\"CAD\\\",\\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":"62e1c927bd17df0013dab1a4","createdAt":"2022-07-27T23:24:23.550Z","user":"606df105d9ab93003f73cb10","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Pre-Authorized Debit Transactions","slug":"pre-authorized-debit-transaction","order":7,"from_sync":false,"reference":false,"_id":"62e1c7b1fad68000919a63b4","createdAt":"2022-07-27T23:18:09.098Z","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 Pre-Authorized Debit Transaction


Definition

{{ api_url }}{{ page_api_url }}

Documentation

This payment method is currently in Beta.

The Create Pre-Authorized Debit Transaction request performs a transaction (purchase) using the Pre-Authorized Direct Debit payment method. Note that the shopper's account is not immediately debited - it takes about 3 business days for the shopper's bank to approve the charge and for their account to be debited. For more information about this payment method, see the Pre-Authorized Direct Debit guide.

Prerequisite: Enable the Pre-Authorized 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 Pre-Authorized 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
      acssDirectDebitTransaction     object    required (see acssDirectDebitTransaction)
      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 '
{
    "acssDirectDebitTransaction": {
        "routingNumber": "9999999999",
        "accountNumber": "4099999992",
        "accountType": "PERSONAL",
        "agreementId": 87
    },
    "amount": 11,
    "payerInfo": {
        "zip": "12345",
        "firstName": "John",
        "lastName": "Doe",
        "country": "CA"
    },
    "currency": "CAD",
    "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 '
{
  "acssDirectDebitTransaction": {
    "routingNumber": "1234567806",
    "publicAccountNumber": "7772",
    "agreementId": 87
  },
  "amount": 11,
  "vaultedShopperId": 19610966,
  "currency": "CAD",
  "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
}

Response Examples

{
    "transactionId": "38701842",
    "amount": 11,
    "currency": "CAD",
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe",
        "country": "ca",
        "zip": "12345"
    },
    "vaultedShopperId": 19610966,
    "acssDirectDebitTransaction": {
        "routingNumber": "9999999999",
        "accountType": "PERSONAL",
        "publicAccountNumber": "9992",
        "agreementId": 87
    },
    "processingInfo": {
        "processingStatus": "PENDING"
    }
}
{
  "transactionId": "38702780",
  "amount": 11,
  "currency": "CAD",
  "vaultedShopperId": 19610966,
  "acssDirectDebitTransaction": {
    "routingNumber": "1234567806",
    "accountType": "BUSINESS",
    "publicAccountNumber": "7772",
    "agreementId": 87
  },
  "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"
  }
}

Back to Top


Example Descriptions

Create BECS Direct Debit transaction with guest shopper

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

For all Pre-Authorized Direct Debit transactions, you must obtain permission from the shopper to debit their account by having them authorize a mandate, known as a Pre-Authorized Debit Agreement.

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 Pre-Authorized 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 Pre-Authorized Direct Debit Transaction request with an existing vaulted shopper. When you use a vaulted shopper, the acssDirectDebitTransaction property can be left empty, as shown in the example.

Create Pre-Authorized Direct Debit transaction with multiple vaulted Debit Accounts

This example shows a Create Pre-Authorized Direct Debit Transaction request when the customer has more than one debit account. When your vaulted shopper has multiple Pre-Authorized Direct Debit accounts use acssDirectDebitInfo to identify which debit 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.

{
  "acssDirectDebitTransaction": {
    "routingNumber": "9999999999",
    "accountNumber": "4099999992",
    "accountType": "PERSONAL",
    "agreementId": 87
  },
  "amount": 11,
  "payerInfo": {
    "zip": "12345",
    "firstName": "John",
    "lastName": "Doe",
    "country": "CA"
  },
  "currency": "CAD",
  "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 }}