Supply merchant_id and transactions at the top level, with 1–100 transactions per batch. Each transaction requires trans_func, amount, merchant_order_no and currency, plus the fields below.
bank_account.bsb, bank_account.account_no, bank_account.account_name; this transaction uses the bank account, so omit card because it is not used for payment
Batches do not support token creation, checkout or 3DS. is3ds and return_url are not supported row parameters. Optional process_date must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded.
Submit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status.
Per-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry.
All examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.
List of 1 to 100 transactions. Ordinary per-transaction validation failures do not prevent other valid transactions from being accepted; malformed structures or processing exceptions may fail the entire batch.
Required array length: 1 - 100 elements
Show child attributes
Response
HTTP 200. Distinguish success, business errors, validation errors and business authentication errors using the response body code.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"BillBuddy API","colors":{"primary":"#2563EB","light":"#2563EB","dark":"#60A5FA"},"api":{"playground":{"display":"interactive","proxy":false},"examples":{"defaults":"all","languages":["curl","python","javascript","php","go","java","ruby"],"autogenerate":false}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"en/introduction"},{"language":"cn","href":"cn/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bill-buddy","hasAudioNarration":false,"actualSubdomain":"bill-buddy","customDomains":[],"gitSource":{"type":"github","owner":"billbuddyteam","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6ae2c549e7eb44cacb512b71"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae45ce25507c0d0db07e2f8","collectionId":"4d6950a8-fc85-48ee-9f6b-6507ae37afd6","liveDeploymentHistoryId":"6ae45ce25507c0d0db07e2f8","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae46817187ae8fd10debe8f","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"cn","tag":"API 参考","count":12},{"language":"en","tag":"API reference","count":12},{"language":"cn","tag":"交易","count":7},{"language":"en","tag":"Transactions","count":7},{"language":"cn","tag":"订阅","count":4},{"language":"en","tag":"Subscriptions","count":4},{"language":"cn","tag":"接入指南","count":2},{"language":"cn","tag":"开始接入","count":2},{"language":"en","tag":"Integration guide","count":2},{"language":"en","tag":"Get started","count":2},{"language":"cn","tag":"认证","count":1},{"language":"en","tag":"Authentication","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/api-reference/transactions/batch-direct-pay","slug":"/en/api-reference/transactions/batch-direct-pay","pageMetadata":{"title":"Create batch direct payments","description":"### Parameters for each transaction\n\nSupply `merchant_id` and `transactions` at the top level, with 1–100 transactions per batch. Each transaction requires `trans_func`, `amount`, `merchant_order_no` and `currency`, plus the fields below.\n\n| trans_func | Operation | Additional required fields per transaction |\n| --- | --- | --- |\n| 2 | Token payment | `card_token`, `first_name`, `last_name` |\n| 3 | Card number payment | `card.card_number`, `card.expiration_month`, `card.expiration_year`, `card.security_code`, `first_name`, `last_name` |\n| 5 | Bank account payment | `bank_account.bsb`, `bank_account.account_no`, `bank_account.account_name`; this transaction uses the bank account, so omit `card` because it is not used for payment |\n\nBatches do not support token creation, checkout or 3DS. `is3ds` and `return_url` are not supported row parameters. Optional `process_date` must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded.\n\nSubmit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status.\n\nPer-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry.\n\nAll examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.","deprecated":null,"version":null,"sidebarTitle":"Create batch direct payments","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /api/v2/trans/batchDirectPay","href":"/en/api-reference/transactions/batch-direct-pay","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n h3: \"h3\",\n p: \"p\",\n table: \"table\",\n tbody: \"tbody\",\n td: \"td\",\n th: \"th\",\n thead: \"thead\",\n tr: \"tr\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.h3, {\n children: \"Parameters for each transaction\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Supply \", _jsx(_components.code, {\n children: \"merchant_id\"\n }), \" and \", _jsx(_components.code, {\n children: \"transactions\"\n }), \" at the top level, with 1–100 transactions per batch. Each transaction requires \", _jsx(_components.code, {\n children: \"trans_func\"\n }), \", \", _jsx(_components.code, {\n children: \"amount\"\n }), \", \", _jsx(_components.code, {\n children: \"merchant_order_no\"\n }), \" and \", _jsx(_components.code, {\n children: \"currency\"\n }), \", plus the fields below.\"]\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: \"trans_func\"\n }), _jsx(_components.th, {\n children: \"Operation\"\n }), _jsx(_components.th, {\n children: \"Additional required fields per transaction\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"2\"\n }), _jsx(_components.td, {\n children: \"Token payment\"\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"card_token\"\n }), \", \", _jsx(_components.code, {\n children: \"first_name\"\n }), \", \", _jsx(_components.code, {\n children: \"last_name\"\n })]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"3\"\n }), _jsx(_components.td, {\n children: \"Card number payment\"\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"card.card_number\"\n }), \", \", _jsx(_components.code, {\n children: \"card.expiration_month\"\n }), \", \", _jsx(_components.code, {\n children: \"card.expiration_year\"\n }), \", \", _jsx(_components.code, {\n children: \"card.security_code\"\n }), \", \", _jsx(_components.code, {\n children: \"first_name\"\n }), \", \", _jsx(_components.code, {\n children: \"last_name\"\n })]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"5\"\n }), _jsx(_components.td, {\n children: \"Bank account payment\"\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"bank_account.bsb\"\n }), \", \", _jsx(_components.code, {\n children: \"bank_account.account_no\"\n }), \", \", _jsx(_components.code, {\n children: \"bank_account.account_name\"\n }), \"; this transaction uses the bank account, so omit \", _jsx(_components.code, {\n children: \"card\"\n }), \" because it is not used for payment\"]\n })]\n })]\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Batches do not support token creation, checkout or 3DS. \", _jsx(_components.code, {\n children: \"is3ds\"\n }), \" and \", _jsx(_components.code, {\n children: \"return_url\"\n }), \" are not supported row parameters. Optional \", _jsx(_components.code, {\n children: \"process_date\"\n }), \" must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Submit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Per-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"All examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.\"\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create batch direct payments","description":"### Parameters for each transaction\n\nSupply `merchant_id` and `transactions` at the top level, with 1–100 transactions per batch. Each transaction requires `trans_func`, `amount`, `merchant_order_no` and `currency`, plus the fields below.\n\n| trans_func | Operation | Additional required fields per transaction |\n| --- | --- | --- |\n| 2 | Token payment | `card_token`, `first_name`, `last_name` |\n| 3 | Card number payment | `card.card_number`, `card.expiration_month`, `card.expiration_year`, `card.security_code`, `first_name`, `last_name` |\n| 5 | Bank account payment | `bank_account.bsb`, `bank_account.account_no`, `bank_account.account_name`; this transaction uses the bank account, so omit `card` because it is not used for payment |\n\nBatches do not support token creation, checkout or 3DS. `is3ds` and `return_url` are not supported row parameters. Optional `process_date` must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded.\n\nSubmit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status.\n\nPer-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry.\n\nAll examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.","deprecated":null,"version":null,"sidebarTitle":"Create batch direct payments","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /api/v2/trans/batchDirectPay","href":"/en/api-reference/transactions/batch-direct-pay","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Transactions"],"operationId":"v2BatchDirectPay","summary":"Create batch direct payments","description":"### Parameters for each transaction\n\nSupply `merchant_id` and `transactions` at the top level, with 1–100 transactions per batch. Each transaction requires `trans_func`, `amount`, `merchant_order_no` and `currency`, plus the fields below.\n\n| trans_func | Operation | Additional required fields per transaction |\n| --- | --- | --- |\n| 2 | Token payment | `card_token`, `first_name`, `last_name` |\n| 3 | Card number payment | `card.card_number`, `card.expiration_month`, `card.expiration_year`, `card.security_code`, `first_name`, `last_name` |\n| 5 | Bank account payment | `bank_account.bsb`, `bank_account.account_no`, `bank_account.account_name`; this transaction uses the bank account, so omit `card` because it is not used for payment |\n\nBatches do not support token creation, checkout or 3DS. `is3ds` and `return_url` are not supported row parameters. Optional `process_date` must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded.\n\nSubmit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status.\n\nPer-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry.\n\nAll examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.","security":["63c5184f-7602-4be1-ae8d-f4a7e5954860"],"responses":{"200":"5ba32dc2-2828-4c73-b19e-62d819d5cc06","429":"a05ce2fb-8f03-4836-981f-1dfeb9f567f5"},"requestBody":"5d675088-59f5-43f4-bc79-55300fa8f7fa","x-codeSamples":[{"lang":"Shell","label":"Batch payment request","source":"curl -X POST \"${BASE_URL}/api/v2/trans/batchDirectPay\" \\\n -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n -H \"Accept: application/json\" \\\n -H \"Content-Type: application/json\" \\\n --data-raw '{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}'"},{"lang":"Python","label":"Batch payment request","source":"import json\nimport os\nimport urllib.parse\nimport urllib.request\n\nbase_url = os.environ[\"BASE_URL\"].rstrip(\"/\")\nurl = base_url + \"/api/v2/trans/batchDirectPay\"\nheaders = {\"Accept\": \"application/json\"}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"ACCESS_TOKEN\"]\npayload = json.loads(r'''{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}''')\nbody = json.dumps(payload).encode(\"utf-8\")\nheaders[\"Content-Type\"] = \"application/json\"\n\nrequest = urllib.request.Request(url, data=body, headers=headers, method=\"POST\")\nwith urllib.request.urlopen(request, timeout=30) as response:\n print(response.read().decode(\"utf-8\"))\n"},{"lang":"JavaScript","label":"Batch payment request","source":"const env = (name) => {\n const value = process.env[name];\n if (!value) throw new Error(`Missing environment variable: ${name}`);\n return value;\n};\nconst baseUrl = env(\"BASE_URL\").replace(/\\/+$/, \"\");\nconst url = new URL(baseUrl + \"/api/v2/trans/batchDirectPay\");\nconst headers = { Accept: \"application/json\" };\nheaders.Authorization = `Bearer ${env(\"ACCESS_TOKEN\")}`;\nconst payload = {\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n};\nconst body = JSON.stringify(payload);\nheaders[\"Content-Type\"] = \"application/json\";\n\nconst response = await fetch(url, {\n method: \"POST\",\n headers,\n body,\n signal: AbortSignal.timeout(30_000),\n});\nconsole.log(await response.text());\n"},{"lang":"PHP","label":"Batch payment request","source":"\u003c?php\n$env = static function (string $name): string {\n $value = getenv($name);\n if ($value === false || $value === '') {\n throw new RuntimeException(\"Missing environment variable: \" . $name);\n }\n return $value;\n};\n$baseUrl = rtrim($env('BASE_URL'), '/');\n$url = $baseUrl . \"/api/v2/trans/batchDirectPay\";\n$headers = ['Accept: application/json'];\n$headers[] = 'Authorization: Bearer ' . $env('ACCESS_TOKEN');\n$body = \u003c\u003c\u003c'JSON'\n{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}\nJSON;\n$headers[] = 'Content-Type: application/json';\n\n$curl = curl_init($url);\ncurl_setopt_array($curl, [\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_POSTFIELDS => $body,\n]);\n$response = curl_exec($curl);\nif ($response === false) {\n $error = curl_error($curl);\n curl_close($curl);\n throw new RuntimeException($error);\n}\ncurl_close($curl);\necho $response, PHP_EOL;\n"},{"lang":"Go","label":"Batch payment request","source":"package main\n\nimport (\n \"fmt\"\n \"io\"\n \"net/http\"\n \"os\"\n \"strings\"\n \"time\"\n)\n\nfunc mustEnv(name string) string {\n value := os.Getenv(name)\n if value == \"\" { panic(\"Missing environment variable: \" + name) }\n return value\n}\n\nfunc main() {\n baseURL := strings.TrimRight(mustEnv(\"BASE_URL\"), \"/\")\n endpoint := baseURL + \"/api/v2/trans/batchDirectPay\"\n payload := `{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}`\n body := strings.NewReader(payload)\n req, err := http.NewRequest(\"POST\", endpoint, body)\n if err != nil { panic(err) }\n req.Header.Set(\"Accept\", \"application/json\")\n req.Header.Set(\"Authorization\", \"Bearer \" + mustEnv(\"ACCESS_TOKEN\"))\n req.Header.Set(\"Content-Type\", \"application/json\")\n client := \u0026http.Client{Timeout: 30 * time.Second}\n response, err := client.Do(req)\n if err != nil { panic(err) }\n defer response.Body.Close()\n result, err := io.ReadAll(response.Body)\n if err != nil { panic(err) }\n fmt.Println(string(result))\n}\n"},{"lang":"Java","label":"Batch payment request","source":"import java.io.ByteArrayOutputStream;\nimport java.net.URI;\nimport java.net.URLEncoder;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.time.Duration;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.UUID;\nimport java.util.stream.Collectors;\n\npublic class Example {\n static String requireEnv(String name) {\n String value = System.getenv(name);\n if (value == null || value.isEmpty()) {\n throw new IllegalArgumentException(\"Missing environment variable: \" + name);\n }\n return value;\n }\n\n public static void main(String[] args) throws Exception {\n String baseUrl = requireEnv(\"BASE_URL\").replaceAll(\"/+$\", \"\");\n String endpoint = baseUrl + \"/api/v2/trans/batchDirectPay\";\n String payload =\n \"{\\n\" +\n \" \\\"merchant_id\\\": \\\"48290713\\\",\\n\" +\n \" \\\"transactions\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"amount\\\": \\\"25.50\\\",\\n\" +\n \" \\\"merchant_order_no\\\": \\\"BB-BATCH-20300101-001\\\",\\n\" +\n \" \\\"currency\\\": \\\"AUD\\\",\\n\" +\n \" \\\"trans_func\\\": 3,\\n\" +\n \" \\\"first_name\\\": \\\"Emily\\\",\\n\" +\n \" \\\"last_name\\\": \\\"Carter\\\",\\n\" +\n \" \\\"card\\\": {\\n\" +\n \" \\\"card_number\\\": \\\"4111111111111111\\\",\\n\" +\n \" \\\"expiration_month\\\": \\\"12\\\",\\n\" +\n \" \\\"expiration_year\\\": \\\"2030\\\",\\n\" +\n \" \\\"security_code\\\": \\\"123\\\"\\n\" +\n \" },\\n\" +\n \" \\\"notify_email\\\": false,\\n\" +\n \" \\\"notify_sms\\\": false\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"trans_func\\\": 5,\\n\" +\n \" \\\"amount\\\": \\\"12.00\\\",\\n\" +\n \" \\\"merchant_order_no\\\": \\\"BB-BATCH-20300101-002\\\",\\n\" +\n \" \\\"currency\\\": \\\"AUD\\\",\\n\" +\n \" \\\"bank_account\\\": {\\n\" +\n \" \\\"bsb\\\": \\\"062-000\\\",\\n\" +\n \" \\\"account_no\\\": \\\"618472950\\\",\\n\" +\n \" \\\"account_name\\\": \\\"Emily Carter\\\"\\n\" +\n \" },\\n\" +\n \" \\\"process_date\\\": \\\"2030-01-15\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \"}\";\n HttpRequest.Builder builder = HttpRequest.newBuilder(URI.create(endpoint))\n .timeout(Duration.ofSeconds(30))\n .header(\"Accept\", \"application/json\");\n builder.header(\"Authorization\", \"Bearer \" + requireEnv(\"ACCESS_TOKEN\"));\n builder.header(\"Content-Type\", \"application/json\");\n HttpRequest request = builder.method(\"POST\", HttpRequest.BodyPublishers.ofString(payload, StandardCharsets.UTF_8)).build();\n HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(30)).build();\n HttpResponse\u003cString> response = client.send(request,\n HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8));\n System.out.println(response.body());\n }\n}\n"},{"lang":"Ruby","label":"Batch payment request","source":"require \"net/http\"\nrequire \"uri\"\n\nbase_url = ENV.fetch(\"BASE_URL\").sub(%r{/+$}, \"\")\nuri = URI(base_url + \"/api/v2/trans/batchDirectPay\")\nrequest = Net::HTTP::Post.new(uri)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Authorization\"] = \"Bearer \" + ENV.fetch(\"ACCESS_TOKEN\")\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = \u003c\u003c~'JSON'\n{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}\nJSON\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = uri.scheme == \"https\"\nhttp.open_timeout = 30\nhttp.read_timeout = 30\nputs http.request(request).body\n"}],"x-mint":{"href":"/en/api-reference/transactions/batch-direct-pay","metadata":{"sidebarTitle":"Create batch direct payments"}},"method":"post","type":"path","servers":["ec796d37-3557-4815-8bd3-57ca5c337838"],"path":"/api/v2/trans/batchDirectPay","baseUrlOptions":["https://staging-api.billbuddyhq.com"],"title":"Create batch direct payments","codeSamples":[{"label":"Batch payment request","lang":"Shell","source":"curl -X POST \"${BASE_URL}/api/v2/trans/batchDirectPay\" \\\n -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n -H \"Accept: application/json\" \\\n -H \"Content-Type: application/json\" \\\n --data-raw '{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}'"},{"label":"Batch payment request","lang":"Python","source":"import json\nimport os\nimport urllib.parse\nimport urllib.request\n\nbase_url = os.environ[\"BASE_URL\"].rstrip(\"/\")\nurl = base_url + \"/api/v2/trans/batchDirectPay\"\nheaders = {\"Accept\": \"application/json\"}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"ACCESS_TOKEN\"]\npayload = json.loads(r'''{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}''')\nbody = json.dumps(payload).encode(\"utf-8\")\nheaders[\"Content-Type\"] = \"application/json\"\n\nrequest = urllib.request.Request(url, data=body, headers=headers, method=\"POST\")\nwith urllib.request.urlopen(request, timeout=30) as response:\n print(response.read().decode(\"utf-8\"))\n"},{"label":"Batch payment request","lang":"JavaScript","source":"const env = (name) => {\n const value = process.env[name];\n if (!value) throw new Error(`Missing environment variable: ${name}`);\n return value;\n};\nconst baseUrl = env(\"BASE_URL\").replace(/\\/+$/, \"\");\nconst url = new URL(baseUrl + \"/api/v2/trans/batchDirectPay\");\nconst headers = { Accept: \"application/json\" };\nheaders.Authorization = `Bearer ${env(\"ACCESS_TOKEN\")}`;\nconst payload = {\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n};\nconst body = JSON.stringify(payload);\nheaders[\"Content-Type\"] = \"application/json\";\n\nconst response = await fetch(url, {\n method: \"POST\",\n headers,\n body,\n signal: AbortSignal.timeout(30_000),\n});\nconsole.log(await response.text());\n"},{"label":"Batch payment request","lang":"PHP","source":"\u003c?php\n$env = static function (string $name): string {\n $value = getenv($name);\n if ($value === false || $value === '') {\n throw new RuntimeException(\"Missing environment variable: \" . $name);\n }\n return $value;\n};\n$baseUrl = rtrim($env('BASE_URL'), '/');\n$url = $baseUrl . \"/api/v2/trans/batchDirectPay\";\n$headers = ['Accept: application/json'];\n$headers[] = 'Authorization: Bearer ' . $env('ACCESS_TOKEN');\n$body = \u003c\u003c\u003c'JSON'\n{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}\nJSON;\n$headers[] = 'Content-Type: application/json';\n\n$curl = curl_init($url);\ncurl_setopt_array($curl, [\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_POSTFIELDS => $body,\n]);\n$response = curl_exec($curl);\nif ($response === false) {\n $error = curl_error($curl);\n curl_close($curl);\n throw new RuntimeException($error);\n}\ncurl_close($curl);\necho $response, PHP_EOL;\n"},{"label":"Batch payment request","lang":"Go","source":"package main\n\nimport (\n \"fmt\"\n \"io\"\n \"net/http\"\n \"os\"\n \"strings\"\n \"time\"\n)\n\nfunc mustEnv(name string) string {\n value := os.Getenv(name)\n if value == \"\" { panic(\"Missing environment variable: \" + name) }\n return value\n}\n\nfunc main() {\n baseURL := strings.TrimRight(mustEnv(\"BASE_URL\"), \"/\")\n endpoint := baseURL + \"/api/v2/trans/batchDirectPay\"\n payload := `{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}`\n body := strings.NewReader(payload)\n req, err := http.NewRequest(\"POST\", endpoint, body)\n if err != nil { panic(err) }\n req.Header.Set(\"Accept\", \"application/json\")\n req.Header.Set(\"Authorization\", \"Bearer \" + mustEnv(\"ACCESS_TOKEN\"))\n req.Header.Set(\"Content-Type\", \"application/json\")\n client := \u0026http.Client{Timeout: 30 * time.Second}\n response, err := client.Do(req)\n if err != nil { panic(err) }\n defer response.Body.Close()\n result, err := io.ReadAll(response.Body)\n if err != nil { panic(err) }\n fmt.Println(string(result))\n}\n"},{"label":"Batch payment request","lang":"Java","source":"import java.io.ByteArrayOutputStream;\nimport java.net.URI;\nimport java.net.URLEncoder;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.time.Duration;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.UUID;\nimport java.util.stream.Collectors;\n\npublic class Example {\n static String requireEnv(String name) {\n String value = System.getenv(name);\n if (value == null || value.isEmpty()) {\n throw new IllegalArgumentException(\"Missing environment variable: \" + name);\n }\n return value;\n }\n\n public static void main(String[] args) throws Exception {\n String baseUrl = requireEnv(\"BASE_URL\").replaceAll(\"/+$\", \"\");\n String endpoint = baseUrl + \"/api/v2/trans/batchDirectPay\";\n String payload =\n \"{\\n\" +\n \" \\\"merchant_id\\\": \\\"48290713\\\",\\n\" +\n \" \\\"transactions\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"amount\\\": \\\"25.50\\\",\\n\" +\n \" \\\"merchant_order_no\\\": \\\"BB-BATCH-20300101-001\\\",\\n\" +\n \" \\\"currency\\\": \\\"AUD\\\",\\n\" +\n \" \\\"trans_func\\\": 3,\\n\" +\n \" \\\"first_name\\\": \\\"Emily\\\",\\n\" +\n \" \\\"last_name\\\": \\\"Carter\\\",\\n\" +\n \" \\\"card\\\": {\\n\" +\n \" \\\"card_number\\\": \\\"4111111111111111\\\",\\n\" +\n \" \\\"expiration_month\\\": \\\"12\\\",\\n\" +\n \" \\\"expiration_year\\\": \\\"2030\\\",\\n\" +\n \" \\\"security_code\\\": \\\"123\\\"\\n\" +\n \" },\\n\" +\n \" \\\"notify_email\\\": false,\\n\" +\n \" \\\"notify_sms\\\": false\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"trans_func\\\": 5,\\n\" +\n \" \\\"amount\\\": \\\"12.00\\\",\\n\" +\n \" \\\"merchant_order_no\\\": \\\"BB-BATCH-20300101-002\\\",\\n\" +\n \" \\\"currency\\\": \\\"AUD\\\",\\n\" +\n \" \\\"bank_account\\\": {\\n\" +\n \" \\\"bsb\\\": \\\"062-000\\\",\\n\" +\n \" \\\"account_no\\\": \\\"618472950\\\",\\n\" +\n \" \\\"account_name\\\": \\\"Emily Carter\\\"\\n\" +\n \" },\\n\" +\n \" \\\"process_date\\\": \\\"2030-01-15\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \"}\";\n HttpRequest.Builder builder = HttpRequest.newBuilder(URI.create(endpoint))\n .timeout(Duration.ofSeconds(30))\n .header(\"Accept\", \"application/json\");\n builder.header(\"Authorization\", \"Bearer \" + requireEnv(\"ACCESS_TOKEN\"));\n builder.header(\"Content-Type\", \"application/json\");\n HttpRequest request = builder.method(\"POST\", HttpRequest.BodyPublishers.ofString(payload, StandardCharsets.UTF_8)).build();\n HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(30)).build();\n HttpResponse\u003cString> response = client.send(request,\n HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8));\n System.out.println(response.body());\n }\n}\n"},{"label":"Batch payment request","lang":"Ruby","source":"require \"net/http\"\nrequire \"uri\"\n\nbase_url = ENV.fetch(\"BASE_URL\").sub(%r{/+$}, \"\")\nuri = URI(base_url + \"/api/v2/trans/batchDirectPay\")\nrequest = Net::HTTP::Post.new(uri)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Authorization\"] = \"Bearer \" + ENV.fetch(\"ACCESS_TOKEN\")\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = \u003c\u003c~'JSON'\n{\n \"merchant_id\": \"48290713\",\n \"transactions\": [\n {\n \"amount\": \"25.50\",\n \"merchant_order_no\": \"BB-BATCH-20300101-001\",\n \"currency\": \"AUD\",\n \"trans_func\": 3,\n \"first_name\": \"Emily\",\n \"last_name\": \"Carter\",\n \"card\": {\n \"card_number\": \"4111111111111111\",\n \"expiration_month\": \"12\",\n \"expiration_year\": \"2030\",\n \"security_code\": \"123\"\n },\n \"notify_email\": false,\n \"notify_sms\": false\n },\n {\n \"trans_func\": 5,\n \"amount\": \"12.00\",\n \"merchant_order_no\": \"BB-BATCH-20300101-002\",\n \"currency\": \"AUD\",\n \"bank_account\": {\n \"bsb\": \"062-000\",\n \"account_no\": \"618472950\",\n \"account_name\": \"Emily Carter\"\n },\n \"process_date\": \"2030-01-15\"\n }\n ]\n}\nJSON\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = uri.scheme == \"https\"\nhttp.open_timeout = 30\nhttp.read_timeout = 30\nputs http.request(request).body\n"}],"requestExampleLanguages":["bash","python","javascript","php","go","java","ruby"],"requiredOnlyExamples":false,"disableCodeSampleGeneration":true,"requestExampleType":"codeSamples","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request parameters.","properties":{"merchant_id":{"type":"string","description":"Business identifier assigned by BillBuddy.","maxLength":20,"minLength":1,"isRequired":true,"uniqueKey":"merchant_id","typeLabel":"string"},"transactions":{"type":"array","items":{"type":"object","description":"Payment request. Omitting both customer identifiers selects no-customer mode. If both customer_id and external_customer_id are provided, customer_id takes precedence. Only Visa/Mastercard/Amex cards are supported. Amount, name and card field requirements still apply to existing customers. Only operations 2/3/5 can be scheduled. is3ds and return_url are not supported by the batch endpoint; batch payments always disable 3DS.","properties":{"trans_func":{"type":"integer","description":"Transaction operation: 2 token payment; 3 card payment; 5 bank account payment. Batch payments do not support 1, 4 or 3DS.","enum":[2,3,5],"isRequired":true,"uniqueKey":"transactions.items.[INDEX].trans_func","typeLabel":"enum\u003cinteger>"},"amount":{"oneOf":[{"type":"number","description":"Payment amount in major currency units, for example 10.50 means AUD 10.50. At most two decimal places. Numbers and numeric strings are accepted, with a minimum of 0.01 and maximum of 999999.99; the same range applies to both types.","multipleOf":0.01,"maximum":999999.99,"minimum":0.01,"isRequired":true,"uniqueKey":"transactions.items.[INDEX].amount.oneOf.0","typeLabel":"number"},{"type":"string","description":"Payment amount in major currency units, for example 10.50 means AUD 10.50. At most two decimal places. Numbers and numeric strings are accepted, with a minimum of 0.01 and maximum of 999999.99; the same range applies to both types.","pattern":"^\\d+(\\.\\d{1,2})?$","isRequired":true,"uniqueKey":"transactions.items.[INDEX].amount.oneOf.1","typeLabel":"string"}],"isRequired":true,"uniqueKey":"transactions.items.[INDEX].amount","typeLabel":"number | string"},"merchant_order_no":{"type":"string","description":"Merchant order number. Must be unique within the same merchant. A duplicate request does not return an existing successful order.","maxLength":60,"minLength":1,"isRequired":true,"uniqueKey":"transactions.items.[INDEX].merchant_order_no","typeLabel":"string"},"currency":{"type":"string","description":"Currency code, such as AUD. Currency support also depends on the merchant's payment channel configuration.","minLength":3,"maxLength":3,"isRequired":true,"uniqueKey":"transactions.items.[INDEX].currency","typeLabel":"string"},"process_date":{"oneOf":[{"type":"string","description":"Scheduled processing date in YYYY-MM-DD format. Must be strictly after today in the service business timezone. Supported only for trans_func=2/3/5 and cannot be combined with is3ds=1. YYYY-MM-DD is recommended. Must be later than today in the service business timezone.","format":"date","uniqueKey":"transactions.items.[INDEX].process_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","description":"Scheduled processing date in YYYY-MM-DD format. Must be strictly after today in the service business timezone. Supported only for trans_func=2/3/5 and cannot be combined with is3ds=1. YYYY-MM-DD is recommended. Must be later than today in the service business timezone.","format":"date","uniqueKey":"transactions.items.[INDEX].process_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].process_date","typeLabel":"string\u003cdate> | null"},"customer_id":{"oneOf":[{"type":"string","description":"BillBuddy customer identifier. Must identify a valid customer within the current merchant and business.","maxLength":32,"uniqueKey":"transactions.items.[INDEX].customer_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"BillBuddy customer identifier. Must identify a valid customer within the current merchant and business.","maxLength":32,"uniqueKey":"transactions.items.[INDEX].customer_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].customer_id","typeLabel":"string | null"},"external_customer_id":{"oneOf":[{"type":"string","description":"Customer reference in the merchant system. Used to find the customer when customer_id is omitted. If both identifiers are provided, customer_id takes precedence.","maxLength":64,"uniqueKey":"transactions.items.[INDEX].external_customer_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Customer reference in the merchant system. Used to find the customer when customer_id is omitted. If both identifiers are provided, customer_id takes precedence.","maxLength":64,"uniqueKey":"transactions.items.[INDEX].external_customer_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].external_customer_id","typeLabel":"string | null"},"notify_email":{"oneOf":[{"type":"boolean","description":"Whether to allow email notifications for this transaction or subscription. false prohibits them; true allows them. Omission or null uses the business's API email notification setting, which defaults to off. Actual delivery depends on notification preferences and applicable rules. Also accepts 0/1 and the strings \"0\"/\"1\".","uniqueKey":"transactions.items.[INDEX].notify_email.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether to allow email notifications for this transaction or subscription. false prohibits them; true allows them. Omission or null uses the business's API email notification setting, which defaults to off. Actual delivery depends on notification preferences and applicable rules. Also accepts 0/1 and the strings \"0\"/\"1\".","uniqueKey":"transactions.items.[INDEX].notify_email.oneOf.1","typeLabel":"null"},{"type":"integer","description":"Whether to allow email notifications for this transaction or subscription. false prohibits them; true allows them. Omission or null uses the business's API email notification setting, which defaults to off. Actual delivery depends on notification preferences and applicable rules. Also accepts 0/1 and the strings \"0\"/\"1\".","enum":[0,1],"uniqueKey":"transactions.items.[INDEX].notify_email.oneOf.2","typeLabel":"enum\u003cinteger>"},{"type":"string","description":"Whether to allow email notifications for this transaction or subscription. false prohibits them; true allows them. Omission or null uses the business's API email notification setting, which defaults to off. Actual delivery depends on notification preferences and applicable rules. Also accepts 0/1 and the strings \"0\"/\"1\".","enum":["0","1"],"uniqueKey":"transactions.items.[INDEX].notify_email.oneOf.3","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"transactions.items.[INDEX].notify_email.oneOf.4","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].notify_email","typeLabel":"boolean · null · enum\u003cinteger> · enum\u003cstring> · null"},"notify_sms":{"oneOf":[{"type":"boolean","description":"Whether to allow SMS notifications for this transaction or subscription. false prohibits them; true allows them. Omission or null uses the business's API SMS notification setting, which defaults to off. Actual delivery depends on notification preferences and applicable rules. Also accepts 0/1 and the strings \"0\"/\"1\".","uniqueKey":"transactions.items.[INDEX].notify_sms.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether to allow SMS notifications for this transaction or subscription. false prohibits them; true allows them. Omission or null uses the business's API SMS notification setting, which defaults to off. Actual delivery depends on notification preferences and applicable rules. Also accepts 0/1 and the strings \"0\"/\"1\".","uniqueKey":"transactions.items.[INDEX].notify_sms.oneOf.1","typeLabel":"null"},{"type":"integer","description":"Whether to allow SMS notifications for this transaction or subscription. false prohibits them; true allows them. Omission or null uses the business's API SMS notification setting, which defaults to off. Actual delivery depends on notification preferences and applicable rules. Also accepts 0/1 and the strings \"0\"/\"1\".","enum":[0,1],"uniqueKey":"transactions.items.[INDEX].notify_sms.oneOf.2","typeLabel":"enum\u003cinteger>"},{"type":"string","description":"Whether to allow SMS notifications for this transaction or subscription. false prohibits them; true allows them. Omission or null uses the business's API SMS notification setting, which defaults to off. Actual delivery depends on notification preferences and applicable rules. Also accepts 0/1 and the strings \"0\"/\"1\".","enum":["0","1"],"uniqueKey":"transactions.items.[INDEX].notify_sms.oneOf.3","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"transactions.items.[INDEX].notify_sms.oneOf.4","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].notify_sms","typeLabel":"boolean · null · enum\u003cinteger> · enum\u003cstring> · null"},"card":{"type":"object","description":"Credit card information.","properties":{"card_number":{"type":"string","description":"Visa, Mastercard or American Express card number. Acceptance depends on card brand recognition and channel configuration. Ignored for trans_func=2. Required and non-null for trans_func=3. Supply valid card details; the actual response determines the payment outcome.","maxLength":20,"uniqueKey":"transactions.items.[INDEX].card.card_number","typeLabel":"string"},"expiration_month":{"type":"string","description":"Card expiry month, preferably two digits, such as 12. Ignored for trans_func=2. Required and non-null for trans_func=3. Supply valid card details; the actual response determines the payment outcome.","minLength":2,"maxLength":2,"uniqueKey":"transactions.items.[INDEX].card.expiration_month","typeLabel":"string"},"expiration_year":{"type":"string","description":"Card expiry year, preferably four digits, such as 2030. Ignored for trans_func=2. Required and non-null for trans_func=3. Supply valid card details; the actual response determines the payment outcome.","minLength":4,"maxLength":4,"uniqueKey":"transactions.items.[INDEX].card.expiration_year","typeLabel":"string"},"security_code":{"type":"string","description":"Card security code (CVV). Use a string to preserve leading zeros. Ignored for trans_func=2. Required and non-null for trans_func=3. Supply valid card details; the actual response determines the payment outcome.","maxLength":4,"uniqueKey":"transactions.items.[INDEX].card.security_code","typeLabel":"string"}},"uniqueKey":"transactions.items.[INDEX].card","typeLabel":"object"},"card_token":{"oneOf":[{"type":"string","description":"Payment token returned by BillBuddy. When a customer is supplied, the token must belong to that customer. Required for trans_func=2.","maxLength":255,"uniqueKey":"transactions.items.[INDEX].card_token.oneOf.0","typeLabel":"string"},{"type":"null","description":"Payment token returned by BillBuddy. When a customer is supplied, the token must belong to that customer. Required for trans_func=2.","maxLength":255,"uniqueKey":"transactions.items.[INDEX].card_token.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].card_token","typeLabel":"string | null"},"bank_account":{"type":"object","description":"Bank account information.","properties":{"bsb":{"oneOf":[{"type":"string","description":"Required for trans_func=5. Supply a valid six-digit BSB. Spaces and hyphens are permitted and excluded from the six-character length.","pattern":"^(?:[\\s-]*[^\\s-]){6}[\\s-]*$","uniqueKey":"transactions.items.[INDEX].bank_account.bsb.oneOf.0","typeLabel":"string"},{"type":"null","description":"Required for trans_func=5. Supply a valid six-digit BSB. Spaces and hyphens are permitted and excluded from the six-character length.","pattern":"^(?:[\\s-]*[^\\s-]){6}[\\s-]*$","uniqueKey":"transactions.items.[INDEX].bank_account.bsb.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].bank_account.bsb","typeLabel":"string | null"},"account_no":{"oneOf":[{"type":"string","description":"Required for trans_func=5. Supply a valid bank account number as a string to preserve leading zeros. Spaces and hyphens are permitted. After removing these separators, the value must contain 1 to 9 characters and cannot consist solely of separators.","pattern":"^(?:[\\s-]*[^\\s-]){0,9}[\\s-]*$","uniqueKey":"transactions.items.[INDEX].bank_account.account_no.oneOf.0","typeLabel":"string"},{"type":"null","description":"Required for trans_func=5. Supply a valid bank account number as a string to preserve leading zeros. Spaces and hyphens are permitted. After removing these separators, the value must contain 1 to 9 characters and cannot consist solely of separators.","pattern":"^(?:[\\s-]*[^\\s-]){0,9}[\\s-]*$","uniqueKey":"transactions.items.[INDEX].bank_account.account_no.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].bank_account.account_no","typeLabel":"string | null"},"account_name":{"oneOf":[{"type":"string","description":"Bank account holder name. Required and non-null when trans_func=5.","maxLength":100,"uniqueKey":"transactions.items.[INDEX].bank_account.account_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Bank account holder name. Required and non-null when trans_func=5.","maxLength":100,"uniqueKey":"transactions.items.[INDEX].bank_account.account_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].bank_account.account_name","typeLabel":"string | null"}},"uniqueKey":"transactions.items.[INDEX].bank_account","typeLabel":"object"},"first_name":{"oneOf":[{"type":"string","description":"First name. Required and non-null for trans_func=2/3; at most 50 characters.","maxLength":50,"uniqueKey":"transactions.items.[INDEX].first_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"First name. Required and non-null for trans_func=2/3; at most 50 characters.","maxLength":50,"uniqueKey":"transactions.items.[INDEX].first_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","description":"Last name. Required and non-null for trans_func=2/3; at most 50 characters.","maxLength":50,"uniqueKey":"transactions.items.[INDEX].last_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Last name. Required and non-null for trans_func=2/3; at most 50 characters.","maxLength":50,"uniqueKey":"transactions.items.[INDEX].last_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","description":"Email address.","format":"email","maxLength":100,"uniqueKey":"transactions.items.[INDEX].email.oneOf.0","typeLabel":"string\u003cemail>"},{"type":"null","description":"Email address.","format":"email","maxLength":100,"uniqueKey":"transactions.items.[INDEX].email.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].email","typeLabel":"string\u003cemail> | null"},"phone":{"oneOf":[{"type":"string","description":"Contact phone number.","maxLength":50,"uniqueKey":"transactions.items.[INDEX].phone.oneOf.0","typeLabel":"string"},{"type":"null","description":"Contact phone number.","maxLength":50,"uniqueKey":"transactions.items.[INDEX].phone.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].phone","typeLabel":"string | null"},"address":{"oneOf":[{"type":"string","description":"Street address.","maxLength":100,"uniqueKey":"transactions.items.[INDEX].address.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street address.","maxLength":100,"uniqueKey":"transactions.items.[INDEX].address.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].address","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","description":"City.","maxLength":50,"uniqueKey":"transactions.items.[INDEX].city.oneOf.0","typeLabel":"string"},{"type":"null","description":"City.","maxLength":50,"uniqueKey":"transactions.items.[INDEX].city.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].city","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","description":"State or province.","maxLength":100,"uniqueKey":"transactions.items.[INDEX].state.oneOf.0","typeLabel":"string"},{"type":"null","description":"State or province.","maxLength":100,"uniqueKey":"transactions.items.[INDEX].state.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].state","typeLabel":"string | null"},"postcode":{"oneOf":[{"type":"string","description":"Postcode.","maxLength":8,"uniqueKey":"transactions.items.[INDEX].postcode.oneOf.0","typeLabel":"string"},{"type":"null","description":"Postcode.","maxLength":8,"uniqueKey":"transactions.items.[INDEX].postcode.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].postcode","typeLabel":"string | null"},"country_iso2":{"oneOf":[{"type":"string","description":"Two-letter country code, such as AU.","minLength":2,"maxLength":2,"uniqueKey":"transactions.items.[INDEX].country_iso2.oneOf.0","typeLabel":"string"},{"type":"null","description":"Two-letter country code, such as AU.","minLength":2,"maxLength":2,"uniqueKey":"transactions.items.[INDEX].country_iso2.oneOf.1","typeLabel":"null"}],"uniqueKey":"transactions.items.[INDEX].country_iso2","typeLabel":"string | null"}},"required":["trans_func","amount","merchant_order_no","currency"],"not":{"anyOf":[{"allOf":[{"required":["trans_func"],"properties":{"trans_func":{"enum":[2]}}},{"not":{"required":["card_token","first_name","last_name"],"properties":{"card_token":{"not":{"enum":[null]},"minLength":1},"first_name":{"not":{"enum":[null]},"minLength":1},"last_name":{"not":{"enum":[null]},"minLength":1}}}}]},{"allOf":[{"required":["trans_func"],"properties":{"trans_func":{"enum":[3]}}},{"not":{"required":["card","first_name","last_name"],"properties":{"card":{"not":{"enum":[null]}},"first_name":{"not":{"enum":[null]},"minLength":1},"last_name":{"not":{"enum":[null]},"minLength":1}}}}]},{"allOf":[{"required":["trans_func"],"properties":{"trans_func":{"enum":[5]}}},{"not":{"required":["bank_account"],"properties":{"bank_account":{"not":{"enum":[null]}}}}}]},{"allOf":[{"required":["trans_func"],"properties":{"trans_func":{"enum":[3]}}},{"not":{"required":["card"],"properties":{"card":{"not":{"enum":[null]},"minProperties":1,"required":["card_number","expiration_month","expiration_year","security_code"],"properties":{"card_number":{"not":{"enum":[null]},"minLength":1},"expiration_month":{"not":{"enum":[null]},"minLength":1},"expiration_year":{"not":{"enum":[null]},"minLength":1},"security_code":{"not":{"enum":[null]},"minLength":1}}}}}}]},{"allOf":[{"required":["trans_func"],"properties":{"trans_func":{"enum":[5]}}},{"not":{"required":["bank_account"],"properties":{"bank_account":{"not":{"enum":[null]},"minProperties":1,"required":["bsb","account_no","account_name"],"properties":{"bsb":{"not":{"enum":[null]},"minLength":1},"account_no":{"not":{"enum":[null]},"minLength":1,"pattern":"[^\\s-]"},"account_name":{"not":{"enum":[null]},"minLength":1}}}}}}]},{"allOf":[{"required":["trans_func"],"properties":{"trans_func":{"enum":[2]}}},{"not":{"required":["card_token","first_name","last_name"],"properties":{"card_token":{"not":{"enum":[null]},"minLength":1},"first_name":{"not":{"enum":[null]},"minLength":1},"last_name":{"not":{"enum":[null]},"minLength":1}}}}]},{"allOf":[{"required":["trans_func"],"properties":{"trans_func":{"enum":[3]}}},{"not":{"required":["first_name","last_name"],"properties":{"first_name":{"not":{"enum":[null]},"minLength":1},"last_name":{"not":{"enum":[null]},"minLength":1}}}}]}]},"uniqueKey":"transactions.items.[INDEX]","typeLabel":"object"},"description":"List of 1 to 100 transactions. Ordinary per-transaction validation failures do not prevent other valid transactions from being accepted; malformed structures or processing exceptions may fail the entire batch.","minItems":1,"maxItems":100,"isRequired":true,"uniqueKey":"transactions","typeLabel":"object[]"}},"required":["merchant_id","transactions"],"uniqueKey":"","typeLabel":"object"},"examples":{"batch":{"title":"batch","value":{"merchant_id":"48290713","transactions":[{"amount":"25.50","merchant_order_no":"BB-BATCH-20300101-001","currency":"AUD","trans_func":3,"first_name":"Emily","last_name":"Carter","card":{"card_number":"4111111111111111","expiration_month":"12","expiration_year":"2030","security_code":"123"},"notify_email":false,"notify_sms":false},{"trans_func":5,"amount":"12.00","merchant_order_no":"BB-BATCH-20300101-002","currency":"AUD","bank_account":{"bsb":"062-000","account_no":"618472950","account_name":"Emily Carter"},"process_date":"2030-01-15"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"5ba32dc2-2828-4c73-b19e-62d819d5cc06":{"description":"HTTP 200. Distinguish success, business errors, validation errors and business authentication errors using the response body code.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Success response.","required":["code","message","data"],"properties":{"code":{"type":"integer","description":"0 means batch request processing is complete. Check each accepted/rejected result; accepted does not indicate payment success.","enum":[0],"isRequired":true,"uniqueKey":"oneOf.0.code","typeLabel":"enum\u003cinteger>"},"message":{"type":"string","description":"Response message.","isRequired":true,"uniqueKey":"oneOf.0.message","typeLabel":"string"},"data":{"type":"object","description":"Processing summary.","properties":{"total":{"type":"integer","description":"Number of transactions in this request.","isRequired":true,"uniqueKey":"oneOf.0.data.total","typeLabel":"integer"},"accepted":{"type":"integer","description":"Number accepted for asynchronous processing. Does not indicate payment success.","isRequired":true,"uniqueKey":"oneOf.0.data.accepted","typeLabel":"integer"},"rejected":{"type":"integer","description":"Number not accepted.","isRequired":true,"uniqueKey":"oneOf.0.data.rejected","typeLabel":"integer"},"items":{"type":"array","items":{"type":"object","description":"Per-transaction processing results.","properties":{"merchant_order_no":{"type":"string","description":"Merchant order number.","isRequired":true,"uniqueKey":"oneOf.0.data.\\items.items.[INDEX].merchant_order_no","typeLabel":"string"},"result":{"type":"string","description":"Per-transaction result: accepted means accepted for asynchronous processing; rejected means not accepted.","enum":["accepted","rejected"],"isRequired":true,"uniqueKey":"oneOf.0.data.\\items.items.[INDEX].result","typeLabel":"enum\u003cstring>"},"reason":{"type":"string","description":"Rejection reason, returned only when rejected.","uniqueKey":"oneOf.0.data.\\items.items.[INDEX].reason","typeLabel":"string"}},"required":["merchant_order_no","result"],"uniqueKey":"oneOf.0.data.\\items.items.[INDEX]","typeLabel":"object"},"description":"Per-transaction list in submission order.","isRequired":true,"uniqueKey":"oneOf.0.data.\\items","typeLabel":"object[]"}},"required":["total","accepted","rejected","items"],"isRequired":true,"uniqueKey":"oneOf.0.data","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"Business error. HTTP status is usually still 200.","required":["code","message","data"],"properties":{"code":{"type":"integer","description":"Business and authentication errors use 1; request parameter and upload file property validation errors use 400.","enum":[1,400],"isRequired":true,"uniqueKey":"oneOf.1.code","typeLabel":"enum\u003cinteger>"},"message":{"type":"string","description":"Error reason. The exact message varies by cause.","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"},"data":{"oneOf":[{"type":"object","description":"Error data: may be [], {} or customer context containing customer_id.","properties":{"customer_id":{"type":"string","description":"If a later createDdr step fails, this may identify a customer that was created and retained. Reuse this ID when retrying.","uniqueKey":"oneOf.1.data.oneOf.0.customer_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.data.oneOf.0","typeLabel":"object"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"oneOf.1.data.oneOf.1.items.[INDEX]","typeLabel":"any"},"description":"Error data: may be [], {} or customer context containing customer_id.","isRequired":true,"uniqueKey":"oneOf.1.data.oneOf.1","typeLabel":"any[]"}],"isRequired":true,"uniqueKey":"oneOf.1.data","typeLabel":"object | any[]"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"partial":{"title":"partial","value":{"code":0,"message":"accepted","data":{"total":2,"accepted":1,"rejected":1,"items":[{"merchant_order_no":"BB-BATCH-20300101-001","result":"accepted"},{"merchant_order_no":"BB-BATCH-20300101-002","result":"rejected","reason":"Order already exists"}]}}},"allAccepted":{"title":"allAccepted","value":{"code":0,"message":"accepted","data":{"total":2,"accepted":2,"rejected":0,"items":[{"merchant_order_no":"BB-BATCH-20300101-001","result":"accepted"},{"merchant_order_no":"BB-BATCH-20300101-002","result":"accepted"}]}}},"validation":{"title":"validation","value":{"code":400,"message":"The transactions field is required.","data":{}}},"auth":{"title":"auth","value":{"code":1,"message":"Unauthenticated, invalid or expired access token","data":[]}}},"exampleType":"examples"}},"exampleType":"examples"},"a05ce2fb-8f03-4836-981f-1dfeb9f567f5":{"description":"Rate limit exceeded. API requests share a limit of 120 requests per minute, normally counted by source IP; this is not a separate allowance for each endpoint. Wait for the seconds specified by Retry-After.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","description":"Rate limit response.","properties":{"message":{"type":"string","description":"Rate limit message.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"message":"Too Many Attempts."},"examples":{"Example":{"title":"Example","value":{"message":"Too Many Attempts."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"63c5184f-7602-4be1-ae8d-f4a7e5954860":{"oauth2":{"type":"oauth2","description":"OAuth2 client_credentials authorization. Obtain a new access_token when it expires.","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{}}},"scopes":[],"schemeName":"oauth2"}}},"servers":{"ec796d37-3557-4815-8bd3-57ca5c337838":{"url":"https://staging-api.billbuddyhq.com","description":"Staging environment"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"oauth2","description":"OAuth2 client_credentials authorization. Obtain a new access_token when it expires.","flows":{"clientCredentials":{"tokenUrl":"/oauth/token","scopes":{}}},"scopes":[],"schemeName":"oauth2"},"schema":{"title":"OAuth2 Auth","type":"string","isRequired":true,"description":"OAuth2 client_credentials authorization. Obtain a new access_token when it expires.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"oauth2","name":"Authorization"}],"title":"oauth2"}]},"originalFileLocation":"openapi/billbuddy-v2-openapi.en.yaml"},"subdomain":"bill-buddy","siteName":"BillBuddy API","title":"Create batch direct payments - BillBuddy API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en/api-reference/transactions/batch-direct-pay","matchLevel":0},"cn":{"href":"/cn/api-reference/transactions/batch-direct-pay","matchLevel":1}}},"lastModified":"2026-10-30T09:01:30.037Z","originalFileLocation":"en/api-reference/transactions/batch-direct-pay.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"### Parameters for each transaction Supply merchant_id and transactions at the top level, with 1–100 transactions per batch. Each transaction requires trans_func, amount, merchant_order_no and currency, plus the fields below. | trans_func | Operation | Additional required fields per transaction | | --- | --- | --- | | 2 | Token payment | card_token, first_name, last_name | | 3 | Card number payment | card.card_number, card.expiration_month, card.expiration_year, card.security_code, first_name, last_name | | 5 | Bank account payment | bank_account.bsb, bank_account.account_no, bank_account.account_name; this transaction uses the bank account, so omit card because it is not used for payment | Batches do not support token creation, checkout or 3DS. is3ds and return_url are not supported row parameters. Optional process_date must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded. Submit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status. Per-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry. All examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.\">\u003cmeta data-mint-head name=\"application-name\" content=\"BillBuddy API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/bill-buddy/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/bill-buddy/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/bill-buddy/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/bill-buddy/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create batch direct payments - BillBuddy API\">\u003cmeta data-mint-head property=\"og:description\" content=\"### Parameters for each transaction Supply merchant_id and transactions at the top level, with 1–100 transactions per batch. Each transaction requires trans_func, amount, merchant_order_no and currency, plus the fields below. | trans_func | Operation | Additional required fields per transaction | | --- | --- | --- | | 2 | Token payment | card_token, first_name, last_name | | 3 | Card number payment | card.card_number, card.expiration_month, card.expiration_year, card.security_code, first_name, last_name | | 5 | Bank account payment | bank_account.bsb, bank_account.account_no, bank_account.account_name; this transaction uses the bank account, so omit card because it is not used for payment | Batches do not support token creation, checkout or 3DS. is3ds and return_url are not supported row parameters. Optional process_date must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded. Submit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status. Per-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry. All examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"BillBuddy API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bill-buddy.mintlify.app/_mintlify/api/og/v2?division=Transactions\u0026amp;title=Create+batch+direct+payments\u0026amp;description=%23%23%23+Parameters+for+each+transaction%0A%0ASupply+%60merchant_id%60+and+%60transactions%60+at+the+top+level%2C+with+1%E2%80%93100+transactions+per+batch.+Each+transaction+requires+%60tra\u0026amp;theme=64470f610240a2cb772d6400\u0026amp;signature=053919656fcf99cdc5c9669a8b7a8b8c53e7202ebda92f3dfb826e9d0a278bd1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create batch direct payments - BillBuddy API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"### Parameters for each transaction Supply merchant_id and transactions at the top level, with 1–100 transactions per batch. Each transaction requires trans_func, amount, merchant_order_no and currency, plus the fields below. | trans_func | Operation | Additional required fields per transaction | | --- | --- | --- | | 2 | Token payment | card_token, first_name, last_name | | 3 | Card number payment | card.card_number, card.expiration_month, card.expiration_year, card.security_code, first_name, last_name | | 5 | Bank account payment | bank_account.bsb, bank_account.account_no, bank_account.account_name; this transaction uses the bank account, so omit card because it is not used for payment | Batches do not support token creation, checkout or 3DS. is3ds and return_url are not supported row parameters. Optional process_date must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded. Submit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status. Per-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry. All examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bill-buddy.mintlify.app/_mintlify/api/og/v2?division=Transactions\u0026amp;title=Create+batch+direct+payments\u0026amp;description=%23%23%23+Parameters+for+each+transaction%0A%0ASupply+%60merchant_id%60+and+%60transactions%60+at+the+top+level%2C+with+1%E2%80%93100+transactions+per+batch.+Each+transaction+requires+%60tra\u0026amp;theme=64470f610240a2cb772d6400\u0026amp;signature=053919656fcf99cdc5c9669a8b7a8b8c53e7202ebda92f3dfb826e9d0a278bd1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/bill-buddy/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"BillBuddy API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/transactions/batch-direct-pay.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://bill-buddy.mintlify.app/cn/api-reference/transactions/batch-direct-pay\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://bill-buddy.mintlify.app/#organization\",\"name\":\"BillBuddy API\",\"url\":\"https://bill-buddy.mintlify.app\"},{\"@type\":\"WebSite\",\"@id\":\"https://bill-buddy.mintlify.app#website\",\"name\":\"BillBuddy API\",\"url\":\"https://bill-buddy.mintlify.app\",\"publisher\":{\"@id\":\"https://bill-buddy.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay#webpage\",\"url\":\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay\",\"name\":\"Create batch direct payments\",\"description\":\"### Parameters for each transaction Supply merchant_id and transactions at the top level, with 1–100 transactions per batch. Each transaction requires trans_func, amount, merchant_order_no and currency, plus the fields below. | trans_func | Operation | Additional required fields per transaction | | --- | --- | --- | | 2 | Token payment | card_token, first_name, last_name | | 3 | Card number payment | card.card_number, card.expiration_month, card.expiration_year, card.security_code, first_name, last_name | | 5 | Bank account payment | bank_account.bsb, bank_account.account_no, bank_account.account_name; this transaction uses the bank account, so omit card because it is not used for payment | Batches do not support token creation, checkout or 3DS. is3ds and return_url are not supported row parameters. Optional process_date must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded. Submit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status. Per-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry. All examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.\",\"dateModified\":\"2026-10-30T09:01:30.037Z\",\"isPartOf\":{\"@id\":\"https://bill-buddy.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Transactions\",\"item\":\"https://bill-buddy.mintlify.app/en/api-reference/transactions/direct-pay\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create batch direct payments\",\"item\":\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay#apireference\",\"headline\":\"Create batch direct payments\",\"name\":\"Create batch direct payments\",\"description\":\"### Parameters for each transaction Supply merchant_id and transactions at the top level, with 1–100 transactions per batch. Each transaction requires trans_func, amount, merchant_order_no and currency, plus the fields below. | trans_func | Operation | Additional required fields per transaction | | --- | --- | --- | | 2 | Token payment | card_token, first_name, last_name | | 3 | Card number payment | card.card_number, card.expiration_month, card.expiration_year, card.security_code, first_name, last_name | | 5 | Bank account payment | bank_account.bsb, bank_account.account_no, bank_account.account_name; this transaction uses the bank account, so omit card because it is not used for payment | Batches do not support token creation, checkout or 3DS. is3ds and return_url are not supported row parameters. Optional process_date must be strictly after today in the business timezone. Invalid rows return reasons while valid rows can be accepted; acceptance does not mean payment succeeded. Submit 1 to 100 transactions per request. Each transaction receives an acceptance or rejection result. accepted means the request was accepted for asynchronous processing, not that payment succeeded. Only trans_func=2/3/5 are supported; token creation, checkout and 3DS are not supported. Existing order numbers, duplicate order numbers within the batch and invalid parameters cause the affected transactions to be rejected without preventing other valid transactions from being accepted. Top-level code may still be 0 even when all transactions are rejected. Check each result and confirm the final payment status. Per-transaction results apply when batch processing completes normally. A malformed request structure or processing exception may fail the whole batch. If complete per-transaction results are unavailable, query order status before deciding whether to retry. All examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.\",\"url\":\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay\",\"mainEntityOfPage\":{\"@id\":\"https://bill-buddy.mintlify.app/en/api-reference/transactions/batch-direct-pay#webpage\"},\"dateModified\":\"2026-10-30T09:01:30.037Z\",\"publisher\":{\"@id\":\"https://bill-buddy.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://bill-buddy.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"BillBuddy API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"BillBuddy API","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Integration guide","pages":[{"title":"Integration guide","href":"/en/introduction"}]},{"tab":"API reference","groups":[{"group":"Transactions","pages":[{"title":"Create a direct payment","description":"### Parameters by transaction operation\n\nEvery operation requires `trans_func`, `merchant_id`, `amount`, `merchant_order_no` and `currency`. Add the conditional fields below, including when using an existing customer.\n\n| trans_func | Operation | Additional required fields |\n| --- | --- | --- |\n| 1 | Create a token without charging | `card.card_number`, `card.expiration_month`, `card.expiration_year`, `card.security_code`, `first_name`, `last_name` |\n| 2 | Token payment | `card_token`, `first_name`, `last_name` |\n| 3 | Card number payment | `card.card_number`, `card.expiration_month`, `card.expiration_year`, `card.security_code`, `first_name`, `last_name` |\n| 4 | Create checkout | `return_url` |\n| 5 | Bank account payment | `bank_account.bsb`, `bank_account.account_no`, `bank_account.account_name`; do not supply a non-empty `card` |\n\n`is3ds=1` also requires `return_url`. `process_date` supports only operations 2, 3 and 5, must be strictly after today in the business timezone, and cannot be combined with `is3ds=1`. See each field for types, lengths and value limits.\n\nSupports payment token creation, token payments, card payments, hosted checkout and bank account payments. Scheduling is not allowed when is3ds=1. Display the HTML to guide customer authentication only when response data.html is nonempty. If html is empty, handle the returned status; do not assume an authentication page is required. Do not submit a nonempty card when trans_func=5. The processing date must be strictly after today in the service business timezone. data.sign is the response signature; example signatures are calculated offline according to the signing rules for each payment scenario, using the public demo key bb_docs_demo_signing_key_2030. The html field is excluded for responses awaiting 3DS authentication. Example signatures are not valid for real transactions. A payment failure returns top-level code=1, and data contains no transaction details.\n\nA declined payment or failed 3DS authentication returns top-level code=1 and data=[]. See message for the reason. Do not read data.status as if this were a success response.\n\nAll examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.","deprecated":null,"version":null,"sidebarTitle":"Create a direct payment","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /api/v2/trans/directPay","href":"/en/api-reference/transactions/direct-pay"},{"title":"Create batch direct payments","deprecated":null,"version":null,"sidebarTitle":"Create batch direct payments","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /api/v2/trans/batchDirectPay","href":"/en/api-reference/transactions/batch-direct-pay"},{"title":"Cancel scheduled payments","description":"Only scheduled transactions belonging to the current merchant and business, with Pending status and not already cancelled, can be cancelled. Cancellation must occur strictly before 08:15 Australia/Sydney on process_date. Cancellation is no longer permitted at the cutoff; immediate transactions cannot be cancelled. Successfully cancelled transactions become Failed. Merchant order numbers are deduplicated, and each result is cancelled or skipped. Top-level success does not mean every transaction was cancelled.\n\nAll examples illustrate request and response formats. Replace customers, orders, cards and accounts with approved test data. BASE_URL is the service root domain without /api/v2. ACCESS_TOKEN is the access_token returned by /oauth/token. Example dates are in 2030; replace them with actual dates that satisfy the current date restrictions.","deprecated":null,"version":null,"sidebarTitle":"Cancel scheduled payments","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /api/v2/trans/cancelDirectPay","href":"/en/api-reference/transactions/cancel-direct-pay"},{"title":"Query a transaction","deprecated":null,"version":null,"sidebarTitle":"Query a transaction","openapi":"/openapi/billbuddy-v2-openapi.en.yaml get /api/v2/trans/queryTrans","href":"/en/api-reference/transactions/query-transaction"},{"title":"List transactions","deprecated":null,"version":null,"sidebarTitle":"List transactions","openapi":"/openapi/billbuddy-v2-openapi.en.yaml get /api/v2/trans/list","href":"/en/api-reference/transactions/list-transactions"},{"title":"Upload a TXT transaction file","deprecated":null,"version":null,"sidebarTitle":"Upload a TXT transaction file","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /api/v2/trans/bulk-upload","href":"/en/api-reference/transactions/bulk-upload"},{"title":"Query a TXT batch and its details","deprecated":null,"version":null,"sidebarTitle":"Query a TXT batch and its details","openapi":"/openapi/billbuddy-v2-openapi.en.yaml get /api/v2/trans/bulk-upload/result","href":"/en/api-reference/transactions/bulk-upload-result"}]},{"group":"Subscriptions","pages":[{"title":"List available subscription templates","deprecated":null,"version":null,"sidebarTitle":"List available subscription templates","openapi":"/openapi/billbuddy-v2-openapi.en.yaml get /api/v2/plan/list","href":"/en/api-reference/subscriptions/templates"},{"title":"Create a hosted subscription","deprecated":null,"version":null,"sidebarTitle":"Create a hosted subscription","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /api/v2/subscription/create","href":"/en/api-reference/subscriptions/create"},{"title":"Create and activate a DDR","deprecated":null,"version":null,"sidebarTitle":"Create and activate a DDR","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /api/v2/subscription/createDdr","href":"/en/api-reference/subscriptions/create-ddr"},{"title":"Add a payment schedule to a By agreement DDR","deprecated":null,"version":null,"sidebarTitle":"Add a payment schedule to a By agreement DDR","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /api/v2/subscription/createSchedule","href":"/en/api-reference/subscriptions/create-schedule"}]},{"group":"Authentication","pages":[{"title":"Obtain an OAuth access token","deprecated":null,"version":null,"sidebarTitle":"Obtain an OAuth access token","openapi":"/openapi/billbuddy-v2-openapi.en.yaml post /oauth/token","href":"/en/api-reference/authentication/token"}]}]}]},{"language":"cn","pages":[{"title":"cn","href":"/cn/api-reference/transactions/batch-direct-pay"}]}]},"title":"Create batch direct payments - BillBuddy API","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-26-lDe7V.js","utils-CWQmgYtH.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-4-Aw3rSD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C2zjXYA5.js","snippetPresets-DFmpFA7C.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-FJpQavWq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D_GvPF7k.js","shallow-Bs2ZB0NO.js","getApiPlaygroundDisplay-DCcqJJk-.js","CodeSnippet-DzDxawVe.js","CodeSnippets-aUr7fU-7.js","Page-CT9uE8Ip.js","getPastedJson-Y1fKsj_I.js","icon-DI4zTsDr.js","MethodPill-C0nDlmSQ.js","DuplicateIcon-NUXbx2nQ.js","createIcon-BdTHrPAi.js","DynamicMarkdown-CtpgKJwj.js","SectionHeading-B3x35tOt.js","axios-vUo_bRtp.js","Markdown-3OmurJMP.js","clsx-DMKzROTp.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-1ms6tsT-.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Ke9xIMFx.js"]}