curl --request POST \
--url https://api.anchorage-staging.com/v2/transactions/ach-debit-in \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "250.00",
"assetType": "USD",
"destination": {
"id": "<string>",
"type": "WALLET",
"virtualAccountId": "<string>"
},
"idempotentId": "12838927347",
"source": {
"processorToken": "<string>",
"type": "PLAID_PROCESSOR_TOKEN"
},
"remittanceInformation": "<string>",
"sameDayAch": false,
"statementDescriptor": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/transactions/ach-debit-in"
payload = {
"amount": "250.00",
"assetType": "USD",
"destination": {
"id": "<string>",
"type": "WALLET",
"virtualAccountId": "<string>"
},
"idempotentId": "12838927347",
"source": {
"processorToken": "<string>",
"type": "PLAID_PROCESSOR_TOKEN"
},
"remittanceInformation": "<string>",
"sameDayAch": False,
"statementDescriptor": "<string>"
}
headers = {
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '250.00',
assetType: 'USD',
destination: {id: '<string>', type: 'WALLET', virtualAccountId: '<string>'},
idempotentId: '12838927347',
source: {processorToken: '<string>', type: 'PLAID_PROCESSOR_TOKEN'},
remittanceInformation: '<string>',
sameDayAch: false,
statementDescriptor: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v2/transactions/ach-debit-in', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"transactionId": "8696144cca28a634c05858d00e51191408498a7808a837fc4645b4b6997dde09"
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Create an ACH debit in request
Permissions required: Initiate ACH Debit In
Idempotency
A valid request that repeats an idempotentId returns the same transaction ID with a 201 and does not start a second debit, even when its body differs or the first debit ended failed. Reuse an idempotentId only to resend the same request. To try a failed debit again, send a new idempotentId.
Permissions
A 403 with the message “Forbidden” means the API key lacks the Initiate ACH Debit In permission for the destination wallet’s vault. A 403 with the message “ACH Debit In is not enabled for this organization” means your organization is not enabled for ACH Debit In. A 403 with the message “ACH Debit In bank-account source is not enabled for this organization” means your organization is not enabled for the BANK_ACCOUNT source.
Result
The result of the debit arrives by ach-debit-in webhooks.
curl --request POST \
--url https://api.anchorage-staging.com/v2/transactions/ach-debit-in \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "250.00",
"assetType": "USD",
"destination": {
"id": "<string>",
"type": "WALLET",
"virtualAccountId": "<string>"
},
"idempotentId": "12838927347",
"source": {
"processorToken": "<string>",
"type": "PLAID_PROCESSOR_TOKEN"
},
"remittanceInformation": "<string>",
"sameDayAch": false,
"statementDescriptor": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/transactions/ach-debit-in"
payload = {
"amount": "250.00",
"assetType": "USD",
"destination": {
"id": "<string>",
"type": "WALLET",
"virtualAccountId": "<string>"
},
"idempotentId": "12838927347",
"source": {
"processorToken": "<string>",
"type": "PLAID_PROCESSOR_TOKEN"
},
"remittanceInformation": "<string>",
"sameDayAch": False,
"statementDescriptor": "<string>"
}
headers = {
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '250.00',
assetType: 'USD',
destination: {id: '<string>', type: 'WALLET', virtualAccountId: '<string>'},
idempotentId: '12838927347',
source: {processorToken: '<string>', type: 'PLAID_PROCESSOR_TOKEN'},
remittanceInformation: '<string>',
sameDayAch: false,
statementDescriptor: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v2/transactions/ach-debit-in', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"transactionId": "8696144cca28a634c05858d00e51191408498a7808a837fc4645b4b6997dde09"
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Headers
A hex-encoded Ed25519 signature of timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body.
Construction example:
toHex(
ed25519Sign(
signing_key,
'{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
)
)
^[0-9A-Fa-f]{128,160}$Body
Was this page helpful?