Create a new transaction to process a payment for a customer. Use type: WITHDRAW to send funds to a destination payment method (requires destinationId), type: DEPOSIT to pull funds from a source payment method (requires sourceId), or type: SWAP to convert funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount). A DEPOSIT settles in one currency, so sourceCurrency and destinationCurrency must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.
For a SWAP, the API computes the amount you leave out at the live exchange rate. A SWAP with both amounts is rejected.
Want to show a customer what a withdrawal will cost before you create it? Quote a Withdrawal returns the rate, fee, and both amounts without creating anything, and a create with the same inputs charges the quoted amounts.
Testing in sandbox? Sandbox transactions settle automatically in about 5 minutes and send the TRANSACTION.UPDATED webhook. Pick the outcome with the payment method’s last four digits (e.g. 0001 fails, 0002 requires OTP for mobile money, 0003 stays pending until you call /simulate). Add SIMULATE_INSTANT anywhere in meta.reference to settle in about 30 seconds. Full reference: Testing in Sandbox.
Static business API key issued from the dashboard. A business can
provision multiple API keys, each scoped to a configurable set
of permissions (e.g. read transactions, create deposits, etc).
Permissions are chosen per key at creation time in the dashboard
and may be revoked by deleting the key. Manage your keys and
their permissions under Developer → API keys in the dashboard.
A request whose key does not carry the permission the target
endpoint requires is rejected with 401 Unauthorized, the same
response an unrecognised, malformed, revoked or disabled key
returns. The API does not distinguish the two cases on the wire.
API version in ISO 8601 format. The only supported version is 2026-05-18, which is also the default when the header is omitted. Any other value is rejected with a 400 Bad Request.
Body
application/json
Withdraw
Deposit
Swap
Send funds to a customer's destination payment method. This is the default when type is omitted. Provide sourceAmount, destinationAmount or both; sending sourceAmount alone lets the API compute the destination side at the live forward rate.
The unique identifier of the customer. Required for DEPOSIT and WITHDRAW transactions. Not required for SWAP, if omitted, the transaction runs against the business wallet.
The type of transaction. DEPOSIT pulls funds from the customer's source payment method (requires sourceId). WITHDRAW sends funds to the customer's destination payment method (requires destinationId). SWAP converts funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount; the API computes the other side at the live exchange rate, and sending both is rejected). If omitted, defaults to WITHDRAW.
The transaction amount in the source currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: sending sourceAmount alone lets the API compute destinationAmount at the live forward rate (useful when you know only how much you want to send, e.g. a SWIFT payout of a fixed source balance). When both are sent, destinationAmount wins unless shouldPreferSourceAmount is true. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting sourceAmount makes the API compute destinationAmount at the live exchange rate.
The transaction amount in the destination currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: setting destinationAmount fixes the amount, while omitting it and sending sourceAmount lets the API compute destinationAmount at the live forward rate. A request with neither is rejected. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting destinationAmount instead makes the API compute sourceAmount at the inverse rate. Sending both amounts on a SWAP is rejected.
Opt in to deriving destinationAmount from sourceAmount even when both amounts are sent. Defaults to false, which keeps destination-wins semantics so a caller that echoes both amounts still gets the destinationAmount they asked for. Set true to have sourceAmount drive the payout via the forward rate.
The correspondent (intermediary) bank name for USD payouts (WITHDRAW with destinationCurrency USD and meta.settlement 'request'). Only used as a fallback when the destination payment method lacks it. The payment method's value takes precedence. Must be provided together with correspondentBankAccountNumber.
The correspondent (intermediary) bank account number for USD payouts (WITHDRAW with destinationCurrency USD and meta.settlement 'request'). Only used as a fallback when the destination payment method lacks it. The payment method's value takes precedence. Must be provided together with correspondentBankName.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Afriex Business API","colors":{"primary":"#0075FF","light":"#0075FF","dark":"#0075FF"},"logo":{"light":"https://mintcdn.com/afriex-5d97ad2e/-0c2OtRvdHYWM-P9/logo/light.svg?fit=max\u0026auto=format\u0026n=-0c2OtRvdHYWM-P9\u0026q=85\u0026s=de5afeca786c40704f98e96da7d2b1b9","dark":"https://mintcdn.com/afriex-5d97ad2e/-0c2OtRvdHYWM-P9/logo/dark.png?fit=max\u0026auto=format\u0026n=-0c2OtRvdHYWM-P9\u0026q=85\u0026s=cdc436ca4fd0df7233a6e3db67941a84"},"favicon":"https://mintcdn.com/afriex-5d97ad2e/-0c2OtRvdHYWM-P9/favicon.png?fit=max\u0026auto=format\u0026n=-0c2OtRvdHYWM-P9\u0026q=85\u0026s=48a66687297df9128bf997d1ad6f10cd","api":{"openapi":"api-reference/openapi.json"},"navbar":{"links":[{"href":"https://afriex.statuspage.io","label":"Status"},{"href":"mailto:support@afriex.com","label":"Support"},{"icon":"/images/play.svg","href":"https://god.gw.postman.com/run-collection/36243325-4caa2575-18c9-4374-892d-ea0dc5a9ec48?action=collection%2Ffork\u0026source=rip_markdown\u0026collection-url=entityId%3D36243325-4caa2575-18c9-4374-892d-ea0dc5a9ec48%26entityType%3Dcollection%26workspaceId%3D05fc21e0-e07f-4bc9-bab5-55be8ed3082d","label":"Run in Postman"}],"primary":{"type":"button","label":"Dashboard","href":"https://business.afriex.com/"}},"footer":{"socials":{"x":"https://x.com/afriexapp","github":"https://github.com/Afri-exchange","linkedin":"https://linkedin.com/company/afriex"}},"contextual":{"options":["copy","view","chatgpt","claude","mcp",{"title":"LLMs.txt","description":"Provide information to help LLMs use the full API docs site","icon":"robot","href":"https://docs.afriex.com/llms.txt"}],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Status","icon":"wave-pulse","href":"https://afriex.statuspage.io"},{"anchor":"Support","icon":"envelope","href":"mailto:support@afriex.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"afriex-5d97ad2e","hasAudioNarration":false,"actualSubdomain":"afriex-5d97ad2e","customDomains":["docs.afriex.com"],"gitSource":{"type":"github","owner":"afri-exchange","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae59bb6acf37ed506a0f8f5","collectionId":"490feb78-2920-4995-97be-af4ea87f5aed","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae59bb6acf37ed506a0f8f5"},"entitlements":{},"buildId":"6ae59bb6acf37ed506a0f8f5","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API reference","count":63},{"language":"default","tag":"Payment Batches","count":12},{"language":"default","tag":"Payment Methods","count":11},{"language":"default","tag":"Guides","count":8},{"language":"default","tag":"Customers","count":7},{"language":"default","tag":"Transactions","count":7},{"language":"default","tag":"Webhooks","count":6},{"language":"default","tag":"Requests and responses","count":5},{"language":"default","tag":"Overview","count":4},{"language":"default","tag":"Sandbox helpers","count":4}]},"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":"full-page-search","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":"turbopuffer-dual-write","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},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".navbar-link a[href^=\"https://god.gw.postman.com/\"]{padding:.375rem .75rem;border-radius:.375rem;background-color:#ff6c37;color:#fff;font-weight:600}.navbar-link a[href^=\"https://god.gw.postman.com/\"]:hover{background-color:#e85a2a;color:#fff}#navbar div.flex-1:has(>nav .navbar-link){flex:none}"}],"page":{"pagePath":"api-reference/endpoint/transactions/create","slug":"/api-reference/endpoint/transactions/create","pageMetadata":{"title":"Create Transaction","openapi":"POST /api/v1/transaction","description":"Create a new transaction to process a payment for a customer. Use `type: WITHDRAW` to send funds to a destination payment method (requires `destinationId`), `type: DEPOSIT` to pull funds from a source payment method (requires `sourceId`), or `type: SWAP` to convert funds between currencies within the Afriex wallet (requires `sourceCurrency`, `destinationCurrency`, `meta`, and exactly one of `sourceAmount` or `destinationAmount`). A DEPOSIT settles in one currency, so `sourceCurrency` and `destinationCurrency` must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.\n","href":"/api-reference/endpoint/transactions/create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Create a new transaction to process a payment for a customer. Use \", _jsx(_components.code, {\n children: \"type: WITHDRAW\"\n }), \" to send funds to a destination payment method (requires \", _jsx(_components.code, {\n children: \"destinationId\"\n }), \"), \", _jsx(_components.code, {\n children: \"type: DEPOSIT\"\n }), \" to pull funds from a source payment method (requires \", _jsx(_components.code, {\n children: \"sourceId\"\n }), \"), or \", _jsx(_components.code, {\n children: \"type: SWAP\"\n }), \" to convert funds between currencies within the Afriex wallet (requires \", _jsx(_components.code, {\n children: \"sourceCurrency\"\n }), \", \", _jsx(_components.code, {\n children: \"destinationCurrency\"\n }), \", \", _jsx(_components.code, {\n children: \"meta\"\n }), \", and exactly one of \", _jsx(_components.code, {\n children: \"sourceAmount\"\n }), \" or \", _jsx(_components.code, {\n children: \"destinationAmount\"\n }), \"). A DEPOSIT settles in one currency, so \", _jsx(_components.code, {\n children: \"sourceCurrency\"\n }), \" and \", _jsx(_components.code, {\n children: \"destinationCurrency\"\n }), \" must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.\"]\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Note,Tip}=_components;if(!Note)_missingMdxReference(`Note`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`For a `,_jsx(_components.code,{children:`SWAP`}),`, the API computes the amount you leave out at the live exchange rate. A `,_jsx(_components.code,{children:`SWAP`}),` with both amounts is rejected.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Want to show a customer what a withdrawal will cost before you create it? `,_jsx(_components.a,{href:`/api-reference/endpoint/transactions/quote`,children:`Quote a Withdrawal`}),` returns the rate, fee, and both amounts without creating anything, and a create with the same inputs charges the quoted amounts.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Testing in sandbox?`}),` Sandbox transactions settle automatically in about 5 minutes and send the `,_jsx(_components.code,{children:`TRANSACTION.UPDATED`}),` webhook. Pick the outcome with the payment method’s last four digits (e.g. `,_jsx(_components.code,{children:`0001`}),` fails, `,_jsx(_components.code,{children:`0002`}),` requires OTP for mobile money, `,_jsx(_components.code,{children:`0003`}),` stays pending until you call `,_jsx(_components.a,{href:`/api-reference/endpoint/transactions/simulate`,children:_jsx(_components.code,{children:`/simulate`})}),`). Add `,_jsx(_components.code,{children:`SIMULATE_INSTANT`}),` anywhere in `,_jsx(_components.code,{children:`meta.reference`}),` to settle in about 30 seconds. Full reference: `,_jsx(_components.a,{href:`/guides/testing-in-sandbox`,children:`Testing in Sandbox`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Transaction","openapi":"POST /api/v1/transaction","description":"Create a new transaction to process a payment for a customer. Use `type: WITHDRAW` to send funds to a destination payment method (requires `destinationId`), `type: DEPOSIT` to pull funds from a source payment method (requires `sourceId`), or `type: SWAP` to convert funds between currencies within the Afriex wallet (requires `sourceCurrency`, `destinationCurrency`, `meta`, and exactly one of `sourceAmount` or `destinationAmount`). A DEPOSIT settles in one currency, so `sourceCurrency` and `destinationCurrency` must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.\n","href":"/api-reference/endpoint/transactions/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createTransaction","summary":"Create a new transaction","description":"Create a new transaction to process a payment for a customer. Use `type: WITHDRAW` to send funds to a destination payment method (requires `destinationId`), `type: DEPOSIT` to pull funds from a source payment method (requires `sourceId`), or `type: SWAP` to convert funds between currencies within the Afriex wallet (requires `sourceCurrency`, `destinationCurrency`, `meta`, and exactly one of `sourceAmount` or `destinationAmount`). A DEPOSIT settles in one currency, so `sourceCurrency` and `destinationCurrency` must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.\n","tags":["Transactions"],"requestBody":"d38af8ed-dbcf-4595-a89d-5e8116d25f1c","responses":{"201":"9b550320-b61b-4fbb-94be-d1baf504e900","400":"c303e01c-78a6-49c9-9553-a60f2b324bd7","401":"10c788a8-cbfa-49b2-b060-d9df4b1fd573","402":"8835a007-7e6e-44a5-a417-6af98d890fff","403":"3e1d4e4e-92ca-49f3-887d-f155eac93419","404":"869a9f46-c26f-4e44-8638-2ee4b585e67a","409":"5140d3f7-9a51-48a6-8f70-aef6e4faafbd","422":"5ed7382a-dc61-4441-aff5-029b39026f8d","429":"ad82a40f-9d29-4e29-9ebd-623fd54d5402","451":"23eba04f-c326-460b-959a-d04111d40789","500":"ec994800-3178-44cb-bfe7-60e2fa5ed22d","503":"01d74496-da39-412a-801e-bb6ccfe4ffba"},"x-codeSamples":[{"lang":"TypeScript","label":"Afriex SDK","source":"const transaction = await afriex.transactions.create({\n customerId: \"customer-id\",\n sourceAmount: \"10\",\n destinationAmount: \"5000\",\n sourceCurrency: \"USD\",\n destinationCurrency: \"NGN\",\n destinationId: \"payment-method-id\",\n meta: {\n idempotencyKey: \"unique-key-123\",\n reference: \"order-456\",\n narration: \"Payment for services\",\n },\n});\n"}],"method":"post","type":"path","servers":["3298ae0b-7333-4b60-8d1b-b6d15dc0a1b5","9fc63886-0a83-446b-9588-6621dfbf98da"],"security":["c6e6cee1-f5cd-49d4-aecb-1d77573277f3"],"path":"/api/v1/transaction","baseUrlOptions":["https://sandbox.api.afriex.com","https://api.afriex.com"],"title":"Create a new transaction","codeSamples":[{"label":"Afriex SDK","lang":"TypeScript","source":"const transaction = await afriex.transactions.create({\n customerId: \"customer-id\",\n sourceAmount: \"10\",\n destinationAmount: \"5000\",\n sourceCurrency: \"USD\",\n destinationCurrency: \"NGN\",\n destinationId: \"payment-method-id\",\n meta: {\n idempotencyKey: \"unique-key-123\",\n reference: \"order-456\",\n narration: \"Payment for services\",\n },\n});\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"7d600d14-72b8-492d-93d3-501f4dd071df":{"name":"x-api-signature","in":"header","required":false,"description":"Signature of the request payload, used for request authentication where payload signing is enabled for your business.","schema":{"type":"string","isRequired":false,"description":"Signature of the request payload, used for request authentication where payload signing is enabled for your business.","uniqueKey":"","typeLabel":"string"}},"56316d2d-ccdd-4ea3-a88c-3730fd6c5c5b":{"name":"x-api-version","in":"header","required":false,"description":"API version in ISO 8601 format. The only supported version is `2026-05-18`, which is also the default when the header is omitted. Any other value is rejected with a `400 Bad Request`.","schema":{"type":"string","isRequired":false,"description":"API version in ISO 8601 format. The only supported version is `2026-05-18`, which is also the default when the header is omitted. Any other value is rejected with a `400 Bad Request`.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Withdraw","description":"Send funds to a customer's destination payment method. This is the default when type is omitted. Provide sourceAmount, destinationAmount or both; sending sourceAmount alone lets the API compute the destination side at the live forward rate.","required":["customerId","sourceCurrency","destinationCurrency","destinationId","meta"],"properties":{"customerId":{"type":"string","description":"The unique identifier of the customer. Required for DEPOSIT and WITHDRAW transactions. Not required for SWAP, if omitted, the transaction runs against the business wallet.","examples":["69528240ba52c13b669fb239"],"isRequired":true,"uniqueKey":"oneOf.0.customerId","typeLabel":"string"},"destinationCurrency":{"type":"string","pattern":"^[A-Z]{3}$","description":"The 3-letter ISO 4217 currency code of the destination currency (e.g., USD, NGN). Upper case, and a currency Afriex supports.","examples":["USD"],"isRequired":true,"uniqueKey":"oneOf.0.destinationCurrency","typeLabel":"string"},"sourceCurrency":{"type":"string","pattern":"^[A-Z]{3}$","description":"The 3-letter ISO 4217 currency code of the source currency (e.g., USD, NGN). Upper case, and a currency Afriex supports.","examples":["NGN"],"isRequired":true,"uniqueKey":"oneOf.0.sourceCurrency","typeLabel":"string"},"destinationId":{"type":"string","description":"Required for WITHDRAW transactions. The id of the destination payment method that money will be sent to.\n","examples":["690df3281c11eea59108fcaf"],"isRequired":true,"uniqueKey":"oneOf.0.destinationId","typeLabel":"string"},"meta":{"type":"object","properties":{"idempotencyKey":{"type":"string","description":"The idempotency key for the transaction.","isRequired":true,"uniqueKey":"oneOf.0.meta.idempotencyKey","typeLabel":"string"},"reference":{"type":"string","description":"The reference for the transaction.","isRequired":true,"uniqueKey":"oneOf.0.meta.reference","typeLabel":"string"},"narration":{"type":"string","description":"The optional reason for the transaction.","uniqueKey":"oneOf.0.meta.narration","typeLabel":"string"},"invoice":{"type":"string","description":"The invoice filename (S3 object key) for the transaction, as returned by the media upload endpoint. Required for SWIFT withdrawals: the referenced object is verified to exist in storage before the transaction is created, so upload the file first and pass the returned key verbatim.","uniqueKey":"oneOf.0.meta.invoice","typeLabel":"string"},"settlement":{"type":"string","enum":["spot","request"],"description":"Optional settlement handling for the transaction. `spot` (the default) processes immediately and debits your Payout wallet. `request` is only supported for WITHDRAW transactions: it debits your Collection wallet (rather than the default Payout wallet) and queues the payout for the next business day in the destination payment method's country. Omit `settlement` (or send `spot`) for an ordinary payout from the Payout wallet.","uniqueKey":"oneOf.0.meta.settlement","typeLabel":"enum\u003cstring>"}},"required":["idempotencyKey","reference"],"description":"Transaction metadata. idempotencyKey and reference are required.","isRequired":true,"uniqueKey":"oneOf.0.meta","typeLabel":"object"},"type":{"type":"string","description":"The type of transaction. DEPOSIT pulls funds from the customer's source payment method (requires sourceId). WITHDRAW sends funds to the customer's destination payment method (requires destinationId). SWAP converts funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount; the API computes the other side at the live exchange rate, and sending both is rejected). If omitted, defaults to WITHDRAW.","enum":["WITHDRAW"],"uniqueKey":"oneOf.0.type","typeLabel":"enum\u003cstring>"},"sourceAmount":{"oneOf":[{"type":"number","description":"The transaction amount in the source currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: sending sourceAmount alone lets the API compute destinationAmount at the live forward rate (useful when you know only how much you want to send, e.g. a SWIFT payout of a fixed source balance). When both are sent, destinationAmount wins unless shouldPreferSourceAmount is true. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting sourceAmount makes the API compute destinationAmount at the live exchange rate.","minimum":0,"example":"100.50","exclusiveMinimum":true,"uniqueKey":"oneOf.0.sourceAmount.oneOf.0","typeLabel":"number"},{"type":"string","description":"The transaction amount in the source currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: sending sourceAmount alone lets the API compute destinationAmount at the live forward rate (useful when you know only how much you want to send, e.g. a SWIFT payout of a fixed source balance). When both are sent, destinationAmount wins unless shouldPreferSourceAmount is true. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting sourceAmount makes the API compute destinationAmount at the live exchange rate.","pattern":"^(?=.*[1-9])\\d+(\\.\\d+)?$","example":"100.50","uniqueKey":"oneOf.0.sourceAmount.oneOf.1","typeLabel":"string"}],"uniqueKey":"oneOf.0.sourceAmount","typeLabel":"number | string"},"destinationAmount":{"oneOf":[{"type":"number","description":"The transaction amount in the destination currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: setting destinationAmount fixes the amount, while omitting it and sending sourceAmount lets the API compute destinationAmount at the live forward rate. A request with neither is rejected. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting destinationAmount instead makes the API compute sourceAmount at the inverse rate. Sending both amounts on a SWAP is rejected.","minimum":0,"example":"100.50","exclusiveMinimum":true,"uniqueKey":"oneOf.0.destinationAmount.oneOf.0","typeLabel":"number"},{"type":"string","description":"The transaction amount in the destination currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: setting destinationAmount fixes the amount, while omitting it and sending sourceAmount lets the API compute destinationAmount at the live forward rate. A request with neither is rejected. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting destinationAmount instead makes the API compute sourceAmount at the inverse rate. Sending both amounts on a SWAP is rejected.","pattern":"^(?=.*[1-9])\\d+(\\.\\d+)?$","example":"100.50","uniqueKey":"oneOf.0.destinationAmount.oneOf.1","typeLabel":"string"}],"uniqueKey":"oneOf.0.destinationAmount","typeLabel":"number | string"},"sourceId":{"type":"string","description":"Required for DEPOSIT transactions. The id of the source payment method that money will be pulled from.\n","examples":["690df3281c11eea59108fcaf"],"uniqueKey":"oneOf.0.sourceId","typeLabel":"string"},"shouldPreferSourceAmount":{"type":"boolean","description":"Opt in to deriving destinationAmount from sourceAmount even when both amounts are sent. Defaults to false, which keeps destination-wins semantics so a caller that echoes both amounts still gets the destinationAmount they asked for. Set true to have sourceAmount drive the payout via the forward rate.","uniqueKey":"oneOf.0.shouldPreferSourceAmount","typeLabel":"boolean"},"correspondentBankName":{"type":"string","description":"The correspondent (intermediary) bank name for USD payouts (WITHDRAW with destinationCurrency USD and meta.settlement 'request'). Only used as a fallback when the destination payment method lacks it. The payment method's value takes precedence. Must be provided together with correspondentBankAccountNumber.","uniqueKey":"oneOf.0.correspondentBankName","typeLabel":"string"},"correspondentBankAccountNumber":{"type":"string","description":"The correspondent (intermediary) bank account number for USD payouts (WITHDRAW with destinationCurrency USD and meta.settlement 'request'). Only used as a fallback when the destination payment method lacks it. The payment method's value takes precedence. Must be provided together with correspondentBankName.","uniqueKey":"oneOf.0.correspondentBankAccountNumber","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"Withdraw · object"},{"type":"object","title":"Deposit","description":"Pull funds from a customer's source payment method. Provide sourceAmount, destinationAmount or both. sourceCurrency and destinationCurrency must be the same currency; a mismatch is rejected.","required":["type","customerId","sourceCurrency","destinationCurrency","sourceId","meta"],"properties":{"type":{"type":"string","description":"The type of transaction. DEPOSIT pulls funds from the customer's source payment method (requires sourceId). WITHDRAW sends funds to the customer's destination payment method (requires destinationId). SWAP converts funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount; the API computes the other side at the live exchange rate, and sending both is rejected). If omitted, defaults to WITHDRAW.","enum":["DEPOSIT"],"isRequired":true,"uniqueKey":"oneOf.1.type","typeLabel":"enum\u003cstring>"},"customerId":{"type":"string","description":"The unique identifier of the customer. Required for DEPOSIT and WITHDRAW transactions. Not required for SWAP, if omitted, the transaction runs against the business wallet.","examples":["69528240ba52c13b669fb239"],"isRequired":true,"uniqueKey":"oneOf.1.customerId","typeLabel":"string"},"destinationCurrency":{"type":"string","pattern":"^[A-Z]{3}$","description":"The 3-letter ISO 4217 currency code of the destination currency (e.g., USD, NGN). Upper case, and a currency Afriex supports.","examples":["USD"],"isRequired":true,"uniqueKey":"oneOf.1.destinationCurrency","typeLabel":"string"},"sourceCurrency":{"type":"string","pattern":"^[A-Z]{3}$","description":"The 3-letter ISO 4217 currency code of the source currency (e.g., USD, NGN). Upper case, and a currency Afriex supports.","examples":["NGN"],"isRequired":true,"uniqueKey":"oneOf.1.sourceCurrency","typeLabel":"string"},"sourceId":{"type":"string","description":"Required for DEPOSIT transactions. The id of the source payment method that money will be pulled from.\n","examples":["690df3281c11eea59108fcaf"],"isRequired":true,"uniqueKey":"oneOf.1.sourceId","typeLabel":"string"},"meta":{"type":"object","properties":{"idempotencyKey":{"type":"string","description":"The idempotency key for the transaction.","isRequired":true,"uniqueKey":"oneOf.1.meta.idempotencyKey","typeLabel":"string"},"reference":{"type":"string","description":"The reference for the transaction.","isRequired":true,"uniqueKey":"oneOf.1.meta.reference","typeLabel":"string"},"narration":{"type":"string","description":"The optional reason for the transaction.","uniqueKey":"oneOf.1.meta.narration","typeLabel":"string"},"invoice":{"type":"string","description":"The invoice filename (S3 object key) for the transaction, as returned by the media upload endpoint. Required for SWIFT withdrawals: the referenced object is verified to exist in storage before the transaction is created, so upload the file first and pass the returned key verbatim.","uniqueKey":"oneOf.1.meta.invoice","typeLabel":"string"},"settlement":{"type":"string","enum":["spot","request"],"description":"Optional settlement handling for the transaction. `spot` (the default) processes immediately and debits your Payout wallet. `request` is only supported for WITHDRAW transactions: it debits your Collection wallet (rather than the default Payout wallet) and queues the payout for the next business day in the destination payment method's country. Omit `settlement` (or send `spot`) for an ordinary payout from the Payout wallet.","uniqueKey":"oneOf.1.meta.settlement","typeLabel":"enum\u003cstring>"}},"required":["idempotencyKey","reference"],"description":"Transaction metadata. idempotencyKey and reference are required.","isRequired":true,"uniqueKey":"oneOf.1.meta","typeLabel":"object"},"sourceAmount":{"oneOf":[{"type":"number","description":"The transaction amount in the source currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: sending sourceAmount alone lets the API compute destinationAmount at the live forward rate (useful when you know only how much you want to send, e.g. a SWIFT payout of a fixed source balance). When both are sent, destinationAmount wins unless shouldPreferSourceAmount is true. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting sourceAmount makes the API compute destinationAmount at the live exchange rate.","minimum":0,"example":"100.50","exclusiveMinimum":true,"uniqueKey":"oneOf.1.sourceAmount.oneOf.0","typeLabel":"number"},{"type":"string","description":"The transaction amount in the source currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: sending sourceAmount alone lets the API compute destinationAmount at the live forward rate (useful when you know only how much you want to send, e.g. a SWIFT payout of a fixed source balance). When both are sent, destinationAmount wins unless shouldPreferSourceAmount is true. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting sourceAmount makes the API compute destinationAmount at the live exchange rate.","pattern":"^(?=.*[1-9])\\d+(\\.\\d+)?$","example":"100.50","uniqueKey":"oneOf.1.sourceAmount.oneOf.1","typeLabel":"string"}],"uniqueKey":"oneOf.1.sourceAmount","typeLabel":"number | string"},"destinationAmount":{"oneOf":[{"type":"number","description":"The transaction amount in the destination currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: setting destinationAmount fixes the amount, while omitting it and sending sourceAmount lets the API compute destinationAmount at the live forward rate. A request with neither is rejected. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting destinationAmount instead makes the API compute sourceAmount at the inverse rate. Sending both amounts on a SWAP is rejected.","minimum":0,"example":"100.50","exclusiveMinimum":true,"uniqueKey":"oneOf.1.destinationAmount.oneOf.0","typeLabel":"number"},{"type":"string","description":"The transaction amount in the destination currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: setting destinationAmount fixes the amount, while omitting it and sending sourceAmount lets the API compute destinationAmount at the live forward rate. A request with neither is rejected. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting destinationAmount instead makes the API compute sourceAmount at the inverse rate. Sending both amounts on a SWAP is rejected.","pattern":"^(?=.*[1-9])\\d+(\\.\\d+)?$","example":"100.50","uniqueKey":"oneOf.1.destinationAmount.oneOf.1","typeLabel":"string"}],"uniqueKey":"oneOf.1.destinationAmount","typeLabel":"number | string"},"destinationId":{"type":"string","description":"Required for WITHDRAW transactions. The id of the destination payment method that money will be sent to.\n","examples":["690df3281c11eea59108fcaf"],"uniqueKey":"oneOf.1.destinationId","typeLabel":"string"},"shouldPreferSourceAmount":{"type":"boolean","description":"Opt in to deriving destinationAmount from sourceAmount even when both amounts are sent. Defaults to false, which keeps destination-wins semantics so a caller that echoes both amounts still gets the destinationAmount they asked for. Set true to have sourceAmount drive the payout via the forward rate.","uniqueKey":"oneOf.1.shouldPreferSourceAmount","typeLabel":"boolean"},"correspondentBankName":{"type":"string","description":"The correspondent (intermediary) bank name for USD payouts (WITHDRAW with destinationCurrency USD and meta.settlement 'request'). Only used as a fallback when the destination payment method lacks it. The payment method's value takes precedence. Must be provided together with correspondentBankAccountNumber.","uniqueKey":"oneOf.1.correspondentBankName","typeLabel":"string"},"correspondentBankAccountNumber":{"type":"string","description":"The correspondent (intermediary) bank account number for USD payouts (WITHDRAW with destinationCurrency USD and meta.settlement 'request'). Only used as a fallback when the destination payment method lacks it. The payment method's value takes precedence. Must be provided together with correspondentBankName.","uniqueKey":"oneOf.1.correspondentBankAccountNumber","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"Deposit · object"},{"type":"object","title":"Swap","description":"Convert funds between currencies within the Afriex wallet. Provide exactly one of sourceAmount or destinationAmount; sending both is rejected.","required":["type","sourceCurrency","destinationCurrency","meta"],"properties":{"type":{"type":"string","description":"The type of transaction. DEPOSIT pulls funds from the customer's source payment method (requires sourceId). WITHDRAW sends funds to the customer's destination payment method (requires destinationId). SWAP converts funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount; the API computes the other side at the live exchange rate, and sending both is rejected). If omitted, defaults to WITHDRAW.","enum":["SWAP"],"isRequired":true,"uniqueKey":"oneOf.2.type","typeLabel":"enum\u003cstring>"},"destinationCurrency":{"type":"string","pattern":"^[A-Z]{3}$","description":"The 3-letter ISO 4217 currency code of the destination currency (e.g., USD, NGN). Upper case, and a currency Afriex supports.","examples":["USD"],"isRequired":true,"uniqueKey":"oneOf.2.destinationCurrency","typeLabel":"string"},"sourceCurrency":{"type":"string","pattern":"^[A-Z]{3}$","description":"The 3-letter ISO 4217 currency code of the source currency (e.g., USD, NGN). Upper case, and a currency Afriex supports.","examples":["NGN"],"isRequired":true,"uniqueKey":"oneOf.2.sourceCurrency","typeLabel":"string"},"meta":{"type":"object","properties":{"idempotencyKey":{"type":"string","description":"The idempotency key for the transaction.","isRequired":true,"uniqueKey":"oneOf.2.meta.idempotencyKey","typeLabel":"string"},"reference":{"type":"string","description":"The reference for the transaction.","isRequired":true,"uniqueKey":"oneOf.2.meta.reference","typeLabel":"string"},"narration":{"type":"string","description":"The optional reason for the transaction.","uniqueKey":"oneOf.2.meta.narration","typeLabel":"string"},"invoice":{"type":"string","description":"The invoice filename (S3 object key) for the transaction, as returned by the media upload endpoint. Required for SWIFT withdrawals: the referenced object is verified to exist in storage before the transaction is created, so upload the file first and pass the returned key verbatim.","uniqueKey":"oneOf.2.meta.invoice","typeLabel":"string"},"settlement":{"type":"string","enum":["spot","request"],"description":"Optional settlement handling for the transaction. `spot` (the default) processes immediately and debits your Payout wallet. `request` is only supported for WITHDRAW transactions: it debits your Collection wallet (rather than the default Payout wallet) and queues the payout for the next business day in the destination payment method's country. Omit `settlement` (or send `spot`) for an ordinary payout from the Payout wallet.","uniqueKey":"oneOf.2.meta.settlement","typeLabel":"enum\u003cstring>"}},"required":["idempotencyKey","reference"],"description":"Transaction metadata. idempotencyKey and reference are required.","isRequired":true,"uniqueKey":"oneOf.2.meta","typeLabel":"object"},"customerId":{"type":"string","description":"The unique identifier of the customer. Required for DEPOSIT and WITHDRAW transactions. Not required for SWAP, if omitted, the transaction runs against the business wallet.","examples":["69528240ba52c13b669fb239"],"uniqueKey":"oneOf.2.customerId","typeLabel":"string"},"sourceAmount":{"oneOf":[{"type":"number","description":"The transaction amount in the source currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: sending sourceAmount alone lets the API compute destinationAmount at the live forward rate (useful when you know only how much you want to send, e.g. a SWIFT payout of a fixed source balance). When both are sent, destinationAmount wins unless shouldPreferSourceAmount is true. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting sourceAmount makes the API compute destinationAmount at the live exchange rate.","minimum":0,"example":"100.50","exclusiveMinimum":true,"uniqueKey":"oneOf.2.sourceAmount.oneOf.0","typeLabel":"number"},{"type":"string","description":"The transaction amount in the source currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: sending sourceAmount alone lets the API compute destinationAmount at the live forward rate (useful when you know only how much you want to send, e.g. a SWIFT payout of a fixed source balance). When both are sent, destinationAmount wins unless shouldPreferSourceAmount is true. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting sourceAmount makes the API compute destinationAmount at the live exchange rate.","pattern":"^(?=.*[1-9])\\d+(\\.\\d+)?$","example":"100.50","uniqueKey":"oneOf.2.sourceAmount.oneOf.1","typeLabel":"string"}],"uniqueKey":"oneOf.2.sourceAmount","typeLabel":"number | string"},"destinationAmount":{"oneOf":[{"type":"number","description":"The transaction amount in the destination currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: setting destinationAmount fixes the amount, while omitting it and sending sourceAmount lets the API compute destinationAmount at the live forward rate. A request with neither is rejected. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting destinationAmount instead makes the API compute sourceAmount at the inverse rate. Sending both amounts on a SWAP is rejected.","minimum":0,"example":"100.50","exclusiveMinimum":true,"uniqueKey":"oneOf.2.destinationAmount.oneOf.0","typeLabel":"number"},{"type":"string","description":"The transaction amount in the destination currency. For WITHDRAW and DEPOSIT, provide sourceAmount, destinationAmount or both: setting destinationAmount fixes the amount, while omitting it and sending sourceAmount lets the API compute destinationAmount at the live forward rate. A request with neither is rejected. For SWAP, provide exactly one of sourceAmount or destinationAmount: setting destinationAmount instead makes the API compute sourceAmount at the inverse rate. Sending both amounts on a SWAP is rejected.","pattern":"^(?=.*[1-9])\\d+(\\.\\d+)?$","example":"100.50","uniqueKey":"oneOf.2.destinationAmount.oneOf.1","typeLabel":"string"}],"uniqueKey":"oneOf.2.destinationAmount","typeLabel":"number | string"},"destinationId":{"type":"string","description":"Required for WITHDRAW transactions. The id of the destination payment method that money will be sent to.\n","examples":["690df3281c11eea59108fcaf"],"uniqueKey":"oneOf.2.destinationId","typeLabel":"string"},"sourceId":{"type":"string","description":"Required for DEPOSIT transactions. The id of the source payment method that money will be pulled from.\n","examples":["690df3281c11eea59108fcaf"],"uniqueKey":"oneOf.2.sourceId","typeLabel":"string"},"shouldPreferSourceAmount":{"type":"boolean","description":"Opt in to deriving destinationAmount from sourceAmount even when both amounts are sent. Defaults to false, which keeps destination-wins semantics so a caller that echoes both amounts still gets the destinationAmount they asked for. Set true to have sourceAmount drive the payout via the forward rate.","uniqueKey":"oneOf.2.shouldPreferSourceAmount","typeLabel":"boolean"},"correspondentBankName":{"type":"string","description":"The correspondent (intermediary) bank name for USD payouts (WITHDRAW with destinationCurrency USD and meta.settlement 'request'). Only used as a fallback when the destination payment method lacks it. The payment method's value takes precedence. Must be provided together with correspondentBankAccountNumber.","uniqueKey":"oneOf.2.correspondentBankName","typeLabel":"string"},"correspondentBankAccountNumber":{"type":"string","description":"The correspondent (intermediary) bank account number for USD payouts (WITHDRAW with destinationCurrency USD and meta.settlement 'request'). Only used as a fallback when the destination payment method lacks it. The payment method's value takes precedence. Must be provided together with correspondentBankName.","uniqueKey":"oneOf.2.correspondentBankAccountNumber","typeLabel":"string"}},"uniqueKey":"oneOf.2","typeLabel":"Swap · object"}],"uniqueKey":"","typeLabel":"Withdraw · object | Deposit · object | Swap · object"},"examples":{"Withdraw":{"title":"Withdraw","value":{"customerId":"69528240ba52c13b669fb239","type":"WITHDRAW","destinationAmount":5000,"sourceCurrency":"USD","destinationCurrency":"NGN","destinationId":"690df3281c11eea59108fcaf","meta":{"reference":"ref-withdraw-001","idempotencyKey":"idem-withdraw-001"}}},"WithdrawSourceAmount":{"title":"WithdrawSourceAmount","value":{"customerId":"69528240ba52c13b669fb239","type":"WITHDRAW","sourceAmount":10000,"sourceCurrency":"MZN","destinationCurrency":"USD","destinationId":"690df3281c11eea59108fcaf","meta":{"reference":"ref-withdraw-002","idempotencyKey":"idem-withdraw-002"}}},"Deposit":{"title":"Deposit","value":{"customerId":"69528240ba52c13b669fb239","type":"DEPOSIT","sourceAmount":"10","destinationAmount":10,"sourceCurrency":"USD","destinationCurrency":"USD","sourceId":"690df3281c11eea59108fcaf","meta":{"reference":"ref-deposit-001","idempotencyKey":"idem-deposit-001"}}},"Swap":{"title":"Swap","value":{"type":"SWAP","sourceAmount":10,"sourceCurrency":"USD","destinationCurrency":"NGN","meta":{"reference":"ref-swap-001","idempotencyKey":"idem-swap-001"}}},"SwapDestination":{"title":"SwapDestination","value":{"type":"SWAP","destinationAmount":16500,"sourceCurrency":"USD","destinationCurrency":"NGN","meta":{"reference":"ref-swap-002","idempotencyKey":"idem-swap-002"}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"9b550320-b61b-4fbb-94be-d1baf504e900":{"description":"Transaction created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"transactionId":{"type":"string","description":"The unique identifier for the transaction.","uniqueKey":"data.transactionId","typeLabel":"string"},"customerId":{"type":"string","description":"The unique identifier of the customer.","uniqueKey":"data.customerId","typeLabel":"string"},"sourceId":{"type":"string","description":"The unique identifier of the source payment method.","uniqueKey":"data.sourceId","typeLabel":"string"},"destinationId":{"type":"string","description":"The unique identifier of the destination payment method.","uniqueKey":"data.destinationId","typeLabel":"string"},"sourceAmount":{"type":"string","description":"The souce transaction amount value","uniqueKey":"data.sourceAmount","typeLabel":"string"},"sourceCurrency":{"type":"string","description":"The currency code of the wallet charged.","uniqueKey":"data.sourceCurrency","typeLabel":"string"},"destinationAmount":{"type":"string","description":"The destination transaction amount value","uniqueKey":"data.destinationAmount","typeLabel":"string"},"destinationCurrency":{"type":"string","description":"The description currency code.","uniqueKey":"data.destinationCurrency","typeLabel":"string"},"type":{"type":"string","enum":["DEPOSIT","WITHDRAW","SWAP","REVERSAL","SCHEDULED","SEND"],"description":"The type of transaction. You can create `DEPOSIT`, `WITHDRAW` and `SWAP`; the other values can appear on transactions listed or fetched for your business.","uniqueKey":"data.type","typeLabel":"enum\u003cstring>"},"channel":{"type":"string","enum":["BANK_ACCOUNT","SWIFT","MOBILE_MONEY","UPI","INTERAC","WE_CHAT","CARD","CRYPTO","VIRTUAL_BANK_ACCOUNT","POOL_ACCOUNT","ACH_BANK_ACCOUNT","PAYBILL_TILL","RFP","VIRTUAL_CARD","ALIPAY","WALLET","PAYMENT_LINQ","ADMIN"],"description":"The payment channel of the transaction. `ADMIN` marks an adjustment Afriex made to your wallet; `PAYMENT_LINQ` a payment made through a payment link.","uniqueKey":"data.channel","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["PENDING","PROCESSING","SUCCESS","FAILED","CANCELLED","REFUNDED","RETRY","UNKNOWN","SCHEDULED","CUSTOMER_ACTION_REQUIRED","REJECTED","IN_REVIEW","RFI_REQUESTED","DISPUTED","DISPUTE_RESOLVED","DISPUTE_WON","DISPUTE_LOST","DISPUTE_EVIDENCE_SUBMITTED"],"description":"The current status of the transaction.\n\n`IN_REVIEW` and `RFI_REQUESTED` are review states: the transaction is still in flight and is waiting on a review, not on you. Treat them as non-terminal and keep polling or listening for `TRANSACTION.UPDATED`. `RFI_REQUESTED` may result in someone contacting you for more information about the transfer.","uniqueKey":"data.status","typeLabel":"enum\u003cstring>"},"merchantReference":{"type":"string","description":"The merchant-supplied reference for the transaction (mirrors meta.reference from the create request).","uniqueKey":"data.merchantReference","typeLabel":"string"},"rate":{"type":"string","description":"The realized source-to-destination exchange rate for the transaction, expressed as `1 sourceCurrency = rate destinationCurrency` (equal to destinationAmount / sourceAmount).","uniqueKey":"data.rate","typeLabel":"string"},"fee":{"type":"string","description":"The fee charged for this transaction, denominated in `sourceCurrency`. It is reported separately from `sourceAmount`. Omitted when no fee applied to the transaction.","uniqueKey":"data.fee","typeLabel":"string"},"meta":{"type":"object","description":"Transaction metadata. Echoes the metadata you attached on create and may include server-set state flags such as `otpRequired` and `failureReason`.","properties":{"narration":{"type":"string","description":"The narration you attached when creating the transaction, echoed back. An empty string when none was provided.","uniqueKey":"data.meta.narration","typeLabel":"string"},"otpRequired":{"type":"boolean","description":"Returned on deposits that may need an extra authorization step. When `true`, the deposit is waiting for the customer to submit a one-time password; call `POST /transaction/{transactionId}/authorize` to complete it.","uniqueKey":"data.meta.otpRequired","typeLabel":"boolean"},"failureReason":{"type":"object","description":"Present only when `status` is `FAILED` or `REJECTED`. Carries a stable `AFX_*` code and a customer-safe message. Branch on `code` rather than the underlying rail so your integration stays stable across routing changes.","required":["code","message","retryable"],"properties":{"code":{"type":"string","description":"Stable `AFX_*` failure code. Safe to switch on; the set grows over time but existing values do not change meaning.","example":"AFX_VELOCITY_LIMIT_EXCEEDED","enum":["AFX_REQUEST_FAILED","AFX_SYSTEM_ERROR","AFX_SERVICE_UNAVAILABLE","AFX_INVALID_CURRENCY","AFX_INVALID_AMOUNT","AFX_INVALID_RECIPIENT","AFX_RECIPIENT_NOT_FOUND","AFX_ACCOUNT_CLOSED","AFX_NAME_MISMATCH","AFX_BENEFICIARY_RESTRICTED","AFX_INVALID_SENDER","AFX_INVALID_REQUEST","AFX_VELOCITY_LIMIT_EXCEEDED","AFX_AMOUNT_LIMIT_EXCEEDED","AFX_RECIPIENT_WALLET_LIMIT_REACHED","AFX_PAYMENT_FAILED","AFX_COMPLIANCE_REJECTED","AFX_PROPOSAL_EXPIRED"],"isRequired":true,"uniqueKey":"data.meta.failureReason.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Customer-safe short description of the failure. Suitable for display; do not parse it. Branch on `code` instead.","isRequired":true,"uniqueKey":"data.meta.failureReason.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"`true` when re-submitting the same request (or, for `AFX_PROPOSAL_EXPIRED`, starting a fresh proposal) may succeed. `false` when the caller must change the request before retrying.","isRequired":true,"uniqueKey":"data.meta.failureReason.retryable","typeLabel":"boolean"}},"uniqueKey":"data.meta.failureReason","typeLabel":"object"}},"additionalProperties":true,"uniqueKey":"data.meta","typeLabel":"object"},"createdAt":{"type":"string","description":"The date and time the transaction was created.","uniqueKey":"data.createdAt","typeLabel":"string"},"updatedAt":{"type":"string","description":"The date and time the transaction was last updated.","uniqueKey":"data.updatedAt","typeLabel":"string"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"withdraw":{"title":"withdraw","value":{"data":{"status":"PENDING","type":"WITHDRAW","channel":"BANK_ACCOUNT","sourceAmount":"3.28847","sourceCurrency":"USD","destinationAmount":"5000","destinationCurrency":"NGN","destinationId":"690df3281c11eea59108fcaf","customerId":"69528240ba52c13b669fb239","transactionId":"69d60071ab82306f11b03393","merchantReference":"ref-withdraw-001","meta":{"reference":"ref-withdraw-001","idempotencyKey":"idem-withdraw-001","narration":""},"createdAt":"2026-04-08T07:14:57.444Z","updatedAt":"2026-04-08T07:14:57.444Z"}}},"swap":{"title":"swap","value":{"data":{"status":"SUCCESS","type":"SWAP","channel":"WALLET","sourceAmount":"10","sourceCurrency":"USD","destinationAmount":"14101.041","destinationCurrency":"NGN","customerId":"","transactionId":"69d60072ab82306f11b033b9","merchantReference":"ref-swap-001","meta":{"reference":"ref-swap-001","idempotencyKey":"idem-swap-001","narration":""},"createdAt":"2026-04-08T07:14:58.237Z","updatedAt":"2026-04-08T07:14:58.237Z"}}}},"exampleType":"examples"}},"exampleType":"examples"},"c303e01c-78a6-49c9-9553-a60f2b324bd7":{"description":"Invalid request, or your business is not yet allowed to use the API: no webhook URL is set, the request IP is not on your whitelist, the business is not approved or is deactivated, business verification (KYB) is required, or the transaction is below the minimum that one of your business limits allows. `details.friendlyMessage` says which.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"swapBothAmounts":{"title":"swapBothAmounts","value":{"code":"INVALID_BUSINESS_TRANSACTION_REQUEST","error":"Invalid business transaction request","details":{"errorMessage":"Invalid business transaction request","friendlyMessage":"Only one of source amount or destination amount can be provided"}}},"missingDestinationAmount":{"title":"missingDestinationAmount","value":{"code":"INVALID_BUSINESS_TRANSACTION_REQUEST","error":"Invalid business transaction request","details":{"errorMessage":"Invalid business transaction request","friendlyMessage":"Either source amount or destination amount is required"}}},"depositCurrencyMismatch":{"title":"depositCurrencyMismatch","value":{"code":"INVALID_BUSINESS_TRANSACTION_REQUEST","error":"Invalid business transaction request","details":{"errorMessage":"Invalid business transaction request","friendlyMessage":"Source and destination currencies must match for deposits"}}},"preferSourceWithoutSourceAmount":{"title":"preferSourceWithoutSourceAmount","value":{"code":"INVALID_BUSINESS_TRANSACTION_REQUEST","error":"Invalid business transaction request","details":{"errorMessage":"Invalid business transaction request","friendlyMessage":"Source amount is required when shouldPreferSourceAmount is true"}}},"cardDeposit":{"title":"cardDeposit","value":{"code":"BAD_REQUEST_ERROR","error":"Card deposits cannot be created through the API","details":{}}},"noWebhookUrl":{"title":"noWebhookUrl","value":{"code":"INVALID_BUSINESS_API_REQUEST","error":"Invalid business api request","details":{"errorMessage":"Invalid business api request","friendlyMessage":"No webhook url set in account"}}},"invalidCurrency":{"title":"invalidCurrency","value":{"code":"INVALID_BUSINESS_TRANSACTION_REQUEST","error":"Invalid business transaction request","details":{"errorMessage":"Invalid business transaction request","friendlyMessage":"Invalid source currency"}}},"missingIdempotencyKey":{"title":"missingIdempotencyKey","value":{"code":"INVALID_BUSINESS_TRANSACTION_REQUEST","error":"Invalid business transaction request","details":{"errorMessage":"Invalid business transaction request","friendlyMessage":"No idempotency key provided"}}},"belowBusinessMinimum":{"title":"belowBusinessMinimum","value":{"code":"BUSINESS_TRANSACTION_MIN_AMOUNT_NOT_MET","error":"Business transaction min amount not met","details":{"errorMessage":"Business transaction min amount not met","friendlyMessage":"The minimum for this transaction is 10 USD."}}}},"exampleType":"examples"}},"exampleType":"examples"},"10c788a8-cbfa-49b2-b060-d9df4b1fd573":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"missingApiKey":{"title":"missingApiKey","value":{"code":"AUTHENTICATION_ERROR","error":"Authorization header is missing","details":{}}},"invalidApiKey":{"title":"invalidApiKey","value":{"code":"AUTHENTICATION_ERROR","error":"Invalid authorization header","details":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"8835a007-7e6e-44a5-a417-6af98d890fff":{"description":"Your wallet balance is too low to cover the transaction. Fund the wallet and send the request again.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"balanceInsufficient":{"title":"balanceInsufficient","value":{"code":"BALANCE_INSUFFICIENT","error":"Balance insufficient","details":{"errorMessage":"Balance insufficient","friendlyMessage":""}}}},"exampleType":"examples"}},"exampleType":"examples"},"3e1d4e4e-92ca-49f3-887d-f155eac93419":{"description":"The transaction is refused: it would take your business over one of its limits, the customer or business is not verified, the payment method is not active, or withdrawals are suspended for your business. For a limit, `details.friendlyMessage` gives the limit and its period, and for a daily, weekly or monthly amount limit how much is left.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"businessLimitExceeded":{"title":"businessLimitExceeded","value":{"code":"BUSINESS_LIMIT_EXCEEDED","error":"Business limit exceeded","details":{"errorMessage":"Business limit exceeded","friendlyMessage":"This transaction would go over your daily limit of 5,000 USD. You have 1,200 USD left."}}},"customerNotVerified":{"title":"customerNotVerified","value":{"code":"USER_NOT_VERIFIED","error":"User not verified","details":{"errorMessage":"User not verified","friendlyMessage":""}}},"paymentMethodNotActive":{"title":"paymentMethodNotActive","value":{"code":"PAYMENT_METHOD_NOT_ACTIVE","error":"Payment method not active","details":{"errorMessage":"Payment method not active","friendlyMessage":""}}}},"exampleType":"examples"}},"exampleType":"examples"},"869a9f46-c26f-4e44-8638-2ee4b585e67a":{"description":"Not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"customerNotFound":{"title":"customerNotFound","value":{"code":"USER_NOT_FOUND","error":"User not found","details":{"errorMessage":"User not found","friendlyMessage":""}}},"paymentMethodNotFound":{"title":"paymentMethodNotFound","value":{"code":"PAYMENT_METHOD_NOT_FOUND","error":"Payment method not found","details":{"errorMessage":"Payment method not found","friendlyMessage":""}}},"ratesNotFound":{"title":"ratesNotFound","value":{"code":"TRANSACTION_RATES_NOT_FOUND","error":"Transaction rates not found","details":{"errorMessage":"Transaction rates not found","friendlyMessage":""}}}},"exampleType":"examples"}},"exampleType":"examples"},"5140d3f7-9a51-48a6-8f70-aef6e4faafbd":{"description":"A transaction with the same `meta.idempotencyKey` or `meta.reference` already exists, or is still being processed. Nothing is charged twice; look up the original with GET /api/v1/transaction.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"duplicate":{"title":"duplicate","value":{"code":"DUPLICATE_REQUEST","error":"Duplicate request","details":{"errorMessage":"Duplicate request","friendlyMessage":"A transaction with the same idempotency key or merchant reference already exists"}}},"inFlight":{"title":"inFlight","value":{"code":"DUPLICATE_REQUEST","error":"Duplicate request","details":{"errorMessage":"Duplicate request","friendlyMessage":"A transaction with the same idempotency key or merchant reference is already being processed"}}}},"exampleType":"examples"}},"exampleType":"examples"},"5ed7382a-dc61-4441-aff5-029b39026f8d":{"description":"The transaction cannot be created: the payment method's currency does not match `destinationCurrency`, or the destination country is not currently available. `details.friendlyMessage` carries the specific error.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"currencyMismatch":{"title":"currencyMismatch","value":{"code":"PAYMENT_METHOD_CURRENCY_MISMATCH","error":"Payment method currency mismatch","details":{"errorMessage":"Payment method currency mismatch","friendlyMessage":""}}},"countryNotSupported":{"title":"countryNotSupported","value":{"code":"COUNTRY_NOT_SUPPORTED","error":"Country not supported","details":{"errorMessage":"Country not supported","friendlyMessage":"Transactions for NG are not available at the moment"}}}},"exampleType":"examples"}},"exampleType":"examples"},"ad82a40f-9d29-4e29-9ebd-623fd54d5402":{"description":"More than 60 transaction create requests from your business in the last 60 seconds. Rejected requests count toward the limit, so wait and retry with backoff, reusing the same `meta.idempotencyKey` so a retry cannot create a duplicate.","headers":{"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate limit window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the next request fits in the window.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent with a 429.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"rateLimited":{"title":"rateLimited","value":{"code":"RATE_LIMIT_ERROR","error":"You can't make this request at the moment. Please try again later","details":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"23eba04f-c326-460b-959a-d04111d40789":{"description":"The destination country or channel is blocked and cannot be used.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"destinationBlocked":{"title":"destinationBlocked","value":{"code":"CORRIDOR_BLOCKED","error":"Corridor blocked","details":{"errorMessage":"Corridor blocked","friendlyMessage":""}}}},"exampleType":"examples"}},"exampleType":"examples"},"ec994800-3178-44cb-bfe7-60e2fa5ed22d":{"description":"Server error.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"serverError":{"title":"serverError","value":{"code":"INTERNAL_SERVER_ERROR","error":"It's not you, it's us, please reach out to support","details":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"01d74496-da39-412a-801e-bb6ccfe4ffba":{"description":"Temporarily unavailable: an upstream service failed or timed out, or the API is momentarily offline. Retry with backoff and honour the Retry-After header when present.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","uniqueKey":"code","typeLabel":"string"},"error":{"type":"string","description":"Human-readable error message.","uniqueKey":"error","typeLabel":"string"},"details":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Detailed/technical error message.","uniqueKey":"details.errorMessage","typeLabel":"string"},"friendlyMessage":{"type":"string","description":"User-facing error message safe to display.","uniqueKey":"details.friendlyMessage","typeLabel":"string"},"data":{"type":"object","description":"Optional caller-safe context for the error. On a customer-create uniqueness conflict (EMAIL_ALREADY_EXISTS / PHONE_NUMBER_ALREADY_EXISTS) this carries the existing customer's id, so you can adopt it without a follow-up lookup.","properties":{"customerId":{"type":"string","description":"Id of the existing customer (on a create conflict).","uniqueKey":"details.data.customerId","typeLabel":"string"}},"uniqueKey":"details.data","typeLabel":"object"}},"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"serviceUnavailable":{"title":"serviceUnavailable","value":{"code":"EXTERNAL_REQUEST_ERROR","error":"External request error","details":{}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"c6e6cee1-f5cd-49d4-aecb-1d77573277f3":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Static business API key issued from the dashboard. A business can\nprovision **multiple API keys**, each scoped to a configurable set\nof **permissions** (e.g. read transactions, create deposits, etc).\nPermissions are chosen per key at creation time in the dashboard\nand may be revoked by deleting the key. Manage your keys and\ntheir permissions under **Developer → API keys** in the dashboard.\n\nA request whose key does not carry the permission the target\nendpoint requires is rejected with `401 Unauthorized`, the same\nresponse an unrecognised, malformed, revoked or disabled key\nreturns. The API does not distinguish the two cases on the wire.\n\nSee the [Permissions reference](https://docs.afriex.com/api-reference/permissions)\nfor the permission each endpoint requires.","scopes":[],"schemeName":"ApiKey"}}},"servers":{"3298ae0b-7333-4b60-8d1b-b6d15dc0a1b5":{"url":"https://sandbox.api.afriex.com","description":"Sandbox Base URL"},"9fc63886-0a83-446b-9588-6621dfbf98da":{"url":"https://api.afriex.com","description":"Production Base URL"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Static business API key issued from the dashboard. A business can\nprovision **multiple API keys**, each scoped to a configurable set\nof **permissions** (e.g. read transactions, create deposits, etc).\nPermissions are chosen per key at creation time in the dashboard\nand may be revoked by deleting the key. Manage your keys and\ntheir permissions under **Developer → API keys** in the dashboard.\n\nA request whose key does not carry the permission the target\nendpoint requires is rejected with `401 Unauthorized`, the same\nresponse an unrecognised, malformed, revoked or disabled key\nreturns. The API does not distinguish the two cases on the wire.\n\nSee the [Permissions reference](https://docs.afriex.com/api-reference/permissions)\nfor the permission each endpoint requires.","scopes":[],"schemeName":"ApiKey"},"schema":{"title":"x-api-key","type":"string","description":"Static business API key issued from the dashboard. A business can\nprovision **multiple API keys**, each scoped to a configurable set\nof **permissions** (e.g. read transactions, create deposits, etc).\nPermissions are chosen per key at creation time in the dashboard\nand may be revoked by deleting the key. Manage your keys and\ntheir permissions under **Developer → API keys** in the dashboard.\n\nA request whose key does not carry the permission the target\nendpoint requires is rejected with `401 Unauthorized`, the same\nresponse an unrecognised, malformed, revoked or disabled key\nreturns. The API does not distinguish the two cases on the wire.\n\nSee the [Permissions reference](https://docs.afriex.com/api-reference/permissions)\nfor the permission each endpoint requires.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKey","name":"x-api-key"}],"title":"ApiKey"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"afriex-5d97ad2e","siteName":"Afriex Business API","title":"Create Transaction - Afriex Business API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-16T09:09:39.988Z","originalFileLocation":"api-reference/endpoint/transactions/create.mdx"},"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=\"Create a new transaction to process a payment for a customer. Use type: WITHDRAW to send funds to a destination payment method (requires destinationId), type: DEPOSIT to pull funds from a source payment method (requires sourceId), or type: SWAP to convert funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount). A DEPOSIT settles in one currency, so sourceCurrency and destinationCurrency must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Afriex Business API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Transaction - Afriex Business API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new transaction to process a payment for a customer. Use type: WITHDRAW to send funds to a destination payment method (requires destinationId), type: DEPOSIT to pull funds from a source payment method (requires sourceId), or type: SWAP to convert funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount). A DEPOSIT settles in one currency, so sourceCurrency and destinationCurrency must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Afriex Business API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.afriex.com/api-reference/endpoint/transactions/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://afriex-5d97ad2e.mintlify.app/_mintlify/api/og/v2?division=Transactions\u0026amp;title=Create+Transaction\u0026amp;description=Create+a+new+transaction+to+process+a+payment+for+a+customer.+Use+%60type%3A+WITHDRAW%60+to+send+funds+to+a+destination+payment+method+%28requires+%60destinationId%60%29%2C+%60ty\u0026amp;theme=c5e7ac6707206fe4b7db0208\u0026amp;signature=4fd669521148b779659f6a5d3fdf3cc2253c2d13f361ff79e2feec1fa3a5b55f\">\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 Transaction - Afriex Business API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new transaction to process a payment for a customer. Use type: WITHDRAW to send funds to a destination payment method (requires destinationId), type: DEPOSIT to pull funds from a source payment method (requires sourceId), or type: SWAP to convert funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount). A DEPOSIT settles in one currency, so sourceCurrency and destinationCurrency must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://afriex-5d97ad2e.mintlify.app/_mintlify/api/og/v2?division=Transactions\u0026amp;title=Create+Transaction\u0026amp;description=Create+a+new+transaction+to+process+a+payment+for+a+customer.+Use+%60type%3A+WITHDRAW%60+to+send+funds+to+a+destination+payment+method+%28requires+%60destinationId%60%29%2C+%60ty\u0026amp;theme=c5e7ac6707206fe4b7db0208\u0026amp;signature=4fd669521148b779659f6a5d3fdf3cc2253c2d13f361ff79e2feec1fa3a5b55f\">\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=\"/mintlify-assets/_mintlify/favicons/afriex-5d97ad2e/ZexKAY-mYWAtBk6G/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Afriex Business API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0075FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.afriex.com/api-reference/endpoint/transactions/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/transactions/create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.afriex.com/#organization\",\"name\":\"Afriex Business API\",\"url\":\"https://docs.afriex.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/afriex-5d97ad2e/-0c2OtRvdHYWM-P9/logo/light.svg?fit=max\u0026auto=format\u0026n=-0c2OtRvdHYWM-P9\u0026q=85\u0026s=de5afeca786c40704f98e96da7d2b1b9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.afriex.com#website\",\"name\":\"Afriex Business API\",\"url\":\"https://docs.afriex.com\",\"publisher\":{\"@id\":\"https://docs.afriex.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.afriex.com/api-reference/endpoint/transactions/create#webpage\",\"url\":\"https://docs.afriex.com/api-reference/endpoint/transactions/create\",\"name\":\"Create Transaction\",\"description\":\"Create a new transaction to process a payment for a customer. Use type: WITHDRAW to send funds to a destination payment method (requires destinationId), type: DEPOSIT to pull funds from a source payment method (requires sourceId), or type: SWAP to convert funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount). A DEPOSIT settles in one currency, so sourceCurrency and destinationCurrency must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.\",\"dateModified\":\"2026-10-16T09:09:39.988Z\",\"isPartOf\":{\"@id\":\"https://docs.afriex.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.afriex.com/api-reference/endpoint/transactions/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.afriex.com/api-reference/endpoint/transactions/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Afriex Business API\",\"item\":\"https://docs.afriex.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Transaction\",\"item\":\"https://docs.afriex.com/api-reference/endpoint/transactions/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.afriex.com/api-reference/endpoint/transactions/create#apireference\",\"headline\":\"Create Transaction\",\"name\":\"Create Transaction\",\"description\":\"Create a new transaction to process a payment for a customer. Use type: WITHDRAW to send funds to a destination payment method (requires destinationId), type: DEPOSIT to pull funds from a source payment method (requires sourceId), or type: SWAP to convert funds between currencies within the Afriex wallet (requires sourceCurrency, destinationCurrency, meta, and exactly one of sourceAmount or destinationAmount). A DEPOSIT settles in one currency, so sourceCurrency and destinationCurrency must be the same. Card deposits cannot be created through the API. Your business must have a webhook URL set, otherwise the request is rejected with a 400.\",\"url\":\"https://docs.afriex.com/api-reference/endpoint/transactions/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.afriex.com/api-reference/endpoint/transactions/create#webpage\"},\"dateModified\":\"2026-10-16T09:09:39.988Z\",\"publisher\":{\"@id\":\"https://docs.afriex.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.afriex.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Afriex Business API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Afriex Business API","nav":{"global":{"anchors":[{"anchor":"Status","icon":"wave-pulse","href":"https://afriex.statuspage.io"},{"anchor":"Support","icon":"envelope","href":"mailto:support@afriex.com"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/sdk/introduction"}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/introduction"}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Permissions","href":"/api-reference/permissions"},{"title":"IP allowlisting","href":"/api-reference/ip-allowlisting"}]},{"group":"Requests and responses","pages":[{"title":"Idempotency","href":"/api-reference/idempotency"},{"title":"Errors","href":"/api-reference/errors"},{"title":"Pagination","href":"/api-reference/pagination"},{"title":"Rate limits","href":"/api-reference/rate-limits"},{"title":"Models","href":"/api-reference/models"}]},{"group":"Balance","pages":[{"title":"Get Balance","openapi":"GET /api/v1/org/balance","href":"/api-reference/endpoint/balance/get"}]},{"group":"Checkout Sessions","pages":[{"title":"Checkout Flow Guide","href":"/api-reference/endpoint/checkout-sessions/user-flow-guide"},{"title":"Create Checkout Session","openapi":"POST /api/v1/checkout-session","href":"/api-reference/endpoint/checkout-sessions/create"}]},{"group":"Rates","pages":[{"title":"Get Exchange Rates","openapi":"GET /api/v1/org/rates","href":"/api-reference/endpoint/rates/get"}]},{"group":"Customers","pages":[{"title":"Create Customer","openapi":"POST /api/v1/customer","href":"/api-reference/endpoint/customers/create"},{"title":"List Customers","openapi":"GET /api/v1/customer","href":"/api-reference/endpoint/customers/list"},{"title":"Get Customer","openapi":"GET /api/v1/customer/{customerId}","href":"/api-reference/endpoint/customers/get"},{"title":"Update Customer","openapi":"PATCH /api/v1/customer/{customerId}","href":"/api-reference/endpoint/customers/update"},{"title":"Delete Customer","openapi":"DELETE /api/v1/customer/{customerId}","href":"/api-reference/endpoint/customers/delete"},{"title":"Update Customer KYC","openapi":"PATCH /api/v1/customer/{customerId}/kyc","href":"/api-reference/endpoint/customers/update-kyc"},{"title":"Verify Customer","openapi":"POST /api/v1/customer/{customerId}/verify","href":"/api-reference/endpoint/customers/verify"}]},{"group":"Payment Methods","pages":[{"title":"Create Payment Method","openapi":"POST /api/v1/payment-method","href":"/api-reference/endpoint/payment-methods/create"},{"title":"List Payment Methods","openapi":"GET /api/v1/payment-method","href":"/api-reference/endpoint/payment-methods/list"},{"title":"Get Payment Method","openapi":"GET /api/v1/payment-method/{paymentMethodId}","href":"/api-reference/endpoint/payment-methods/get"},{"title":"Delete Payment Method","openapi":"DELETE /api/v1/payment-method/{paymentMethodId}","href":"/api-reference/endpoint/payment-methods/delete"},{"title":"List Institutions","openapi":"GET /api/v1/payment-method/institution","href":"/api-reference/endpoint/payment-methods/institution"},{"title":"Institution Codes","openapi":"GET /api/v1/payment-method/institution/codes","href":"/api-reference/endpoint/payment-methods/institution-codes"},{"title":"Resolve Payment Method","openapi":"GET /api/v1/payment-method/resolve","href":"/api-reference/endpoint/payment-methods/resolve"},{"title":"Get or Create Crypto Wallet","openapi":"GET /api/v1/payment-method/crypto-wallet","href":"/api-reference/endpoint/payment-methods/crypto-wallet"},{"title":"List Virtual Accounts","openapi":"GET /api/v1/payment-method/virtual-account","href":"/api-reference/endpoint/payment-methods/virtual-account"},{"title":"Create Virtual Account","openapi":"POST /api/v1/payment-method/virtual-account","href":"/api-reference/endpoint/payment-methods/virtual-account-create"},{"title":"Get Pool Account","openapi":"GET /api/v1/payment-method/pool-account","href":"/api-reference/endpoint/payment-methods/pool-account"}]},{"group":"Media","pages":[{"title":"Generate Upload URL","openapi":"POST /api/v1/media/url","description":"Generates a presigned S3 URL that the caller can use to upload a file (e.g. a KYC document) directly to Afriex's secure storage. The returned URL is time-limited and scoped to the requested operation. The file name is sanitised before it is used: any directory part is dropped, characters outside `A-Z a-z 0-9 . _ -` become `_`, and the result is cut to 200 characters. The object is stored as `{businessId}/{sanitisedName}`, so always use the returned `key`, not the name you sent, when you reference the file in a later request.","href":"/api-reference/endpoint/media/generate-upload-url"}]},{"group":"Transactions","pages":[{"title":"Create Transaction","openapi":"POST /api/v1/transaction","href":"/api-reference/endpoint/transactions/create"},{"title":"List Transactions","openapi":"GET /api/v1/transaction","description":"Retrieves a paginated list of transactions.","href":"/api-reference/endpoint/transactions/list"},{"title":"Quote a Withdrawal","openapi":"GET /api/v1/transaction/quote","href":"/api-reference/endpoint/transactions/quote"},{"title":"Get Transaction","openapi":"GET /api/v1/transaction/{transactionId}","href":"/api-reference/endpoint/transactions/get"},{"title":"Authorize Transaction","openapi":"POST /api/v1/transaction/{transactionId}/authorize","href":"/api-reference/endpoint/transactions/authorize"},{"title":"Get Settlement Advice","openapi":"GET /api/v1/transaction/{transactionId}/advice","href":"/api-reference/endpoint/transactions/advice"},{"title":"Submit Pool-Account Payment Proof","openapi":"POST /api/v1/transaction/pool-account","href":"/api-reference/endpoint/transactions/pool-account-proof"}]},{"group":"Payment Batches","pages":[{"title":"List Payment Batches","openapi":"GET /api/v1/payment-batch","href":"/api-reference/endpoint/payment-batches/list"},{"title":"Create Payment Batch","openapi":"POST /api/v1/payment-batch","href":"/api-reference/endpoint/payment-batches/create"},{"title":"Get Payment Batch","openapi":"GET /api/v1/payment-batch/{batchId}","href":"/api-reference/endpoint/payment-batches/get"},{"title":"Update Payment Batch","openapi":"PATCH /api/v1/payment-batch/{batchId}","href":"/api-reference/endpoint/payment-batches/update"},{"title":"Delete Payment Batch","openapi":"DELETE /api/v1/payment-batch/{batchId}","href":"/api-reference/endpoint/payment-batches/delete"},{"title":"List Batch Recipients","openapi":"GET /api/v1/payment-batch/{batchId}/recipients","href":"/api-reference/endpoint/payment-batches/list-recipients"},{"title":"Add Recipient to Batch","openapi":"POST /api/v1/payment-batch/{batchId}/recipients","href":"/api-reference/endpoint/payment-batches/add-recipient"},{"title":"Bulk Add Recipients to Batch","openapi":"POST /api/v1/payment-batch/{batchId}/recipients/bulk","href":"/api-reference/endpoint/payment-batches/add-recipients-bulk"},{"title":"Update Recipient in Batch","openapi":"PATCH /api/v1/payment-batch/{batchId}/recipients/{recipientId}","href":"/api-reference/endpoint/payment-batches/update-recipient"},{"title":"Remove Recipient from Batch","openapi":"DELETE /api/v1/payment-batch/{batchId}/recipients/{recipientId}","href":"/api-reference/endpoint/payment-batches/remove-recipient"},{"title":"Withdraw Batch","openapi":"POST /api/v1/payment-batch/{batchId}/withdraw","href":"/api-reference/endpoint/payment-batches/withdraw"},{"title":"List Batch Sessions","openapi":"GET /api/v1/payment-batch/{batchId}/sessions","href":"/api-reference/endpoint/payment-batches/list-sessions"}]},{"group":"SME Registration","pages":[{"title":"Register SME","openapi":"POST /api/v1/sme-registration","href":"/api-reference/endpoint/sme-registration/register"},{"title":"Get SME Registration Status","openapi":"GET /api/v1/sme-registration/status","href":"/api-reference/endpoint/sme-registration/status"}]},{"group":"Sandbox helpers","pages":[{"title":"Simulate Transaction Outcome","openapi":"POST /api/v1/transaction/{transactionId}/simulate","href":"/api-reference/endpoint/transactions/simulate"},{"title":"Top Up Sandbox Balance","openapi":"POST /api/v1/org/balance/topup","href":"/api-reference/endpoint/balance/topup"},{"title":"Simulate Virtual Account Transfer","openapi":"POST /api/v1/payment-method/virtual-account/simulate-transfer","href":"/api-reference/endpoint/payment-methods/virtual-account-simulate-transfer"},{"title":"Trigger Test Webhook","openapi":"POST /api/v1/webhooks/trigger","href":"/api-reference/endpoint/webhooks/trigger"}]},{"group":"Webhooks","pages":[{"title":"Introduction","href":"/api-reference/endpoint/webhooks/introduction"},{"title":"Customer Events","openapi":"webhook customer.events","href":"/api-reference/endpoint/webhooks/customer-events"},{"title":"Payment Method Events","openapi":"webhook payment_method.events","href":"/api-reference/endpoint/webhooks/payment-method-events"},{"title":"Transaction Events","openapi":"webhook transaction.events","href":"/api-reference/endpoint/webhooks/transaction-events"},{"title":"Checkout Session Events","openapi":"webhook checkout_session.events","href":"/api-reference/endpoint/webhooks/checkout-session-events"},{"title":"Pool Deposit Events","openapi":"webhook pool_deposit_request.events","href":"/api-reference/endpoint/webhooks/pool-deposit-events"}]}]}]},"basePath":"","title":"Create Transaction - Afriex Business API","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}