Process Direct Debit Standalone Credit Split Payouts
POST /directdebit/v1/accounts/account_id/standalonecredits
During a Split Payouts Direct Debit Standalone Credit, a portion of the credit amount can be retrieved from one or more linked accounts.
The Direct Debit API enables you to credit specified accounts using the following bank payment schemes:
- ACH
- EFT
- SEPA
- BACS (can only be done using a payment token)
For the sake of brevity, the examples in this page are for EFT without a payment token. For examples of the other systems and how to credit bank accounts using a payment token see the API Reference.
To process a standalone credit, you must make a POST request to the standalone credits endpoint, replacing account_id with your unique merchant account number.
curl -X POST https://api.test.paysafe.com/directdebit/v1/accounts/89987201/standalonecredits \
-u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json' \
-d ' {
"merchantRefNum": "CREDIT_ID:1231",
"amount": 12020,
"eft": {
"accountHolderName": "First Company",
"accountNumber": "998772192",
"transitNumber": "22446",
"institutionId": "001",
"paymentDescriptor": "Transaction"
},
"billingDetails": {
"street": "100 Queen Street West",
"street2": "Apt. 55",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"zip": "M1M 1M1",
"phone": "6139991100"
},
"splitpay": [
{
"linkedAccount": "1001395900",
"percent": 5
},
{
"linkedAccount": "1001395910",
"amount": 500
}
]
} '
The following request attributes are required:
Value | Type | Description |
---|---|---|
amount | number | The amount of the request, in minor units of the currency of the merchant account specified using the account_id URL parameter. For example, to process US $10.99, this value should be 1099; to process 1000 Japanese yen, this value should be 1000; to process 10.139 Tunisian dinar, this value should be 10139. |
billingDetails | object | The customer's billing address details. This object is required for the request only when a payment token is not provided. |
eft | object | The details of the eft bank account or payment token used for the request. Replace this with the ach, sepa object or token, or bacs token as required. |
merchantRefNum | string | The merchant reference number created by the merchant and submitted as part of the request. It must be unique for each request. |
splitpay | array | Required only for a Split Payout credit. Defines the linked accounts and the amounts and settlement percentages they contribute to the credit. |
By default the Direct Debit processing system will check for duplicate transactions. Before trying the example, you should:
- Provide a unique merchant reference number for each transaction (if this value is not unique, and the number has been used in the past 90 days, the request will be flagged as a duplicate)
- Replace the account number (89987201 in the example above) in the URL with the test account number you received.
- Replace the API key (after the -u) with the API key you have received.
You can override the duplicate check by setting the dupCheck parameter to false, as in the following example: "dupCheck": "false",
{
"links":[
{
"rel":"self",
"href":"https://api.test.paysafe.com/directdebit/v1/accounts/89987201/standalonecredits/a02e52c7-c991-4418-966a-b62989cb0eae"
}
],
"id":"a02e52c7-c991-4418-966a-b62989cb0eae",
"dupCheck":true,
"merchantRefNum":"CREDIT_ID:1231",
"amount":12020,
"txnTime":"2014-12-14T15:12:18Z",
"currencyCode":"USD",
"status":"PENDING",
"customerIp":"192.0.126.111",
"eft":{
"accountHolderName":"First Company",
"transitNumber":"22446",
"institutionId":"001",
"lastDigits":"09",
"paymentDescriptor":"Transaction"
},
"profile":{
"firstName":"Joe",
"lastName":"Smith",
"email":"Joe.Smith@hotmail.com"
},
"billingDetails":{
"street":"100 Queen Street West",
"city":"Los Angeles",
"state":"CA",
"country":"US",
"zip":"90210",
"phone":"3102649010"
},
"splitpay":[
{
"linkedAccount":"1001395900",
"percent":5,
"amount":601
},
{
"linkedAccount":"1001395910",
"amount":500
}
]
}
In addition to the attributes in the request, the response also contains the following attributes:
Value | Type | Description |
---|---|---|
currencyCode | string | The currency of the merchant account, for example, USD. |
id | string | The response ID, which can be used to retrieve the response in the future. |
links | array | The endpoints to be targeted depending on the end state of the transaction. |
splitpay | array | The linked accounts and the amounts refunded. |
status | enum | The status of the transaction request. |
txnTime | string | The date and time the transaction was processed. |
The splitpay array contains one or more linked account objects:
Value | Type | Required? | Description | Example |
---|---|---|---|---|
linkedAccount | string | Yes | The ID of the linked account. This account must already be linked to the merchant account. | 123124124 |
amount | integer | Yes | The amount to transfer from the linked account in minor currency units. This is either the "amount" (if specified) in the request or - if "percent" was specified - the result of the percentage calculation. | 505 |
percent | number | No | The "percent" (if specified) in the request for the linked account, which is the percentage of the total transaction amount to transfer from that account. This is not returned if an "amount" was specified in the request. | 5.25 |
See our API Reference section for a list of all the JSON attributes and types available for the standalone credits endpoint.