{ "openapi" : "3.0.2", "info" : { "title" : "TransferZero API", "description" : "Reference documentation for the TransferZero API V1", "version" : "1.0" }, "externalDocs" : { "description" : "API documentation and onboarding guide", "url" : "https://docs.transferzero.com/" }, "servers" : [ { "url" : "https://api-sandbox.transferzero.com/v1" }, { "url" : "https://api.transferzero.com/v1" } ], "security" : [ { "AuthorizationKey" : [ ], "AuthorizationNonce" : [ ], "AuthorizationSignature" : [ ] }, { "AuthorizationKey" : [ ], "AuthorizationSecret" : [ ] } ], "paths" : { "/accounts" : { "get" : { "tags" : [ "Accounts" ], "summary" : "Fetches account balances for all currencies", "description" : "Fetches account balances for all currencies, and returns an array of the current balances and associated currency codes.", "operationId" : "get-accounts", "responses" : { "200" : { "description" : "Array of account balances", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AccountListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/accounts/{Currency}" : { "get" : { "tags" : [ "Accounts" ], "summary" : "Fetches account balance for specified currrency", "description" : "Fetches account balance for specified currrency, and returns current balance and associated currency code", "operationId" : "get-account", "parameters" : [ { "name" : "Currency", "in" : "path", "description" : "Currency code of account balance to fetch\n\nExample: `/v1/accounts/USD`", "required" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "Account balance for currency", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AccountResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/accounts/debits" : { "post" : { "tags" : [ "Account Debits" ], "summary" : "Creating an account debit", "description" : "Creates a new account debit finding transaction through the internal balance\n\nTo successfully fund a transaction -\n- The currency needs to be the same as the input_currency on the transaction\n- The amount has to be the same as the input_amount on the transaction\n- The to_id is the id of the transaction\n- You need to have enough balance of the appropriate currency inside your wallet\n\nOnce the transaction is funded, we will immediately start trying to pay out the recipient(s).\n\nIt is also possible to create multiple account debits by supplying an array of debit objects\n", "externalDocs" : { "description" : "Funding Transaction guide including alternative ways to fund transactions.", "url" : "https://docs.transferzero.com/docs/transaction-flow/#funding-transactions" }, "operationId" : "post-accounts-debits", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DebitRequestWrapper" }, "examples" : { "single_debit" : { "summary" : "Single Debit", "value" : { "debit" : { "currency" : "NGN", "amount" : "2000.0", "to_id" : "5f44026b-7904-4c30-87d6-f8972d790ded", "to_type" : "Transaction" } } }, "multiple_debit" : { "summary" : "Multiple Debit", "value" : { "debit" : [ { "currency" : "NGN", "amount" : 2.0, "to_id" : "d9269c2a-7049-4625-b3b8-30e25ad33162", "to_type" : "Transaction", "metadata" : { "id" : "b783a4f5-a959-4a1f-87fa-112fe6eae9e4" } }, { "currency" : "NGN", "amount" : 2.0, "to_id" : "912973a9-e027-4768-8e98-5a8f44469bf4", "to_type" : "Transaction", "metadata" : { "id" : "4900f50a-bfb6-469f-ad0e-8c8cf0ef5dfa" } } ] } } } } }, "required" : true }, "responses" : { "201" : { "description" : "Account Debit details", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DebitListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "422" : { "description" : "Invalid account debit object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DebitListResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/account_validations" : { "post" : { "tags" : [ "Account Validation" ], "summary" : "Validates the existence of a bank account or a mobile phone number", "description" : "Validates the existence of a bank account or mobile phone number and returns the associated customer name", "externalDocs" : { "description" : "More information on account validation and bank account name enquiry", "url" : "https://docs.transferzero.com/docs/additional-features/#account-name-enquiry" }, "operationId" : "post-account-validations", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AccountValidationRequest" }, "examples" : { "bank" : { "summary" : "Bank Account Validation", "value" : { "bank_account" : "12345678", "bank_code" : "050", "country" : "NG", "currency" : "NGN", "method" : "bank" } }, "bank_with_iban" : { "summary" : "Bank account Validation using IBAN in BBAN format", "value" : { "iban" : "CI1630120200000018678768", "country" : "CI", "currency" : "XOF", "method" : "bank" } }, "mobile" : { "summary" : "Mobile Phone Number Validation", "value" : { "phone_number" : "+233000000000", "country" : "GH", "currency" : "GHS", "method" : "mobile" } } } } }, "required" : true }, "responses" : { "200" : { "description" : "Success - Account details found", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AccountValidationResponse" } } } }, "422" : { "description" : "Error - Account details not found", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/AccountValidationResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } } } }, "/api_logs" : { "get" : { "tags" : [ "API Logs" ], "summary" : "Fetch a list of API logs", "description" : "Returns a list of API logs. Also includes information relating to the original request.", "operationId" : "get-api-logs", "parameters" : [ { "name" : "page", "in" : "query", "description" : "The page number to request (defaults to 1)", "required" : false, "schema" : { "type" : "integer" }, "example" : 1 }, { "name" : "per", "in" : "query", "description" : "The number of results to load per page (defaults to 10)", "required" : false, "schema" : { "type" : "integer" }, "example" : 10 }, { "name" : "created_at_from", "in" : "query", "description" : "Start date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "created_at_to", "in" : "query", "description" : "End date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "API logs returned within an array wrapped inside a JSON object", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ApiLogListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/api_logs/{API Log ID}" : { "get" : { "tags" : [ "API Logs" ], "summary" : "Fetch an individual API log", "description" : "Returns a single API log based on the API log ID.", "operationId" : "get-api-log", "parameters" : [ { "name" : "API Log ID", "in" : "path", "description" : "ID of the API log to retrieve\n\nExample: `/v1/api_logs/00485ce9-532b-45e7-8518-7e5582242407`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Details of requested API log", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ApiLogResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/info/currencies" : { "get" : { "tags" : [ "Currency Info" ], "summary" : "Getting a list of possible requested currencies", "description" : "Fetches a list of currencies available to use in other API requests. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier.", "operationId" : "info-currencies", "responses" : { "200" : { "description" : "Returns the available currencies in the system", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CurrencyListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/info/currencies/in" : { "get" : { "tags" : [ "Currency Info" ], "summary" : "Getting a list of possible input currencies", "description" : "Fetches a list of currencies available to use as the input currency in other API requests.\nUsually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier.\nUse this endpoint to determine the current exchange rate from a specific input currency to any output currency that's available.\n", "operationId" : "info-currencies-in", "parameters" : [ { "name" : "sender_id", "in" : "query", "description" : "Allows the scoping of the results by `sender_id` (optional).\n\nExample: `/v1/info/currencies/in?sender_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`", "required" : false, "schema" : { "type" : "string", "description" : "ID of the sender to use.", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Returns the potential input currencies with their exchange rates", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CurrencyExchangeListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/info/currencies/out" : { "get" : { "tags" : [ "Currency Info" ], "summary" : "Getting a list of possible output currencies", "description" : "Fetches a list of currencies available to use as the output currency and their exchange rates against the available input currencies.\nUsually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier.\n", "operationId" : "info-currencies-out", "parameters" : [ { "name" : "sender_id", "in" : "query", "description" : "Allows the scoping of the results by `sender_id` (optional).\n\nExample: `/v1/info/currencies/out?sender_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`", "required" : false, "schema" : { "type" : "string", "description" : "ID of the sender to use.", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Returns the potential output currencies with their exchange rates", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CurrencyExchangeListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/documents" : { "get" : { "tags" : [ "Documents" ], "summary" : "Getting a list of documents", "description" : "Fetches a list of documents.", "operationId" : "get-documents", "parameters" : [ { "name" : "page", "in" : "query", "description" : "The page number to request (defaults to 1)", "required" : false, "schema" : { "type" : "integer" }, "example" : 1 }, { "name" : "per", "in" : "query", "description" : "The number of results to load per page (defaults to 10)", "required" : false, "schema" : { "type" : "integer" }, "example" : 10 } ], "responses" : { "200" : { "description" : "Array of documents requested", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DocumentListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true }, "post" : { "tags" : [ "Documents" ], "summary" : "Creating a document", "description" : "Creates a new document", "operationId" : "post-documents", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DocumentRequest" } } }, "required" : true }, "responses" : { "201" : { "description" : "Details of the created document", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DocumentResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "422" : { "description" : "Invalid document object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DocumentResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/documents/{Document ID}" : { "get" : { "tags" : [ "Documents" ], "summary" : "Fetching a document", "description" : "Returns a single document by the Documents ID", "operationId" : "get-document", "parameters" : [ { "name" : "Document ID", "in" : "path", "description" : "ID of the document to get.\n\nExample: `/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Details of requested document", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DocumentResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/info/payment_methods/in" : { "get" : { "tags" : [ "Payment Methods" ], "summary" : "This method returns possible payin methods.", "description" : "Fetching possible payin methods.\n", "operationId" : "payment-methods-in", "responses" : { "200" : { "description" : "List of possible methods", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentMethodListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/info/payment_methods/out" : { "get" : { "tags" : [ "Payment Methods" ], "summary" : "This method returns possible payout methods.", "description" : "Fetching possible payout methods.\n", "operationId" : "payment-methods-out", "responses" : { "200" : { "description" : "List of possible methods", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PaymentMethodListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/logs/webhooks" : { "get" : { "tags" : [ "Logs" ], "summary" : "Fetch a list of webhook logs", "description" : "Returns a list of webhook logs. Response includes pagination.", "operationId" : "get-webhook-logs", "parameters" : [ { "name" : "page", "in" : "query", "description" : "The page number to request (defaults to 1)", "required" : false, "schema" : { "type" : "integer" }, "example" : 1 }, { "name" : "per", "in" : "query", "description" : "The number of results to load per page (defaults to 10)", "required" : false, "schema" : { "type" : "integer" }, "example" : 10 }, { "name" : "created_at_from", "in" : "query", "description" : "Start date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "created_at_to", "in" : "query", "description" : "End date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "Webhook logs returned within an array wrapped inside a JSON object", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookLogListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/logs/{Webhook Log ID}" : { "get" : { "tags" : [ "Logs" ], "summary" : "Fetch an individual webhook log", "description" : "Returns a single webhook log based on the webhook log ID.", "operationId" : "get-webhook-log", "parameters" : [ { "name" : "Webhook Log ID", "in" : "path", "description" : "ID of the webhook log to retrieve\n\nExample: `/v1/logs/9d1ad631-f34a-4cff-9a7e-2c83e3a556df`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Details of requested webhook log", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookLogResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/payin_methods/{PayinMethod ID}" : { "get" : { "tags" : [ "Payin Methods" ], "summary" : "Fetching a payin method", "description" : "Show a payin method by id", "operationId" : "get-payin-method", "parameters" : [ { "name" : "PayinMethod ID", "in" : "path", "description" : "ID of the payin method to get.\n\nExample: `/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Success", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayinMethodResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true }, "delete" : { "tags" : [ "Payin Methods" ], "summary" : "Deleting a payin method", "description" : "Initiates a cancellation request for the specified payin method", "operationId" : "delete-payin-method", "parameters" : [ { "name" : "PayinMethod ID", "in" : "path", "description" : "ID of the payin method to delete.\n\nExample: `/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Details of deleted payin method", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayinMethodResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Invalid payin method object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayinMethodResponse" } } } }, "500" : { "description" : "Internal Server Error." } } }, "patch" : { "tags" : [ "Payin Methods" ], "summary" : "Updating a payin method", "description" : "Updates a single payin method by the Payin Method ID", "operationId" : "patch-payin-method", "parameters" : [ { "name" : "PayinMethod ID", "in" : "path", "description" : "ID of the payin method to get.\n\nExample: `/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayinMethod" } } }, "required" : true }, "responses" : { "200" : { "description" : "Details of updated payin method", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayinMethodResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Invalid payin method object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayinMethodResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/payin_methods/{PayinMethod ID}/retry" : { "post" : { "tags" : [ "Payin Methods" ], "summary" : "Retries PayinMethod", "description" : "Retries the collection process for the payin method.\n\nPlease note only payin methods in `error` state can be retried.", "operationId" : "retry-payin-method", "parameters" : [ { "name" : "PayinMethod ID", "in" : "path", "description" : "ID of the payin method whose collection process should be retried\n\nExample: `/v1/payin_methods/9d4d7b73-a94c-4979-ab57-09074fd55d33/retry`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Success", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayinMethodResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "This operation is unavailable" }, "500" : { "description" : "Internal Server Error." } } } }, "/payout_methods" : { "get" : { "tags" : [ "Payout Methods" ], "summary" : "Listing payout methods", "description" : "List available payout methods", "operationId" : "get-payout-methods", "parameters" : [ { "name" : "state", "in" : "query", "description" : "Allows filtering results by `state` of the payout method.\n\nExample: `/v1/payout_methods?state[]=enabled`", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string", "enum" : [ "enabled", "disabled" ] } } }, { "name" : "type", "in" : "query", "description" : "Allows filtering results by the specified type.\n\nExample: `/v1/payout_methods?type[]=NGN::Bank`", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "sender_id", "in" : "query", "description" : "Allows filtering results by the specified sender id.\n\nExample: `/v1/payout_methods?sender_id=bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "page", "in" : "query", "description" : "The page number to request (defaults to 1)", "required" : false, "schema" : { "type" : "integer" }, "example" : 1 }, { "name" : "per", "in" : "query", "description" : "The number of results to load per page (defaults to 10)", "required" : false, "schema" : { "type" : "integer" }, "example" : 10 }, { "name" : "created_at_from", "in" : "query", "description" : "Start date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "created_at_to", "in" : "query", "description" : "End date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "Success", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true }, "post" : { "tags" : [ "Payout Methods" ], "summary" : "Creating a payout method", "description" : "Creates a new payout method in our system.\n", "operationId" : "post-payout-methods", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodRequest" } } }, "required" : true }, "responses" : { "201" : { "description" : "Payout Method details", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "422" : { "description" : "Invalid payout method object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/payout_methods/{Payout Method ID}" : { "get" : { "tags" : [ "Payout Methods" ], "summary" : "Fetching a payout method", "description" : "Show a payout method by id", "operationId" : "get-payout-method", "parameters" : [ { "name" : "Payout Method ID", "in" : "path", "description" : "ID of the payout method to get.\n\nExample: `/v1/payout_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Success", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true }, "delete" : { "tags" : [ "Payout Methods" ], "summary" : "Deleting a payout method", "description" : "Deletes a single payout method by the Payout Method ID", "operationId" : "delete-payout-method", "parameters" : [ { "name" : "Payout Method ID", "in" : "path", "description" : "ID of the payout method to delete.\n\nExample: `/v1/payout_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Details of deleted payout method", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Invalid payout method object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodResponse" } } } }, "500" : { "description" : "Internal Server Error." } } }, "patch" : { "tags" : [ "Payout Methods" ], "summary" : "Updating a payout method", "description" : "Updates a single payout method by the Payout Method ID", "operationId" : "patch-payout-method", "parameters" : [ { "name" : "Payout Method ID", "in" : "path", "description" : "ID of the payout method to get.\n\nExample: `/v1/payout_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethod" } } }, "required" : true }, "responses" : { "200" : { "description" : "Details of updated payout method", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Invalid payout method object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/recipients" : { "get" : { "tags" : [ "Recipients" ], "summary" : "Getting a list of recipients with filtering", "description" : "Fetches details of all recipients.", "operationId" : "get-recipients", "parameters" : [ { "name" : "page", "in" : "query", "description" : "The page number to request (defaults to 1)", "required" : false, "schema" : { "type" : "integer" }, "example" : 1 }, { "name" : "per", "in" : "query", "description" : "The number of results to load per page (defaults to 10)", "required" : false, "schema" : { "type" : "integer" }, "example" : 10 }, { "name" : "created_at_from", "in" : "query", "description" : "Start date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "created_at_to", "in" : "query", "description" : "End date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "amount_from", "in" : "query", "description" : "Minimum amount to filter recipients by amount range.\n\nAllows filtering results by the specified `amount` range. When using this filter, the `currency` should also be specified.\n\nExample: `/v1/recipients?currency=NGN&amount_from=83.76672339&amount_to=83.76672339`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "amount_to", "in" : "query", "description" : "Max amount to filter recipients by amount range.\n\nAllows filtering results by the specified `amount` range. When using this filter, the `currency` should also be specified.\n\nExample: `/v1/recipients?currency=NGN&amount_from=83.76672339&amount_to=83.76672339`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "state", "in" : "query", "description" : "Allows filtering results by `state` of recipient. See [API Documentation - Recipient state](https://docs.transferzero.com/docs/transaction-flow/#state) for possible states.\n\nExample: `/v1/recipients?state[]=error&state[]=initial`", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "currency", "in" : "query", "description" : "Allows filtering results by `input_currency`.\n\nAdditionally required when filtering by an amount range\nExample: `/v1/recipients?currency[]=KES¤cy[]=NGN`", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } } ], "responses" : { "200" : { "description" : "Array of recipients requested", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RecipientListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/recipients/{Recipient ID}" : { "delete" : { "tags" : [ "Recipients" ], "summary" : "Cancelling a recipient", "description" : "Cancels the payment to the recipient specified in the URL path.\n\nPlease note recipients where the `may_cancel` attribute is true will be cancelled immediately. If the `may_cancel` attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed", "externalDocs" : { "description" : "More details on cancelling recipients", "url" : "https://docs.transferzero.com/docs/transaction-flow/#cancelling-recipients-and-transactions" }, "operationId" : "delete-recipient", "parameters" : [ { "name" : "Recipient ID", "in" : "path", "description" : "ID of recipient to cancel.\n\nExample: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Details of recipient cancelled", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RecipientResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Invalid recipient object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RecipientResponse" } } } }, "500" : { "description" : "Internal Server Error." } } }, "patch" : { "tags" : [ "Recipients" ], "summary" : "Updating a recipient", "description" : "Updates the recipient specified in the URL path.\n\nPlease note that only recipients where the `editable` field is true can be modified. Once the recipient is modified any subsequent payout tries will be sent to the updated details.", "operationId" : "patch-recipient", "parameters" : [ { "name" : "Recipient ID", "in" : "path", "description" : "ID of recipient to update.\n\nExample: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RecipientRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "Details of the updated recipient", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RecipientResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Invalid recipient object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RecipientResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/recipients/{Recipient ID}/proof_of_payments" : { "get" : { "tags" : [ "Recipients" ], "summary" : "Returns list of proof of payments", "description" : "Returns a list of uploaded proof of payment files for a transaction recipient", "operationId" : "proof-of-payments", "parameters" : [ { "name" : "Recipient ID", "in" : "path", "description" : "ID of the recipient for whom the proof of payments will be returned.\n\nExample: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33/proof_of_payments`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Collection of proof of payment objects", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ProofOfPaymentListResponse" } } } }, "422" : { "description" : "Unable to process the request." } } } }, "/senders" : { "get" : { "tags" : [ "Senders" ], "summary" : "Listing senders", "description" : "Get a list of available senders", "operationId" : "get-senders", "parameters" : [ { "name" : "page", "in" : "query", "description" : "The page number to request (defaults to 1)", "required" : false, "schema" : { "type" : "integer" }, "example" : 1 }, { "name" : "per", "in" : "query", "description" : "The number of results to load per page (defaults to 10)", "required" : false, "schema" : { "type" : "integer" }, "example" : 10 }, { "name" : "created_at_from", "in" : "query", "description" : "Start date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "created_at_to", "in" : "query", "description" : "End date to filter recipients by created_at range\nAllows filtering results by the specified `created_at` timeframe.\n\nExample: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "external_id", "in" : "query", "description" : "Allows filtering results by `external_id`.\n\nExample: `/v1/senders?external_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`", "required" : false, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "Array of senders requested", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true }, "post" : { "tags" : [ "Senders" ], "summary" : "Creating a sender", "description" : "Creates a new sender in our system.\n", "operationId" : "post-senders", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderRequest" }, "example" : "{\n \"sender\": {\n \"country\": \"UG\",\n \"phone_number\": \"+256752403639\",\n \"email\": \"example@home.org\",\n \"first_name\": \"Johnny\",\n \"last_name\": \"English\",\n \"city\": \"Kampala\",\n \"street\": \"Unknown 17-3\",\n \"address_description\": \"Description of address\",\n \"postal_code\": \"798983\",\n \"birth_date\": \"1900-12-31\",\n \"documents\": [\n {\n \"upload\": \"data:image/png;base64,iVBORw0KGg...lFTkSuQmCC\",\n \"upload_file_name\": \"example.png\",\n \"metadata\": {\n \"my\": \"data\"\n }\n }\n ],\n \"politically_exposed_people\": [\n {\n \"name\": \"Ronald Reagan\",\n \"position\": \"President of the United States\",\n \"started_date\": \"1981-01-20T00:00:00.000Z\",\n \"ended_date\": \"1989-01-20T00:00:00.000Z\",\n \"sender_id\": \"344fb668-196d-43db-9d94-b34b7e6c7e0b\"\n }\n ],\n \"ip\": \"127.0.0.1\",\n \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\",\n \"metadata\": {\n \"my\": \"data\"\n }\n }\n}" } }, "required" : true }, "responses" : { "201" : { "description" : "Sender details", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "422" : { "description" : "Invalid sender object (includes errors object and duplicate sender if external_id is already in use)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/senders/{Sender ID}" : { "get" : { "tags" : [ "Senders" ], "summary" : "Fetching a sender", "description" : "Returns a single sender by the Sender ID", "operationId" : "get-sender", "parameters" : [ { "name" : "Sender ID", "in" : "path", "description" : "ID of the sender to get.\n\nExample: `/v1/senders/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Details of requested sender", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true }, "delete" : { "tags" : [ "Senders" ], "summary" : "Deleting a sender", "description" : "Deletes a single sender by the Sender ID", "operationId" : "delete-sender", "parameters" : [ { "name" : "Sender ID", "in" : "path", "description" : "ID of the sender to delete.\n\nExample: `/v1/senders/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Details of deleted sender", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Invalid sender object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderResponse" } } } }, "500" : { "description" : "Internal Server Error." } } }, "patch" : { "tags" : [ "Senders" ], "summary" : "Updating a sender", "description" : "Updates a single sender by the Sender ID", "operationId" : "patch-sender", "parameters" : [ { "name" : "Sender ID", "in" : "path", "description" : "ID of the sender to get.\n\nExample: `/v1/senders/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "Details of updated sender", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Invalid sender object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/transactions" : { "get" : { "tags" : [ "Transactions" ], "summary" : "Get a list of transactions", "description" : "Retrieves a paginated list of the Transactions created by your API key.", "operationId" : "get-transactions", "parameters" : [ { "name" : "page", "in" : "query", "description" : "The page number to request (defaults to 1)", "required" : false, "schema" : { "type" : "integer" }, "example" : 1 }, { "name" : "per", "in" : "query", "description" : "The number of results to load per page (defaults to 10)", "required" : false, "schema" : { "type" : "integer" }, "example" : 10 }, { "name" : "external_id", "in" : "query", "description" : "Allows filtering results by `external_id`.\n\nExample: `/v1/senders?external_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "sender_id", "in" : "query", "description" : "Allows filtering results by `sender_id`.\n\nExample: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`", "required" : false, "schema" : { "type" : "string" } }, { "name" : "transactions_type", "in" : "query", "description" : "Allows filtering results by `transactions_type`.\n\nExample: `/v1/transactions?transactions_type=automated`", "required" : false, "schema" : { "type" : "string", "enum" : [ "automated", "manual" ] } } ], "responses" : { "200" : { "description" : "A paginated list of the transactions created by your API key.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionListResponse" } } } }, "400" : { "description" : "Bad Request - server was unable to process the request due to invalid syntax.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ErrorStatus" }, "example" : "{\n \"status\": 400,\n \"error\": \"Bad Request\"\n}" } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true }, "post" : { "tags" : [ "Transactions" ], "summary" : "Creates a new transaction", "description" : "Transactions are the main objects in the TransferZero API, so it's important to understand how to create and manage them.\nTransactions facilitate money movement from one Sender in a specific currency to one or multiple Recipients in another currency.\n\nThe main flow of a successful transaction flow is the following -\n- Transaction is created linking the Sender to the Recipient(s) with the requested amounts.\n- Once the sender is KYC'd and approved the transaction can be funded.\n- Once the transaction is funded, we will initiate the payout to the recipient(s).\n- After the recipient (or all recipients) has received the money, the transaction is finished.", "externalDocs" : { "description" : "API Documentation - Create Transaction", "url" : "https://docs.transferzero.com/docs/transaction-flow/" }, "operationId" : "post-transactions", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionRequest" } } }, "required" : true }, "responses" : { "201" : { "description" : "Transaction has been created", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "400" : { "description" : "Bad Request - server was unable to process the request due to invalid syntax.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ErrorStatus" }, "example" : "{\n \"status\": 400,\n \"error\": \"Bad Request\"\n}" } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "422" : { "description" : "Error - transaction payload is invalid (includes errors object and duplicate transaction/sender if external_id is already in use)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/transactions/calculate" : { "post" : { "tags" : [ "Transactions" ], "summary" : "Calculates transaction amounts for a transaction payload", "description" : "Calculates the input, output and fee amounts for the recipients in a transaction payload", "operationId" : "calculate-transactions", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "Transaction object with calculated values", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "422" : { "description" : "Error - transaction payload is invalid (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/transactions/validate" : { "post" : { "tags" : [ "Transactions" ], "summary" : "Validates a transaction payload", "description" : "Validates fields in a transaction payload and displays invalid or missing fields", "operationId" : "validate-transactions", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "Success - transaction payload is valid", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "422" : { "description" : "Error - transaction payload is invalid (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/transactions/create_and_fund" : { "post" : { "tags" : [ "Transactions" ], "summary" : "Creates a new transaction and funds it from account balance", "description" : "This endpoint creates a transaction and funds it from an account balance. You must ensure that you have established an account with us in the pay-in currency of the transactions you wish to create, and that this account is sufficently funded, before calling this endpoint.\n\nNote that the
external_idfield is required for requests to this endpoint.", "operationId" : "create-and-fund-transaction", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionRequest" } } }, "required" : true }, "responses" : { "201" : { "description" : "Transaction has been created and funded", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "400" : { "description" : "Bad Request - server was unable to process the request due to invalid syntax.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ErrorStatus" }, "example" : "{\n \"status\": 400,\n \"error\": \"Bad Request\"\n}" } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "422" : { "description" : "Error - transaction payload is invalid (includes errors object and duplicate transaction/sender if external_id is already in use)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/transactions/{Transaction ID}" : { "get" : { "tags" : [ "Transactions" ], "summary" : "Fetch a single transaction", "description" : "Finds and returns a Transaction created by the requesting API key, using\nthe provided Transaction ID.", "operationId" : "get-transaction", "parameters" : [ { "name" : "Transaction ID", "in" : "path", "description" : "ID of the transaction.\n\nExample: `/v1/transactions/bf9ff782-e182-45ac-abea-5bce83ad6670`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Transaction object", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "400" : { "description" : "Bad Request - server was unable to process the request due to invalid syntax.", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ErrorStatus" }, "example" : "{\n \"status\": 400,\n \"error\": \"Bad Request\"\n}" } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } }, "/transactions/{Transaction ID}/payin" : { "post" : { "tags" : [ "Transactions" ], "summary" : "Creates a fake payin for transaction", "description" : "This method is available only in sandbox environment and is supposed to be used only for testing integration.\nIt allows you to emulate a payin without paying actual money.\n", "operationId" : "payin-transaction", "parameters" : [ { "name" : "Transaction ID", "in" : "path", "description" : "ID of the transaction to payin.\n\nExample: `/v1/transactions/bf9ff782-e182-45ac-abea-5bce83ad6670/payin`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayinMethodRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "Transaction object", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Invalid transaction object (includes errors object)", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/transactions/{Transaction ID}/payout" : { "post" : { "tags" : [ "Transactions" ], "summary" : "Creates a fake payout for transaction", "description" : "This method is available only in sandbox environment and is supposed to be used only for testing.\nIt allows you to emulate the payout of a transaction after payin.\n", "operationId" : "payout-transaction", "parameters" : [ { "name" : "Transaction ID", "in" : "path", "description" : "ID of the transaction to payout.\n\nExample: `/v1/transactions/bf9ff782-e182-45ac-abea-5bce83ad6670/payout`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Transaction object", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } } } }, "/webhooks" : { "get" : { "tags" : [ "Webhooks" ], "summary" : "Listing webhooks", "description" : "Get a list of created webhooks", "operationId" : "get-webhooks", "parameters" : [ { "name" : "page", "in" : "query", "description" : "The page number to request (defaults to 1)", "required" : false, "schema" : { "type" : "integer" }, "example" : 1 }, { "name" : "per", "in" : "query", "description" : "The number of results to load per page (defaults to 10)", "required" : false, "schema" : { "type" : "integer" }, "example" : 10 } ], "responses" : { "200" : { "description" : "Array of webhooks requested. A paginated list of the webhooks created by the requesting API key", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookDefinitionListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true }, "post" : { "tags" : [ "Webhooks" ], "summary" : "Creating a webhook", "description" : "Creates a new webhook, subscribing the provided endpoint to the specified event(s)\n", "externalDocs" : { "description" : "More information about webhooks", "url" : "https://docs.transferzero.com/docs/architecture/#webhooks" }, "operationId" : "post-webhooks", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookDefinitionRequest" }, "example" : { "webhook" : { "url" : "http://myhost.com/for/transaction.paid_in", "events" : [ "transaction.paid_in" ], "metadata" : { "my" : "data" } } } } }, "required" : true }, "responses" : { "201" : { "description" : "Details of created webhook", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookDefinitionResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "422" : { "description" : "Webhook details and errors", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookDefinitionResponse" } } } }, "500" : { "description" : "Internal Server Error." } }, "callbacks" : { "recipient" : { "{$request.body#/webhook/url}" : { "post" : { "description" : "Callback object returning details on the triggered recipient event for example when a payment is unsuccessful and there's an error", "externalDocs" : { "description" : "More information about webhooks", "url" : "https://docs.transferzero.com/docs/architecture/#webhooks" }, "operationId" : "trigger-recipient-webhook", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/RecipientWebhook" } } }, "required" : true }, "responses" : { "200" : { "description" : "Your server returns this code if it accepts the callback. Any other code will be considered as a failure, and the callback will be re-sent a short while later until there is either a 200 response or we have retried the callback 5 times" } }, "x-callback-request" : true } } }, "transaction" : { "{$request.body#/webhook/url}" : { "post" : { "description" : "Callback object returning details on the triggered transaction event, for example when a transaction gets paid out", "externalDocs" : { "description" : "More information about webhooks", "url" : "https://docs.transferzero.com/docs/architecture/#webhooks" }, "operationId" : "trigger-transaction-webhook", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TransactionWebhook" } } }, "required" : true }, "responses" : { "200" : { "description" : "Your server returns this code if it accepts the callback. Any other code will be considered as a failure, and the callback will be re-sent a short while later until there is either a 200 response or we have retried the callback 5 times" } }, "x-callback-request" : true } } }, "sender" : { "{$request.body#/webhook/url}" : { "post" : { "description" : "Callback object returning details on the triggered sender event, for example when a sender gets approved", "externalDocs" : { "description" : "More information about webhooks", "url" : "https://docs.transferzero.com/docs/architecture/#webhooks" }, "operationId" : "trigger-sender-webhook", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SenderWebhook" } } }, "required" : true }, "responses" : { "200" : { "description" : "Your server returns this code if it accepts the callback. Any other code will be considered as a failure, and the callback will be re-sent a short while later until there is either a 200 response or we have retried the callback 5 times" } }, "x-callback-request" : true } } }, "document" : { "{$request.body#/webhook/url}" : { "post" : { "description" : "Callback object returning details on the triggered document event", "externalDocs" : { "description" : "More information about webhooks", "url" : "https://docs.transferzero.com/docs/architecture/#webhooks" }, "operationId" : "trigger-document-webhook", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DocumentWebhook" } } }, "required" : true }, "responses" : { "200" : { "description" : "Your server returns this code if it accepts the callback. Any other code will be considered as a failure, and the callback will be re-sent a short while later until there is either a 200 response or we have retried the callback 5 times" } }, "x-callback-request" : true } } }, "payout_method" : { "{$request.body#/webhook/url}" : { "post" : { "description" : "Callback object returning details on the triggered payout method event", "externalDocs" : { "description" : "More information about webhooks", "url" : "https://docs.transferzero.com/docs/architecture/#webhooks" }, "operationId" : "trigger-payout-method-webhook", "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PayoutMethodWebhook" } } }, "required" : true }, "responses" : { "200" : { "description" : "Your server returns this code if it accepts the callback. Any other code will be considered as a failure, and the callback will be re-sent a short while later until there is either a 200 response or we have retried the callback 5 times" } }, "x-callback-request" : true } } } } } }, "/webhooks/{Webhook ID}" : { "get" : { "tags" : [ "Webhooks" ], "summary" : "Find a webhook's details", "description" : "Look up a webhook's details with its ID", "operationId" : "get-webhook", "parameters" : [ { "name" : "Webhook ID", "in" : "path", "description" : "The ID of the Webhook to look up\n\nExample: `/v1/webhooks/9d4d7b73-a94c-4979-ab57-09074fd55d33`", "required" : true, "schema" : { "type" : "string", "format" : "uuid" } } ], "responses" : { "200" : { "description" : "Webhook details", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookDefinitionResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true }, "delete" : { "tags" : [ "Webhooks" ], "summary" : "Unsubscribing from a webhook", "description" : "Unsubscribes from a webhook specified", "operationId" : "delete-webhook", "parameters" : [ { "name" : "Webhook ID", "in" : "path", "description" : "The ID of webhook to cancel.\n\nExample: `/v1/webhooks/9d4d7b73-a94c-4979-ab57-09074fd55d33`", "required" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "Success", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookDefinitionResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "404" : { "description" : "Resource Not Found." }, "422" : { "description" : "Webhook details and errors", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookDefinitionResponse" } } } }, "500" : { "description" : "Internal Server Error." } } } }, "/webhooks/events" : { "get" : { "tags" : [ "Webhooks" ], "summary" : "Find possible webhook events", "description" : "Fetching possible webhook events", "operationId" : "get-webhook-events", "responses" : { "200" : { "description" : "Webhook events", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/WebhookDefinitionEventListResponse" } } } }, "401" : { "description" : "Authentication information is missing or invalid." }, "500" : { "description" : "Internal Server Error." } }, "x-group-parameters" : true } } }, "components" : { "schemas" : { "ValidationErrorDescription" : { "type" : "object", "properties" : { "error" : { "type" : "string", "description" : "Describes what the problem is with the field", "readOnly" : true, "example" : "invalid" } }, "description" : "The description of the error", "readOnly" : true, "example" : { "error" : "invalid" } }, "AccountListResponse" : { "type" : "object", "properties" : { "object" : { "type" : "array", "readOnly" : true, "items" : { "$ref" : "#/components/schemas/Account" } }, "meta" : { "$ref" : "#/components/schemas/AccountMeta" } }, "readOnly" : true, "example" : { "meta" : { "negative_balance" : false }, "object" : [ { "amount" : 1000.0, "amount_after_pending" : 1000.0, "currency" : "USD" }, { "amount" : 1000.0, "amount_after_pending" : 1000.0, "currency" : "USD" } ] } }, "AccountResponse" : { "type" : "object", "properties" : { "object" : { "$ref" : "#/components/schemas/Account" }, "meta" : { "$ref" : "#/components/schemas/AccountMeta" } }, "readOnly" : true, "example" : { "meta" : { "negative_balance" : false }, "object" : { "amount" : 1000.0, "amount_after_pending" : 1000.0, "currency" : "USD" } } }, "DebitRequestWrapper" : { "example" : { "debit" : { "currency" : "NGN", "amount" : "2000.0", "to_id" : "5f44026b-7904-4c30-87d6-f8972d790ded", "to_type" : "Transaction" } }, "oneOf" : [ { "$ref" : "#/components/schemas/DebitRequest" }, { "$ref" : "#/components/schemas/DebitListRequest" } ] }, "DebitListResponse" : { "type" : "object", "properties" : { "object" : { "type" : "array", "readOnly" : true, "items" : { "$ref" : "#/components/schemas/Debit" } }, "meta" : { "$ref" : "#/components/schemas/PaginationMeta" } }, "readOnly" : true, "example" : { "meta" : { "pagination" : { "next_page" : 3, "total_count" : 45, "total_pages" : 5, "prev_page" : 1, "current_page" : 2 } }, "object" : [ { "to_type" : "Transaction", "amount" : 10000, "metadata" : { }, "to_id" : "5f44026b-7904-4c30-87d6-f8972d790ded", "created_at" : "2000-01-23T04:56:07.000+00:00", "currency" : "NGN", "id" : "5f44026b-7904-4c30-87d6-f8972d790ded", "running_balance" : 2000000, "errors" : { "phone_number" : [ { "error" : "invalid" } ], "documents" : [ { "error" : "blank" } ] }, "usd_amount" : 200.06211683187206 }, { "to_type" : "Transaction", "amount" : 10000, "metadata" : { }, "to_id" : "5f44026b-7904-4c30-87d6-f8972d790ded", "created_at" : "2000-01-23T04:56:07.000+00:00", "currency" : "NGN", "id" : "5f44026b-7904-4c30-87d6-f8972d790ded", "running_balance" : 2000000, "errors" : { "phone_number" : [ { "error" : "invalid" } ], "documents" : [ { "error" : "blank" } ] }, "usd_amount" : 200.06211683187206 } ] } }, "AccountValidationRequest" : { "required" : [ "country", "currency", "method" ], "type" : "object", "properties" : { "bank_account" : { "type" : "string", "description" : "Account Number to query", "writeOnly" : true }, "bank_code" : { "type" : "string", "description" : "Bank Code to query - same codes are used as for creating the transactions", "writeOnly" : true }, "iban" : { "type" : "string", "description" : "IBAN to query - BBAN format for XOF bank accounts", "writeOnly" : true }, "phone_number" : { "type" : "string", "description" : "Phone number to query in E.164 format", "writeOnly" : true, "example" : "+233000000000" }, "mobile_provider" : { "$ref" : "#/components/schemas/PayoutMethodMobileProviderEnum" }, "country" : { "type" : "string", "description" : "Country of account in 2-character alpha ISO 3166-2 country format", "writeOnly" : true, "enum" : [ "BJ", "BF", "NG", "GH", "SN", "CI", "CM", "UG", "TG" ] }, "currency" : { "type" : "string", "description" : "The currency the bank account is in", "writeOnly" : true, "enum" : [ "NGN", "GHS", "XOF", "UGX", "XAF" ] }, "method" : { "type" : "string", "description" : "The method of the payment. Currently bank and mobile are supported", "writeOnly" : true, "enum" : [ "bank", "mobile" ] } }, "example" : { "bank_code" : "bank_code", "country" : "BJ", "mobile_provider" : "orange", "method" : "bank", "iban" : "iban", "phone_number" : "+233000000000", "currency" : "NGN", "bank_account" : "bank_account" } }, "AccountValidationResponse" : { "type" : "object", "properties" : { "object" : { "$ref" : "#/components/schemas/AccountValidationResult" }, "meta" : { "$ref" : "#/components/schemas/AccountValidationError" } }, "readOnly" : true, "example" : { "object" : { "account_name" : "John Smith", "mapped_mobile_provider" : "mtn" } } }, "ApiLogListResponse" : { "type" : "object", "properties" : { "object" : { "type" : "array", "description" : "Array of API log objects", "readOnly" : true, "items" : { "$ref" : "#/components/schemas/ApiLog" } }, "meta" : { "$ref" : "#/components/schemas/PaginationMeta" } }, "readOnly" : true, "example" : { "meta" : { "pagination" : { "next_page" : 3, "total_count" : 45, "total_pages" : 5, "prev_page" : 1, "current_page" : 2 } }, "object" : [ { "response_headers" : { "X-Frame-Options" : "SAMEORIGIN", "X-XSS-Protection" : "1; mode=block", "X-Content-Type-Options" : "nosniff", "Content-Type" : "application/json; charset=UTF-8" }, "request_body" : "{\"message\":\"Email dispatched: Accepted (user@transferzero.com)\"}", "response_status" : "200", "request_headers" : { "HTTP_VERSION" : "HTTP/1.1", "HTTP_ACCEPT" : "application/json", "HTTP_USER_AGENT" : "TransferZero Ruby", "HTTP_AUTHORIZATION_NONCE" : "0000", "HTTP_AUTHORIZATION_KEY" : "0000", "HTTP_AUTHORIZATION_SIGNATURE" : "0000", "HTTP_CONNECTION" : "close", "HTTP_HOST" : "localhost:3002" }, "response_body" : "{\"object\":{\"result\":0}}", "created_at" : "2019-01-11T00:00:00.001+0000", "id" : "a0696374-de2f-4b4e-a2d7-cb4e0a1240c0", "request_method" : "POST", "request_url" : "https://api.transferzero/v1/transactions/validate" }, { "response_headers" : { "X-Frame-Options" : "SAMEORIGIN", "X-XSS-Protection" : "1; mode=block", "X-Content-Type-Options" : "nosniff", "Content-Type" : "application/json; charset=UTF-8" }, "request_body" : "{\"message\":\"Email dispatched: Accepted (user@transferzero.com)\"}", "response_status" : "200", "request_headers" : { "HTTP_VERSION" : "HTTP/1.1", "HTTP_ACCEPT" : "application/json", "HTTP_USER_AGENT" : "TransferZero Ruby", "HTTP_AUTHORIZATION_NONCE" : "0000", "HTTP_AUTHORIZATION_KEY" : "0000", "HTTP_AUTHORIZATION_SIGNATURE" : "0000", "HTTP_CONNECTION" : "close", "HTTP_HOST" : "localhost:3002" }, "response_body" : "{\"object\":{\"result\":0}}", "created_at" : "2019-01-11T00:00:00.001+0000", "id" : "a0696374-de2f-4b4e-a2d7-cb4e0a1240c0", "request_method" : "POST", "request_url" : "https://api.transferzero/v1/transactions/validate" } ] } }, "ApiLogResponse" : { "type" : "object", "properties" : { "object" : { "$ref" : "#/components/schemas/ApiLog" } }, "readOnly" : true, "example" : { "object" : { "response_headers" : { "X-Frame-Options" : "SAMEORIGIN", "X-XSS-Protection" : "1; mode=block", "X-Content-Type-Options" : "nosniff", "Content-Type" : "application/json; charset=UTF-8" }, "request_body" : "{\"message\":\"Email dispatched: Accepted (user@transferzero.com)\"}", "response_status" : "200", "request_headers" : { "HTTP_VERSION" : "HTTP/1.1", "HTTP_ACCEPT" : "application/json", "HTTP_USER_AGENT" : "TransferZero Ruby", "HTTP_AUTHORIZATION_NONCE" : "0000", "HTTP_AUTHORIZATION_KEY" : "0000", "HTTP_AUTHORIZATION_SIGNATURE" : "0000", "HTTP_CONNECTION" : "close", "HTTP_HOST" : "localhost:3002" }, "response_body" : "{\"object\":{\"result\":0}}", "created_at" : "2019-01-11T00:00:00.001+0000", "id" : "a0696374-de2f-4b4e-a2d7-cb4e0a1240c0", "request_method" : "POST", "request_url" : "https://api.transferzero/v1/transactions/validate" } } }, "CurrencyListResponse" : { "type" : "object", "properties" : { "object" : { "type" : "array", "readOnly" : true, "items" : { "$ref" : "#/components/schemas/Currency" } } }, "description" : "List of possible currencies", "readOnly" : true, "example" : { "object" : [ { "code" : "USD", "name" : "United States Dollar", "symbol" : "$", "decimals" : 2, "subunit_to_unit" : 100, "primary" : false, "min" : "0.000000000000000000000001", "max" : "999999999999999999999999999.0" }, { "code" : "KES", "name" : "Kenyan Shilling", "symbol" : "KSh", "decimals" : 2, "subunit_to_unit" : 100, "primary" : true, "min" : "0.000000000000000000000001", "max" : "999999999999999999999999999.0" } ] } }, "CurrencyExchangeListResponse" : { "properties" : { "object" : { "type" : "array", "readOnly" : true, "items" : { "$ref" : "#/components/schemas/CurrencyExchange" } } }, "description" : "List of possible currency exchange pairs", "readOnly" : true, "example" : { "object" : [ { "code" : "NGN", "name" : "Nigerian Naira", "symbol" : "₦", "decimals" : 2, "subunit_to_unit" : 100, "primary" : true, "min" : "1000.0", "max" : "10000000.0", "margin" : "3.0", "usd_equivalent" : "0.002743485349395299586854627", "opposites" : [ { "code" : "CNY", "name" : "Chinese Renminbi Yuan", "symbol" : "¥", "decimals" : 2, "subunit_to_unit" : 100, "primary" : true, "min" : "100.0", "max" : "50000.0", "margin" : "3.0", "usd_equivalent" : "0.14596446284532970096399939", "rate" : 0.01784400294334069, "mtm_rate" : 56 }, { "code" : "XOF", "name" : "West African Cfa Franc", "symbol" : "Fr", "decimals" : 0, "subunit_to_unit" : 1, "primary" : true, "min" : "1.0", "max" : "100.0", "margin" : "3.0", "usd_equivalent" : "0.001728621452207475495474445", "rate" : 1.5132, "mtm_rate" : 0.660851176315094 } ] }, { "code" : "UGX", "name" : "Ugandan Shilling", "symbol" : "UGX", "decimals" : 2, "subunit_to_unit" : 100, "primary" : true, "min" : "1000.0", "max" : "4000000.0", "margin" : "3.0", "usd_equivalent" : "0.000268161238738656449967193", "opposites" : [ { "code" : "CNY", "name" : "Chinese Renminbi Yuan", "symbol" : "¥", "decimals" : 2, "subunit_to_unit" : 100, "primary" : true, "min" : "100.0", "max" : "50000.0", "margin" : "3.0", "usd_equivalent" : "0.14596446284532970096399939", "rate" : 0.0017820529497794776, "mtm_rate" : 561.1505539853607 }, { "code" : "NGN", "name" : "Nigerian Naira", "symbol" : "₦", "decimals" : 2, "subunit_to_unit" : 100, "primary" : true, "min" : "1000.0", "max" : "10000000.0", "margin" : "3.0", "usd_equivalent" : "0.002743485349395299586854627", "rate" : 0.09613478691774034, "mtm_rate" : 10.402061855670103 } ] } ] } }, "DocumentListResponse" : { "type" : "object", "properties" : { "object" : { "type" : "array", "readOnly" : true, "items" : { "$ref" : "#/components/schemas/Document" } }, "meta" : { "$ref" : "#/components/schemas/PaginationMeta" } }, "readOnly" : true, "example" : { "meta" : { "pagination" : { "next_page" : 3, "total_count" : 45, "total_pages" : 5, "prev_page" : 1, "current_page" : 2 } }, "object" : [ { "metadata" : { }, "side" : "front", "upload" : "data:image/png;base64,iVBORw0KGg...lFTkSuQmCC", "expiry_date" : "2000-01-23", "upload_file_name" : "example.png", "upload_content_type" : "image/png", "source" : "Manual", "document_id" : "XYZ12345", "url" : "https://bitpesa-documents.amazonaws.com/document.pdf", "issuing_country" : "NG", "id" : "ebe9bc0b-f2f6-4ce8-802a-8b79912d041e", "upload_file_size" : 30255, "category" : "category", "errors" : { "phone_number" : [ { "error" : "invalid" } ], "documents" : [ { "error" : "blank" } ] }, "document_type" : "certificate_of_business_name_registration" }, { "metadata" : { }, "side" : "front", "upload" : "data:image/png;base64,iVBORw0KGg...lFTkSuQmCC", "expiry_date" : "2000-01-23", "upload_file_name" : "example.png", "upload_content_type" : "image/png", "source" : "Manual", "document_id" : "XYZ12345", "url" : "https://bitpesa-documents.amazonaws.com/document.pdf", "issuing_country" : "NG", "id" : "ebe9bc0b-f2f6-4ce8-802a-8b79912d041e", "upload_file_size" : 30255, "category" : "category", "errors" : { "phone_number" : [ { "error" : "invalid" } ], "documents" : [ { "error" : "blank" } ] }, "document_type" : "certificate_of_business_name_registration" } ] } }, "DocumentRequest" : { "type" : "object", "properties" : { "document" : { "$ref" : "#/components/schemas/Document" } }, "example" : { "document" : { "upload" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAACXBIWXMAAAsT\n3Y2wAAAAAElFTkSuQmCC(...)", "upload_file_name" : "passport.png", "metadata" : { "meta" : "data" } } } }, "DocumentResponse" : { "type" : "object", "properties" : { "object" : { "$ref" : "#/components/schemas/Document" } }, "readOnly" : true, "example" : { "object" : { "metadata" : { }, "side" : "front", "upload" : "data:image/png;base64,iVBORw0KGg...lFTkSuQmCC", "expiry_date" : "2000-01-23", "upload_file_name" : "example.png", "upload_content_type" : "image/png", "source" : "Manual", "document_id" : "XYZ12345", "url" : "https://bitpesa-documents.amazonaws.com/document.pdf", "issuing_country" : "NG", "id" : "ebe9bc0b-f2f6-4ce8-802a-8b79912d041e", "upload_file_size" : 30255, "category" : "category", "errors" : { "phone_number" : [ { "error" : "invalid" } ], "documents" : [ { "error" : "blank" } ] }, "document_type" : "certificate_of_business_name_registration" } } }, "PaymentMethodListResponse" : { "type" : "object", "properties" : { "object" : { "type" : "array", "readOnly" : true, "items" : { "$ref" : "#/components/schemas/PaymentMethodOpposite" } } }, "readOnly" : true, "example" : { "object" : [ { "type" : "NGN::Bank", "provider" : "interswitch", "otc_permitted" : false, "details" : [ "url" ], "opposites" : [ { "type" : "CNY::Bank", "provider" : "melotic", "otc_permitted" : false, "details" : [ "email", "name", "phone_number", "bank_account" ], "default" : true, "fields" : { "email" : { "type" : "input", "validations" : { "format" : "\\A((\\w+([\\-+.]\\w+)*@[a-zA-Z0-9]+([\\-\\.][a-zA-Z0-9]+)*)*){3,320}\\z" } }, "name" : { "type" : "input", "validations" : { "presence" : true } }, "phone_number" : { "type" : "input", "validations" : { "presence" : true, "invalid" : true } }, "bank_account" : { "type" : "input", "validations" : { "presence" : true, "invalid" : true } } } }, { "type" : "USD::Manual::Bank", "provider" : "bank_transfer", "otc_permitted" : false, "details" : [ "email", "first_name", "last_name", "bank_name", "bank_account", "routing_number" ], "default" : true, "fields" : { "email" : { "type" : "input", "validations" : { "format" : "\\A((\\w+([\\-+.]\\w+)*@[a-zA-Z0-9]+([\\-\\.][a-zA-Z0-9]+)*)*){3,320}\\z" } }, "first_name" : { "type" : "input" }, "last_name" : { "type" : "input" }, "bank_name" : { "type" : "input" }, "bank_account" : { "type" : "input" }, "routing_number" : { "type" : "input" } } } ] } ] } }, "PaymentMethodOpposite" : { "allOf" : [ { "$ref" : "#/components/schemas/PaymentMethod" }, { "properties" : { "opposites" : { "type" : "array", "description" : "List of all providers that can be used in conjunction with the main provider", "readOnly" : true, "items" : { "$ref" : "#/components/schemas/PaymentMethod" } } } } ] }, "PaymentMethod" : { "type" : "object", "properties" : { "type" : { "type" : "string", "description" : "Details currency and type of payment.", "readOnly" : true, "example" : "NGN::Bank" }, "provider" : { "type" : "string", "description" : "Identifies the payment provider.", "readOnly" : true, "example" : "Interswitch" }, "otc_permitted" : { "type" : "boolean", "description" : "Are over the counter transactions permitted?", "readOnly" : true, "example" : false }, "details" : { "type" : "array", "description" : "Fields required to make the payment depending on type.", "readOnly" : true, "example" : [ "email", "first_name", "last_name", "address" ], "items" : { "type" : "string" } }, "default" : { "type" : "boolean", "description" : "Boolean revealing whether this is the default payout method. Only present on payout methods", "readOnly" : true, "example" : false }, "fields" : { "type" : "object", "additionalProperties" : { "$ref" : "#/components/schemas/FieldDescription" }, "description" : "The fields needed for payments with this payment method with details on validation requirements", "readOnly" : true, "example" : { "email" : { "type" : "input", "validations" : { "inclusion" : { "in" : { "NI" : "National Id", "PP" : "Passport" }, "allow_blank" : true } } } } } }, "description" : "Describes an available payment provider", "readOnly" : true, "example" : { "type" : "GHS::Bank", "provider" : "etranzact", "otc_permitted" : false, "details" : [ "email", "first_name", "last_name", "bank_code", "bank_account", "bank_account_title" ], "default" : true, "fields" : { "email" : { "type" : "input", "validations" : { "format" : "\\A((\\w+([\\-+.]\\w+)*@[a-zA-Z0-9]+([\\-\\.][a-zA-Z0-9]+)*)*){3,320}\\z" } }, "first_name" : { "type" : "input", "validations" : { "presence" : true } }, "last_name" : { "type" : "input", "validations" : { "presence" : true } }, "bank_code" : { "type" : "select", "options" : { "025" : "ACCESS BANK", "008" : "ADB" }, "validations" : { "presence" : true, "inclusion" : { "in" : { "025" : "ACCESS BANK", "008" : "ADB" } } } }, "bank_account" : { "type" : "input", "validations" : { "presence" : true } }, "bank_account_title" : { "type" : "input", "validations" : { "presence" : true } } } } }, "WebhookLogListResponse" : { "type" : "object", "properties" : { "object" : { "type" : "array", "description" : "Array of webhook log objects", "readOnly" : true, "items" : { "$ref" : "#/components/schemas/WebhookLog" } }, "meta" : { "$ref" : "#/components/schemas/PaginationMeta" } }, "readOnly" : true, "example" : { "meta" : { "pagination" : { "next_page" : 3, "total_count" : 45, "total_pages" : 5, "prev_page" : 1, "current_page" : 2 } }, "object" : [ { "metadata" : { "tries" : 15, "request" : { "headers" : { "Content-Type" : "application/json", "Authorization-Nonce" : "a0696374-de2f-4b4e-a2d7-cb4e0a1240c0", "Authorization-Key" : "a0696374-de2f-4b4e-a2d7-cb4e0a1240c0", "Authorization-Signature" : "a0696374-de2f-4b4e-a2d7-cb4e0a1240c0", "Accept-Encoding" : "gzip;q=1.0,deflate;q=0.6,identity;q=0.3", "Accept" : "*/*", "User-Agent" : "Ruby", "Host" : "localhost:3000", "Content-Length" : "3549" }, "body" : "{\"webhook\":\"54cbd6f2-b920-41e9-a225-b1000e024787\",\"event\":\"transaction.mispaid\",\"object\":{\"id\":\"cbcea909-85e3-448f-bd07-b9ecdff6e971\"}}", "url" : "http://localhost:3000" }, "instance_id" : "a0696374-de2f-4b4e-a2d7-cb4e0a1240c0", "response" : { "headers" : { "date" : "Fri, 11 Jan 2019 09:00:00 GMT", "connection" : "close", "content-type" : "text/html; charset=utf-8", "x-web-console-session-id" : "a0696374-de2f-4b4e-a2d7-cb4e0a1240c0", "x-web-console-mount-point" : "/__web_console", "x-request-id" : "a0696374-de2f-4b4e-a2d7-cb4e0a1240c0", "x-runtime" : "0.484015", "content-length" : "145453" }, "body" : "