From ac72a3db4908f39d171d8ad63b3b401e674d8635 Mon Sep 17 00:00:00 2001 From: andrew-paystack Date: Tue, 16 Jun 2026 19:55:52 +0300 Subject: [PATCH 1/2] add open api spec to SDK --- .standard.yml | 3 + Gemfile | 1 + Gemfile.lock | 106 + Rakefile | 17 + generator/generate.rb | 109 + generator/templates/resource.erb | 19 + lib/paystack.rb | 13 + lib/paystack/base_resource.rb | 13 + lib/paystack/client.rb | 17 + lib/paystack/errors.rb | 19 + lib/paystack/resources/customer.rb | 80 + lib/paystack/resources/transaction.rb | 63 + lib/paystack/response.rb | 38 + lib/paystack/ruby.rb | 8 +- lib/paystack/ruby/version.rb | 4 +- lib/paystack/transport.rb | 62 + lib/paystack/version.rb | 5 + openapi/paystack.yaml | 19146 ++++++++++++++++++ paystack-ruby.gemspec | 25 +- test/paystack/client_test.rb | 25 + test/paystack/resources/customer_test.rb | 115 + test/paystack/resources/transaction_test.rb | 119 + test/paystack/test_ruby.rb | 10 +- test/test_helper.rb | 25 +- 24 files changed, 20009 insertions(+), 33 deletions(-) create mode 100644 Gemfile.lock create mode 100644 generator/generate.rb create mode 100644 generator/templates/resource.erb create mode 100644 lib/paystack.rb create mode 100644 lib/paystack/base_resource.rb create mode 100644 lib/paystack/client.rb create mode 100644 lib/paystack/errors.rb create mode 100644 lib/paystack/resources/customer.rb create mode 100644 lib/paystack/resources/transaction.rb create mode 100644 lib/paystack/response.rb create mode 100644 lib/paystack/transport.rb create mode 100644 lib/paystack/version.rb create mode 100644 openapi/paystack.yaml create mode 100644 test/paystack/client_test.rb create mode 100644 test/paystack/resources/customer_test.rb create mode 100644 test/paystack/resources/transaction_test.rb diff --git a/.standard.yml b/.standard.yml index 0ed8183..bd452c2 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1,3 +1,6 @@ # For available configuration options, see: # https://github.com/standardrb/standard ruby_version: 3.1 + +ignore: + - "lib/paystack/resources/**" diff --git a/Gemfile b/Gemfile index 740e194..b713503 100644 --- a/Gemfile +++ b/Gemfile @@ -9,5 +9,6 @@ gem "irb" gem "rake", "~> 13.0" gem "minitest", "~> 5.16" +gem "webmock", "~> 3.0" gem "standard", "~> 1.3" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..f8ea8cc --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,106 @@ +PATH + remote: . + specs: + paystack-ruby (0.1.0) + +GEM + remote: https://rubygems.org/ + specs: + addressable (2.9.0) + public_suffix (>= 2.0.2, < 8.0) + ast (2.4.3) + bigdecimal (4.1.2) + crack (1.0.1) + bigdecimal + rexml + date (3.5.1) + erb (6.0.4) + hashdiff (1.2.1) + io-console (0.8.2) + irb (1.18.0) + pp (>= 0.6.0) + prism (>= 1.3.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + json (2.19.9) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + minitest (5.27.0) + parallel (2.1.0) + parser (3.3.11.1) + ast (~> 2.4.1) + racc + pp (0.6.3) + prettyprint + prettyprint (0.2.0) + prism (1.9.0) + psych (5.4.0) + date + stringio + public_suffix (7.0.5) + racc (1.8.1) + rainbow (3.1.1) + rake (13.4.2) + rdoc (7.2.0) + erb + psych (>= 4.0.0) + tsort + regexp_parser (2.12.0) + reline (0.6.3) + io-console (~> 0.5) + rexml (3.4.4) + rubocop (1.87.0) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (>= 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.49.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.49.1) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + ruby-progressbar (1.13.0) + standard (1.55.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.87.0) + standard-custom (~> 1.0.0) + standard-performance (~> 1.8) + standard-custom (1.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.9.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.26.0) + stringio (3.2.0) + tsort (0.2.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) + webmock (3.26.2) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) + +PLATFORMS + arm64-darwin-24 + ruby + +DEPENDENCIES + irb + minitest (~> 5.16) + paystack-ruby! + rake (~> 13.0) + standard (~> 1.3) + webmock (~> 3.0) + +BUNDLED WITH + 2.6.9 diff --git a/Rakefile b/Rakefile index f32601d..7b895d5 100644 --- a/Rakefile +++ b/Rakefile @@ -7,4 +7,21 @@ Minitest::TestTask.create require "standard/rake" +namespace :openapi do + desc "Fetch latest Paystack OpenAPI spec from GitHub" + task :update do + require "net/http" + require "uri" + uri = URI("https://raw.githubusercontent.com/PaystackOSS/openapi/main/dist/paystack.yaml") + content = Net::HTTP.get(uri) + File.write("openapi/paystack.yaml", content) + puts "Updated openapi/paystack.yaml" + end +end + +desc "Generate resource files from openapi/paystack.yaml" +task :generate do + ruby "generator/generate.rb" +end + task default: %i[test standard] diff --git a/generator/generate.rb b/generator/generate.rb new file mode 100644 index 0000000..ed3664a --- /dev/null +++ b/generator/generate.rb @@ -0,0 +1,109 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require "yaml" +require "erb" +require "fileutils" + +SPEC_PATH = File.expand_path("../openapi/paystack.yaml", __dir__) +TEMPLATE_PATH = File.expand_path("templates/resource.erb", __dir__) +OUTPUT_DIR = File.expand_path("../lib/paystack/resources", __dir__) + +RESOURCES = %w[Transaction Customer].freeze + +def snake_case(str) + str + .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2') + .gsub(/([a-z\d])([A-Z])/, '\1_\2') + .downcase +end + +# Strip the tag prefix from an operationId and convert to snake_case. +# e.g. "transaction_chargeAuthorization" -> "charge_authorization" +# "customer_riskAction" -> "risk_action" +def method_name(operation_id, tag) + without_prefix = operation_id.sub(/\A#{Regexp.escape(tag)}_/i, "") + snake_case(without_prefix) +end + +# Build the method signature from path params and whether the op has a body or query. +def build_signature(path_params, http_method, has_body) + parts = path_params.map { |p| "#{snake_case(p)}:" } + + if has_body + parts << "**params" + elsif %w[get delete].include?(http_method) + parts << "**params" + end + + parts.join(", ") +end + +# Build the transport path, interpolating path params as Ruby string interpolation. +def build_transport_path(path, path_params) + result = path.dup + path_params.each do |p| + result = result.gsub("{#{p}}", "\#{#{snake_case(p)}}") + end + result +end + +# Build the trailing args for the transport call. +def build_transport_args(http_method, has_body, path_params) + uses_params = has_body || %w[get delete].include?(http_method) + return "" unless uses_params + + if has_body + ", body: params" + else + ", query: params" + end +end + +spec = YAML.load_file(SPEC_PATH, aliases: true) +template = ERB.new(File.read(TEMPLATE_PATH), trim_mode: "-") + +RESOURCES.each do |tag| + operations = [] + + spec["paths"].each do |path, path_item| + # Path-level parameters (shared across methods on this path) + shared_params = (path_item["parameters"] || []) + .select { |p| p.is_a?(Hash) && p["in"] == "path" } + .map { |p| p["name"] } + + path_item.each do |http_method, op| + next unless op.is_a?(Hash) && op["tags"]&.include?(tag) + + op_path_params = shared_params + op.fetch("parameters", []) + .select { |p| p.is_a?(Hash) && p["in"] == "path" } + .map { |p| p["name"] } + + has_body = op.key?("requestBody") + op_id = op["operationId"] + name = method_name(op_id, tag) + + transport_path = build_transport_path(path, op_path_params) + uses_params = has_body || %w[get delete].include?(http_method) + + operations << { + summary: op["summary"] || op_id, + http_method: http_method, + path: path, + method_name: name, + signature: build_signature(op_path_params, http_method, has_body), + transport_path: transport_path, + transport_args: build_transport_args(http_method, has_body, op_path_params), + uses_params: uses_params + } + end + end + + class_name = tag + output = template.result(binding) + + FileUtils.mkdir_p(OUTPUT_DIR) + out_path = File.join(OUTPUT_DIR, "#{snake_case(tag)}.rb") + File.write(out_path, output) + puts "Generated #{out_path} (#{operations.size} operations)" +end diff --git a/generator/templates/resource.erb b/generator/templates/resource.erb new file mode 100644 index 0000000..8902966 --- /dev/null +++ b/generator/templates/resource.erb @@ -0,0 +1,19 @@ +# frozen_string_literal: true +# Generated by generator/generate.rb — do not edit manually + +module Paystack + module Resources + class <%= class_name %> < BaseResource +<% operations.each do |op| %> + # <%= op[:summary] %> + # <%= op[:http_method].upcase %> <%= op[:path] %> + def <%= op[:method_name] %>(<%= op[:signature] %>) + @transport.<%= op[:http_method] %>("<%= op[:transport_path] %>"<%= op[:transport_args] %>) + end +<% if op[:method_name] == "initialize" %> + public :initialize +<% end %> +<% end %> + end + end +end diff --git a/lib/paystack.rb b/lib/paystack.rb new file mode 100644 index 0000000..093ca23 --- /dev/null +++ b/lib/paystack.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require_relative "paystack/version" +require_relative "paystack/errors" +require_relative "paystack/response" +require_relative "paystack/transport" +require_relative "paystack/base_resource" +require_relative "paystack/resources/transaction" +require_relative "paystack/resources/customer" +require_relative "paystack/client" + +module Paystack +end diff --git a/lib/paystack/base_resource.rb b/lib/paystack/base_resource.rb new file mode 100644 index 0000000..7919c4b --- /dev/null +++ b/lib/paystack/base_resource.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Paystack + class BaseResource + # Override .new so subclasses can use #initialize as an API method + # without conflicting with Ruby's constructor protocol. + def self.new(transport) + instance = allocate + instance.instance_variable_set(:@transport, transport) + instance + end + end +end diff --git a/lib/paystack/client.rb b/lib/paystack/client.rb new file mode 100644 index 0000000..b7f7bfd --- /dev/null +++ b/lib/paystack/client.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Paystack + class Client + def initialize(api_key) + @transport = Transport.new(api_key) + end + + def transaction + @transaction ||= Resources::Transaction.new(@transport) + end + + def customer + @customer ||= Resources::Customer.new(@transport) + end + end +end diff --git a/lib/paystack/errors.rb b/lib/paystack/errors.rb new file mode 100644 index 0000000..d2b2e1f --- /dev/null +++ b/lib/paystack/errors.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Paystack + class Error < StandardError + attr_reader :http_status, :data + + def initialize(message = nil, http_status: nil, data: nil) + super(message) + @http_status = http_status + @data = data + end + end + + AuthenticationError = Class.new(Error) + ValidationError = Class.new(Error) + NotFoundError = Class.new(Error) + RateLimitError = Class.new(Error) + ServerError = Class.new(Error) +end diff --git a/lib/paystack/resources/customer.rb b/lib/paystack/resources/customer.rb new file mode 100644 index 0000000..9e38eaf --- /dev/null +++ b/lib/paystack/resources/customer.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true +# Generated by generator/generate.rb — do not edit manually + +module Paystack + module Resources + class Customer < BaseResource + # Create Customer + # POST /customer + def create(**params) + @transport.post("/customer", body: params) + end + + # List Customers + # GET /customer + def list(**params) + @transport.get("/customer", query: params) + end + + # Fetch Customer + # GET /customer/{code} + def fetch(code:) + @transport.get("/customer/#{code}") + end + + # Update Customer + # PUT /customer/{code} + def update(code:, **params) + @transport.put("/customer/#{code}", body: params) + end + + # Set Risk Action + # POST /customer/set_risk_action + def risk_action(**params) + @transport.post("/customer/set_risk_action", body: params) + end + + # Validate Customer + # POST /customer/{code}/identification + def validate(code:, **params) + @transport.post("/customer/#{code}/identification", body: params) + end + + # Initialize Authorization + # POST /customer/authorization/initialize + def initialize_authorization(**params) + @transport.post("/customer/authorization/initialize", body: params) + end + + # Verify Authorization + # GET /customer/authorization/verify/{reference} + def verify_authorization(reference:) + @transport.get("/customer/authorization/verify/#{reference}") + end + + # Deactivate Authorization + # POST /customer/authorization/deactivate + def deactivate_authorization(**params) + @transport.post("/customer/authorization/deactivate", body: params) + end + + # Initialize Direct Debit + # POST /customer/{id}/initialize-direct-debit + def initialize_direct_debit(id:, **params) + @transport.post("/customer/#{id}/initialize-direct-debit", body: params) + end + + # Direct Debit Activation Charge + # PUT /customer/{id}/directdebit-activation-charge + def direct_debit_activation_charge(id:, **params) + @transport.put("/customer/#{id}/directdebit-activation-charge", body: params) + end + + # Fetch Mandate Authorizations + # GET /customer/{id}/directdebit-mandate-authorizations + def fetch_mandate_authorizations(id:) + @transport.get("/customer/#{id}/directdebit-mandate-authorizations") + end + end + end +end diff --git a/lib/paystack/resources/transaction.rb b/lib/paystack/resources/transaction.rb new file mode 100644 index 0000000..39953b9 --- /dev/null +++ b/lib/paystack/resources/transaction.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true +# Generated by generator/generate.rb — do not edit manually + +module Paystack + module Resources + class Transaction < BaseResource + # Initialize Transaction + # POST /transaction/initialize + def initialize(**params) + @transport.post("/transaction/initialize", body: params) + end + public :initialize + + # Charge Authorization + # POST /transaction/charge_authorization + def charge_authorization(**params) + @transport.post("/transaction/charge_authorization", body: params) + end + + # Partial Debit + # POST /transaction/partial_debit + def partial_debit(**params) + @transport.post("/transaction/partial_debit", body: params) + end + + # Verify Transaction + # GET /transaction/verify/{reference} + def verify(reference:) + @transport.get("/transaction/verify/#{reference}") + end + + # List Transactions + # GET /transaction + def list(**params) + @transport.get("/transaction", query: params) + end + + # Fetch Transaction + # GET /transaction/{id} + def fetch(id:) + @transport.get("/transaction/#{id}") + end + + # Fetch Transaction Timeline + # GET /transaction/timeline/{id} + def timeline(id:) + @transport.get("/transaction/timeline/#{id}") + end + + # Transaction Totals + # GET /transaction/totals + def totals(**params) + @transport.get("/transaction/totals", query: params) + end + + # Export Transactions + # GET /transaction/export + def export(**params) + @transport.get("/transaction/export", query: params) + end + end + end +end diff --git a/lib/paystack/response.rb b/lib/paystack/response.rb new file mode 100644 index 0000000..0c5a878 --- /dev/null +++ b/lib/paystack/response.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +require "json" + +module Paystack + class Response + attr_reader :http_status, :status, :message, :data, :meta + + def initialize(http_response) + @http_status = http_response.code.to_i + body = http_response.body.to_s + parsed = body.empty? ? {} : JSON.parse(body, symbolize_names: true) + @status = parsed[:status] + @message = parsed[:message] + @data = parsed[:data] + @meta = parsed[:meta] + raise_error! unless success? + end + + def success? + (200..299).cover?(@http_status) && @status != false + end + + private + + def raise_error! + klass = case @http_status + when 401 then AuthenticationError + when 404 then NotFoundError + when 400, 422 then ValidationError + when 429 then RateLimitError + when 500..599 then ServerError + else Error + end + raise klass.new(@message, http_status: @http_status, data: @data) + end + end +end diff --git a/lib/paystack/ruby.rb b/lib/paystack/ruby.rb index 4e9a507..27d8e1f 100644 --- a/lib/paystack/ruby.rb +++ b/lib/paystack/ruby.rb @@ -1,10 +1,4 @@ # frozen_string_literal: true +require_relative "../paystack" require_relative "ruby/version" - -module Paystack - module Ruby - class Error < StandardError; end - # Your code goes here... - end -end diff --git a/lib/paystack/ruby/version.rb b/lib/paystack/ruby/version.rb index baa6853..f758a43 100644 --- a/lib/paystack/ruby/version.rb +++ b/lib/paystack/ruby/version.rb @@ -1,7 +1,9 @@ # frozen_string_literal: true +require_relative "../version" + module Paystack module Ruby - VERSION = "0.1.0" + VERSION = Paystack::VERSION end end diff --git a/lib/paystack/transport.rb b/lib/paystack/transport.rb new file mode 100644 index 0000000..8ea5cf6 --- /dev/null +++ b/lib/paystack/transport.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +require "net/http" +require "openssl" +require "uri" + +module Paystack + class Transport + BASE_URL = "https://api.paystack.co" + + def initialize(api_key) + @api_key = api_key + @uri = URI(BASE_URL) + end + + def get(path, query: {}) + request(Net::HTTP::Get, path, query: query) + end + + def post(path, body: {}) + request(Net::HTTP::Post, path, body: body) + end + + def put(path, body: {}) + request(Net::HTTP::Put, path, body: body) + end + + def patch(path, body: {}) + request(Net::HTTP::Patch, path, body: body) + end + + def delete(path, query: {}) + request(Net::HTTP::Delete, path, query: query) + end + + private + + def request(klass, path, query: {}, body: {}) + full_path = query.empty? ? path : "#{path}?#{URI.encode_www_form(query.compact)}" + + Net::HTTP.start(@uri.host, @uri.port, **ssl_options) do |http| + req = klass.new(full_path) + req["Authorization"] = "Bearer #{@api_key}" + req["Content-Type"] = "application/json" + req["Accept"] = "application/json" + req["User-Agent"] = "paystack-ruby/#{Paystack::VERSION}" + req.body = body.to_json unless body.empty? + Response.new(http.request(req)) + end + end + + def ssl_options + { + use_ssl: true, + min_version: OpenSSL::SSL::TLS1_2_VERSION, + verify_mode: OpenSSL::SSL::VERIFY_PEER, + open_timeout: 10, + read_timeout: 30 + } + end + end +end diff --git a/lib/paystack/version.rb b/lib/paystack/version.rb new file mode 100644 index 0000000..1638174 --- /dev/null +++ b/lib/paystack/version.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +module Paystack + VERSION = "0.1.0" +end diff --git a/openapi/paystack.yaml b/openapi/paystack.yaml new file mode 100644 index 0000000..efa5c8d --- /dev/null +++ b/openapi/paystack.yaml @@ -0,0 +1,19146 @@ +openapi: 3.0.1 +info: + title: Paystack + description: The OpenAPI specification of the Paystack API that merchants and developers can harness to build financial solutions in Africa. + version: 1.0.0 + contact: + email: techsupport@paystack.com +servers: + - url: https://api.paystack.co + description: Base API endpoint +security: + - bearerAuth: [] +tags: + - name: Transaction + description: | + A collection of endpoints for managing payments + x-product-name: Transactions + - name: Charge + description: | + A collection of endpoints for configuring and managing the payment channels when initiating a payment + x-product-name: Charges + - name: Bulk Charge + description: | + A collection of endpoints for creating and managing multiple recurring payments + x-product-name: Bulk Charges + - name: Subaccount + description: | + A collection of endpoints for creating and managing accounts for sharing a + transaction with + x-product-name: Subaccounts + - name: Split + description: | + A collection of endpoints for spliting a transaction and managing the splits + x-product-name: Transaction Splits + - name: Terminal + description: | + A collection of endpoints for building delightful in-person payment experiences + x-product-name: Terminal + - name: Virtual Terminal + description: | + A collection of endpoints for building in-person payments without a physical terminal + x-product-name: Virtual Terminal + - name: Customer + description: | + A collection of endpoints for creating and managing customers on an integration + x-product-name: Customers + - name: Direct Debit + description: | + A collection of endpoints for managing Direct Debit + x-product-name: Direct Debit + - name: Dedicated Virtual Account + description: | + A collection of endpoints for creating and managing payment accounts for customers + x-product-name: Dedicated Virtual Accounts + - name: Apple Pay + description: | + A collection of endpoints for managing application's top-level domain or subdomain accepting payment via Apple Pay + x-product-name: Apple Pay + - name: Plan + description: | + A collection of endpoints for creating and managing recurring payment + configuration + x-product-name: Plans + - name: Subscription + description: | + A collection of endpoints for creating and managing recurring payments + x-product-name: Subscriptions + - name: Transfer Recipient + description: | + A collection of endpoints for creating and managing beneficiaries that you send money to + x-product-name: Transfer Recipients + - name: Transfer + description: | + A collection of endpoints for automating sending money to beneficiaries + x-product-name: Transfers + - name: Balance + description: | + A collection of endpoints gaining insights into the amount on an integration + x-product-name: Balance + - name: Payment Request + description: | + A collection of endpoints for managing invoices for the payment of goods + and services + x-product-name: Payment Requests + - name: Product + description: | + A collection of endpoints for creating and managing inventories + x-product-name: Products + - name: Storefront + description: | + A collection of endpoints for creating and managing storefronts + x-product-name: Storefronts + - name: Order + description: | + A collection of endpoints for creating and managing orders + x-product-name: Orders + - name: Page + description: | + A collection of endpoints for creating and managing links for the + collection of payment for products + x-product-name: Payment Pages + - name: Settlement + description: | + A collection of endpoints for gaining insights into payouts + x-product-name: Settlements + - name: Integration + description: | + A collection of endpoints for managing some settings on an integration + x-product-name: Integration + - name: Refund + description: | + A collection of endpoints for creating and managing transaction reimbursement + x-product-name: Refunds + - name: Dispute + description: | + A collection of endpoints for managing transactions complaint made by customers + x-product-name: Disputes + - name: Bank + description: | + A collection of endpoints for managing bank details + x-product-name: Banks + - name: Miscellaneous + description: | + A collection of endpoints that provides utility functions + x-product-name: Miscellaneous +paths: + /transaction/initialize: + post: + tags: + - Transaction + summary: Initialize Transaction + operationId: transaction_initialize + description: Create a new transaction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionInitialize' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransactionInitialize' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionInitializeResponse' + '400': + $ref: '#/components/responses/TransactionInitializeBadRequestResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transaction/charge_authorization: + post: + tags: + - Transaction + summary: Charge Authorization + operationId: transaction_chargeAuthorization + description: Charge all authorizations marked as reusable with this endpoint whenever you need to receive payments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionChargeAuthorization' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransactionChargeAuthorization' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeAuthorizationResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transaction/partial_debit: + post: + tags: + - Transaction + summary: Partial Debit + operationId: transaction_partialDebit + description: Retrieve part of a payment from a customer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionPartialDebit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransactionPartialDebit' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionPartialDebitResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transaction/verify/{reference}: + get: + tags: + - Transaction + summary: Verify Transaction + operationId: transaction_verify + description: Verify a previously initiated transaction using it's reference + parameters: + - name: reference + in: path + description: The transaction reference to verify + required: true + schema: + type: string + example: re4lyvq3s3 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/VerifyResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction: + get: + tags: + - Transaction + summary: List Transactions + operationId: transaction_list + description: List transactions that has occurred on your integration + parameters: + - in: query + name: use_cursor + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + example: true + - in: query + name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + schema: + type: string + - in: query + name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + schema: + type: string + - in: query + name: per_page + schema: + type: integer + description: The number of records to fetch per request + - in: query + name: page + schema: + type: integer + description: The offset to retrieve data from + - in: query + name: from + description: The start date + schema: + type: string + format: date-time + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + - in: query + name: status + description: Filter transaction by status + schema: + type: string + enum: + - success + - failed + - abandoned + - reversed + - in: query + name: source + description: The origin of the payment + schema: + type: string + enum: + - merchantApi + - checkout + - pos + - virtualTerminal + - in: query + name: terminal_id + description: Filter transactions by a terminal ID + schema: + type: string + - in: query + name: virtual_account_number + description: Filter transactions by a virtual account number + schema: + type: string + - in: query + name: customer_code + description: Filter transactions by a customer code + schema: + type: string + - in: query + name: amount + description: Filter transactions by a specific amount + schema: + type: integer + format: int64 + - in: query + name: settlement + description: The settlement ID to filter for settled transactions + schema: + type: integer + format: int64 + - in: query + name: channel + description: The payment method the customer used to complete the transaction + schema: + type: string + enum: + - card + - pos + - bank + - dedicated_nuban + - ussd + - bank_transfer + - in: query + name: subaccount_code + description: Filter transaction by subaccount code + schema: + type: string + - in: query + name: split_code + description: Filter transaction by split code + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction/{id}: + get: + tags: + - Transaction + summary: Fetch Transaction + operationId: transaction_fetch + description: Fetch a transaction to get its details + parameters: + - name: id + in: path + description: The ID of the transaction to fetch + required: true + schema: + type: integer + format: int64 + example: 4099260516 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction/timeline/{id}: + get: + tags: + - Transaction + summary: Fetch Transaction Timeline + operationId: transaction_timeline + description: Fetch the steps taken from the initiation to the completion of a transaction + parameters: + - name: id + in: path + required: true + description: The ID of the transaction to fetch + schema: + type: integer + format: int64 + example: 3936799950 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionTimelineResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction/totals: + get: + tags: + - Transaction + summary: Transaction Totals + operationId: transaction_totals + description: Get the total amount of all transactions + parameters: + - in: query + description: The start date + name: from + schema: + type: string + format: date-time + example: '2024-06-01T00:00:01Z' + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + example: '2024-06-30T13:36:54Z' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionTotalsResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction/export: + get: + tags: + - Transaction + summary: Export Transactions + operationId: transaction_export + x-operationId: transaction_exportTransaction + description: Download transactions that occurred on your integration for a specific timeframe + parameters: + - in: query + name: from + description: The start date + schema: + type: string + format: date-time + example: '2024-06-01T00:00:01Z' + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + example: '2024-06-30T13:36:54Z' + - in: query + name: status + description: Filter by the status of the transaction + schema: + type: string + enum: + - success + - failed + - abandoned + - reversed + - all + example: success + - in: query + name: customer + description: Filter by customer ID + schema: + type: number + example: 123172416 + - in: query + name: subaccount_code + description: Filter by subaccount code + schema: + type: string + example: ACCT_dskvlw3y3dMukmt + - in: query + name: settlement + description: Filter by the settlement ID + schema: + type: integer + format: int64 + example: 5687910 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionExportResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /charge: + post: + tags: + - Charge + summary: Create Charge + operationId: charge_create + description: Initiate a payment by integrating the payment channel of your choice. + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ChargeCreate' + - type: object + properties: + bank: + $ref: '#/components/schemas/Bank' + - type: object + properties: + mobile_money: + $ref: '#/components/schemas/MobileMoney' + - type: object + properties: + ussd: + $ref: '#/components/schemas/USSD' + - type: object + properties: + eft: + $ref: '#/components/schemas/EFT' + application/x-www-form-urlencoded: + schema: + allOf: + - $ref: '#/components/schemas/ChargeCreate' + - type: object + properties: + bank: + $ref: '#/components/schemas/Bank' + - type: object + properties: + mobile_money: + $ref: '#/components/schemas/MobileMoney' + - type: object + properties: + ussd: + $ref: '#/components/schemas/USSD' + - type: object + properties: + eft: + $ref: '#/components/schemas/EFT' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_pin: + post: + tags: + - Charge + summary: Submit PIN + operationId: charge_submitPin + description: Submit PIN to continue a charge + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitPin' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitPin' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitPinResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_otp: + post: + tags: + - Charge + summary: Submit OTP + operationId: charge_submitOtp + description: Submit OTP to complete a charge + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitOTP' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitOTP' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_phone: + post: + tags: + - Charge + summary: Submit Phone + operationId: charge_submitPhone + description: Submit phone number when requested + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitPhone' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitPhone' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitPhoneResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_birthday: + post: + tags: + - Charge + summary: Submit Birthday + operationId: charge_submitBirthday + description: Submit the customer's birthday when requested + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitBirthday' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitBirthday' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitBirthdayResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_address: + post: + tags: + - Charge + summary: Submit Address + operationId: charge_submitAddress + description: Send the details of the customer's address for address verification + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitAddress' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitAddress' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/{reference}: + get: + tags: + - Charge + summary: Check pending charge + operationId: charge_check + description: | + When you get `pending` as a charge status or if there was an exception when calling any of the `/charge` endpoints, wait 10 seconds or more, then make a check to see if its status has changed. Don't call too early as you may get a lot more pending than you should. + parameters: + - name: reference + in: path + required: true + description: The reference of the ongoing transaction + schema: + type: string + example: 5bwib5v6anhe9xa + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeCheckPendingResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge: + post: + tags: + - Bulk Charge + summary: Initiate Bulk Charge + operationId: bulkCharge_initiate + description: Charge multiple customers in batches + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/BulkChargeInitiate' + application/x-www-form-urlencoded: + schema: + type: array + items: + $ref: '#/components/schemas/BulkChargeInitiate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeInitiateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Bulk Charge + summary: List Bulk Charge Batches + operationId: bulkCharge_list + description: List all bulk charge batches. + parameters: + - in: query + name: perPage + description: Number of records to fetch per page + schema: + type: integer + - in: query + name: page + description: The offset to retrieve data from + schema: + type: integer + - in: query + name: status + description: Filter by the status of the charges + schema: + type: string + enum: + - active + - paused + - complete + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge/{code}: + parameters: + - name: code + description: The code for the charge whose batches you want to retrieve + in: path + required: true + schema: + type: string + example: BCH_180tl7oq7cayggh + get: + tags: + - Bulk Charge + summary: Fetch Bulk Charge Batch + operationId: bulkCharge_fetch + description: | + This endpoint retrieves a specific batch code. It also returns useful information on its progress by + way of the `total_charges` and `pending_charges` attributes. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge/{code}/charges: + get: + tags: + - Bulk Charge + summary: List Charges in a Batch + operationId: bulkCharge_charges + description: This endpoint retrieves the charges associated with a specified batch code + parameters: + - name: code + description: An code for the batch whose charges you want to retrieve + in: path + required: true + schema: + type: string + example: BCH_180tl7oq7cayggh + - in: query + name: perPage + description: Number of records to fetch per page + schema: + type: integer + - in: query + name: page + description: The offset to retrieve data from + schema: + type: integer + - in: query + name: status + description: Filter by the status of the charges + schema: + type: string + enum: + - success + - failed + - pending + - error + - inactive_authorization + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeFetchBulkBatchChargesResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge/pause/{code}: + get: + tags: + - Bulk Charge + summary: Pause Bulk Charge Batch + operationId: bulkCharge_pause + description: Pause the processing of a charge batch + parameters: + - name: code + description: The batch code for the bulk charge you want to pause + in: path + required: true + schema: + type: string + example: BCH_180tl7oq7cayggh + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargePauseResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge/resume/{code}: + get: + tags: + - Bulk Charge + summary: Resume Bulk Charge Batch + operationId: bulkCharge_resume + description: Resume the processing of a previously paused charge batch + parameters: + - name: code + description: The batch code for the bulk charge you want to pause + in: path + required: true + schema: + type: string + example: BCH_180tl7oq7cayggh + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeResumeResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subaccount: + post: + tags: + - Subaccount + summary: Create Subaccount + operationId: subaccount_create + description: Create a subacount for a partner + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubaccountCreate' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Subaccount + summary: List Subaccounts + operationId: subaccount_list + description: List subaccounts available on your integration + parameters: + - in: query + name: perPage + description: Number of records to fetch per request + schema: + type: integer + default: 50 + - in: query + name: page + description: The offset to retrieve data from + schema: + type: integer + default: 1 + - in: query + name: active + description: Filter by the state of the subaccounts + schema: + type: boolean + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subaccount/{code}: + parameters: + - name: code + in: path + description: The subaccount code you want to fetch + required: true + schema: + type: string + example: ACCT_6uujpqtzmnufzkw + get: + tags: + - Subaccount + summary: Fetch Subaccount + operationId: subaccount_fetch + description: Get details of a subaccount on your integration + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Subaccount + summary: Update Subaccount + operationId: subaccount_update + description: Update a subaccount details on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubaccountUpdate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountUpdateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /split: + post: + tags: + - Split + summary: Create Split + operationId: split_create + description: Create a split configuration for transactions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SplitCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SplitCreate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Split + summary: List Splits + operationId: split_list + description: List the transaction splits available on your integration + parameters: + - in: query + name: subaccount_code + description: Filter by subaccount code + schema: + type: string + example: ACCT_dskvlw3y3dMukmt + - name: name + description: The name of the split + in: query + schema: + type: string + - name: active + description: The status of the split + in: query + schema: + type: boolean + - in: query + name: per_page + schema: + type: integer + description: The number of records to fetch per request + - in: query + name: page + schema: + type: integer + description: The offset to retrieve data from + - in: query + name: from + description: The start date + schema: + type: string + format: date-time + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /split/{id}: + get: + tags: + - Split + summary: Fetch Split + operationId: split_fetch + description: Get details of a split configuration for a transaction + parameters: + - name: id + in: path + description: The ID of the split configuration to fetch + required: true + schema: + type: integer + example: 4896895 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Split + summary: Update Split + operationId: split_update + description: Update a split configuration for transactions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SplitUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SplitUpdate' + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitUpdateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /split/{id}/subaccount/add: + post: + tags: + - Split + summary: Add Subaccount to Split + operationId: split_addSubaccount + description: Add a subaccount to a split configuration, or update the share of an existing subaccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SplitSubaccounts' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SplitSubaccounts' + parameters: + - name: id + in: path + required: true + description: The ID of the split configuration to fetch + schema: + type: integer + example: 4896895 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitAddUpdateSubaccountResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /split/{id}/subaccount/remove: + post: + tags: + - Split + summary: Remove Subaccount from split + operationId: split_removeSubaccount + description: Remove a subaccount from a split configuration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SplitSubaccounts' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SplitSubaccounts' + parameters: + - name: id + in: path + description: The ID of the split configuration to fetch + required: true + schema: + type: integer + example: 4896895 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitRemoveSubaccountResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /terminal/{id}/event: + post: + tags: + - Terminal + summary: Send Event + description: Send an event from your application to the Paystack Terminal + operationId: terminal_sendEvent + parameters: + - name: id + in: path + required: true + description: The ID of the Terminal the event should be sent to. + schema: + type: string + example: Z0R4orOU + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalSendEvent' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TerminalSendEvent' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /terminal/{terminal_id}/event/{event_id}: + get: + tags: + - Terminal + summary: Fetch Event Status + description: Check the status of an event sent to the Terminal + operationId: terminal_fetchEventStatus + parameters: + - name: terminal_id + in: path + required: true + description: The ID of the Terminal the event should be sent to. + schema: + type: string + example: Z0R4orOU + - name: event_id + in: path + required: true + description: The ID of the event that was sent to the Terminal + schema: + type: string + example: 616d721e8c5cd40a0cdd54a6 + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /terminal/{terminal_id}/presence: + get: + tags: + - Terminal + summary: Fetch Terminal Status + description: Check the availiability of a Terminal before sending an event to it + operationId: terminal_fetchTerminalStatus + parameters: + - name: terminal_id + in: path + required: true + description: The ID of the Terminal the event should be sent to. + schema: + type: string + example: Z0R4orOU + responses: + '200': + $ref: '#/components/responses/TerminalGetStatusSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /terminal: + get: + tags: + - Terminal + summary: List Terminals + operationId: terminal_list + description: List the Terminals available on your integration + parameters: + - name: next + in: query + description: A cursor that indicates your place in the list. It can be used to fetch the next page of the list + schema: + type: string + - name: previous + in: query + description: A cursor that indicates your place in the list. It should be used to fetch the previous page of the list after an intial next request + schema: + type: string + - name: per_page + in: query + description: Specify how many records you want to retrieve per page + schema: + type: integer + default: 50 + responses: + '200': + $ref: '#/components/responses/TerminalListsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /terminal/{terminal_id}: + parameters: + - name: terminal_id + in: path + description: The ID of the Terminal the event should be sent to. + required: true + schema: + type: string + example: Z0R4orOU + get: + tags: + - Terminal + summary: Fetch Terminal + description: Get the details of a Terminal + operationId: terminal_fetch + responses: + '200': + $ref: '#/components/responses/TerminalGetSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Terminal + summary: Update Terminal + operationId: terminal_update + description: Update the details of a Terminal + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalUpate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TerminalUpate' + responses: + '200': + $ref: '#/components/responses/TerminalUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /terminal/commission_device: + post: + tags: + - Terminal + summary: Commission Terminal + description: Activate your debug device by linking it to your integration + operationId: terminal_commission + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalActivationToggle' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TerminalActivationToggle' + responses: + '200': + $ref: '#/components/responses/TerminalCommissionDeviceSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /terminal/decommission_device: + post: + tags: + - Terminal + summary: Decommission Terminal + description: Unlink your debug device from your integration + operationId: terminal_decommission + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalActivationToggle' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TerminalActivationToggle' + responses: + '200': + $ref: '#/components/responses/TerminalDecommissionDeviceSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal: + post: + tags: + - Virtual Terminal + summary: Create Virtual Terminal + description: Create a Virtual Terminal on your integration + operationId: virtualTerminal_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalCreate' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Virtual Terminal + summary: List Virtual Terminals + description: List Virtual Terminals on your integration + operationId: virtualTerminal_list + parameters: + - name: perPage + in: query + description: The number of records to fetch per request + schema: + type: integer + example: 75 + - name: page + in: query + description: The offset to retrieve data from + schema: + type: integer + responses: + '200': + $ref: '#/components/responses/VirtualTerminalListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + get: + tags: + - Virtual Terminal + summary: Fetch Virtual Terminal + description: Fetch a Virtual Terminal on your integration + operationId: virtualTerminal_fetch + responses: + '200': + $ref: '#/components/responses/VirtualTerminalFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + put: + tags: + - Virtual Terminal + summary: Update Virtual Terminal + description: Update a Virtual Terminal on your integration + operationId: virtualTerminal_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalUpdate' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/deactivate: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + put: + tags: + - Virtual Terminal + summary: Deactivate Virtual Terminal + operationId: virtualTerminal_deactivate + description: Deactivate a Virtual Terminal on your integration + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDeactivateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/destination/assign: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + post: + tags: + - Virtual Terminal + summary: Assign Destination to Virtual Terminal + operationId: virtualTerminal_destinationAssign + description: Add a destination (WhatsApp number) to a Virtual Terminal on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationAssign' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationAssign' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDestinationAssignSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/destination/unassign: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + post: + tags: + - Virtual Terminal + summary: Unassign Destination from Virtual Terminal + operationId: virtualTerminal_destinationUnassign + description: Unassign a destination (WhatsApp Number) from a Virtual Terminal on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationUnassign' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationUnassign' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDestinationUnassignSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/split_code: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + put: + tags: + - Virtual Terminal + summary: Add Split Code to Virtual Terminal + description: Add Split Code to Virtual Terminal + operationId: virtualTerminal_addSplitCode + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalAddSplitCode' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalAddSplitCode' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalAddSplitCodeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server Error + delete: + tags: + - Virtual Terminal + summary: Remove Split Code from Virtual Terminal + description: Remove Split Code from Virtual Terminal + operationId: virtualTerminal_deleteSplitCode + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDeleteSplitCode' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalDeleteSplitCode' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDeleteSplitCodeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server Error + /customer: + post: + tags: + - Customer + summary: Create Customer + operationId: customer_create + description: Create a customer on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerCreate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Customer + summary: List Customers + operationId: customer_list + description: List customers on your integration + parameters: + - name: use_cursor + description: A flag to indicate if cursor based pagination should be used + in: query + schema: + type: boolean + - name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + in: query + schema: + type: string + - name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + in: query + schema: + type: string + - name: from + description: The start date + in: query + schema: + type: string + format: date-time + - name: to + description: The end date + in: query + schema: + type: string + format: date-time + - name: perPage + description: The number of records to fetch per request + in: query + schema: + type: string + - name: page + in: query + description: The offset to retrieve data from + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /customer/{code}: + parameters: + - name: code + in: path + required: true + description: The code for the customer gotten from the response of the customer creation + schema: + type: string + example: CUS_c6wqvwmvwopw4ms + get: + tags: + - Customer + summary: Fetch Customer + operationId: customer_fetch + description: Get details of a customer on your integration. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Customer + summary: Update Customer + operationId: customer_update + description: Update a customer's details on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerUpdate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerUpdateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /customer/set_risk_action: + post: + tags: + - Customer + summary: Set Risk Action + description: Set customer's risk action by whitelisting or blacklisting the customer + operationId: customer_riskAction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerRiskAction' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerRiskAction' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerWhitelistBlacklistResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/{code}/identification: + parameters: + - name: code + in: path + required: true + description: The code for the customer gotten from the response of the customer creation + schema: + type: string + example: CUS_c6wqvwmvwopw4ms + post: + tags: + - Customer + summary: Validate Customer + operationId: customer_validate + description: Validate a customer's identity + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerValidate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerValidate' + responses: + '202': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerValidateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/authorization/initialize: + post: + tags: + - Customer + summary: Initialize Authorization + description: Initiate a request to create a reusable authorization code for recurring transactions + operationId: customer_initializeAuthorization + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAuthorizationInitializeRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerAuthorizationInitializeRequest' + responses: + '200': + $ref: '#/components/responses/CustomerAuthorizationInitializeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/authorization/verify/{reference}: + get: + tags: + - Customer + summary: Verify Authorization + description: Check the status of an authorization request + operationId: customer_verifyAuthorization + parameters: + - name: reference + in: path + description: The reference returned in the initialization response + required: true + schema: + type: string + example: dfbzfotsrbv4n5s82t4mp5b5mfn51h + responses: + '200': + $ref: '#/components/responses/CustomerAuthorizationVerifySuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /customer/authorization/deactivate: + post: + tags: + - Customer + summary: Deactivate Authorization + operationId: customer_deactivateAuthorization + description: Deactivate an authorization for any payment channel. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerDeactivateAuthorization' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerDeactivateAuthorization' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerDeactivateAuthorizationResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/{id}/initialize-direct-debit: + parameters: + - name: id + in: path + required: true + description: The ID of the customer to initialize the direct debit for + schema: + type: integer + example: 297346561 + post: + tags: + - Customer + summary: Initialize Direct Debit + operationId: customer_initializeDirectDebit + description: Initialize the process of linking an account to a customer for Direct Debit transactions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerInitializeDirectDebitRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerInitializeDirectDebitRequest' + responses: + '200': + $ref: '#/components/responses/CustomerInitializeDirectDebitSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/{id}/directdebit-activation-charge: + put: + tags: + - Customer + summary: Direct Debit Activation Charge + operationId: customer_directDebitActivationCharge + description: Trigger an activation charge on an inactive mandate on behalf of your customer + parameters: + - name: id + in: path + required: true + description: The customer ID attached to the authorization + schema: + type: integer + example: 297346561 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerDirectDebitActivationChargeRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerDirectDebitActivationChargeRequest' + responses: + '200': + $ref: '#/components/responses/CustomerDirectDebitActivationChargeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/{id}/directdebit-mandate-authorizations: + get: + tags: + - Customer + summary: Fetch Mandate Authorizations + operationId: customer_fetchMandateAuthorizations + description: Get the list of direct debit mandates associated with a customer + parameters: + - name: id + in: path + required: true + description: The customer ID for the authorizations to fetch + schema: + type: integer + example: 297346561 + responses: + '200': + $ref: '#/components/responses/CustomerFetchMandateAuthorizationsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /directdebit/activation-charge: + put: + tags: + - Direct Debit + summary: Trigger Activation Charge + description: Trigger activation charge for specified customers + operationId: directdebit_triggerActivationCharge + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DirectDebitActivationChargeRequest' + responses: + '200': + $ref: '#/components/responses/DirectDebitActivationChargeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /directdebit/mandate-authorizations: + get: + tags: + - Direct Debit + summary: List Mandate Authorizations + description: Get a list of all the direct debit mandates on your integration + operationId: directdebit_listMandateAuthorizations + parameters: + - name: cursor + in: query + description: The cursor value of the next set of authorizations to fetch. You can get this from the meta object of the response + schema: + type: string + - name: status + in: query + description: Filter by the authorization status + schema: + type: string + enum: + - pending + - active + - revoked + - name: per_page + in: query + description: The number of authorizations to fetch per request + schema: + type: integer + responses: + '200': + $ref: '#/components/responses/CustomerFetchMandateAuthorizationsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /dedicated_account: + post: + tags: + - Dedicated Virtual Account + summary: Create Dedicated Account + operationId: dedicatedAccount_create + description: Create a dedicated virtual account for an existing customer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountCreate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedNubanCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Dedicated Virtual Account + summary: List Dedicated Accounts + operationId: dedicatedAccount_list + description: List dedicated virtual accounts available on your integration. + parameters: + - name: active + in: query + description: Status of the dedicated virtual account + schema: + type: boolean + example: true + - name: customer + in: query + description: The customer's ID + schema: + type: integer + example: 297346561 + - name: currency + in: query + description: The currency of the dedicated virtual account + schema: + type: string + enum: + - NGN + - GHS + - name: provider_slug + in: query + description: The bank's slug in lowercase, without spaces + schema: + type: string + example: titan-paystack + - name: bank_id + in: query + description: The bank's ID + schema: + type: string + example: '035' + - name: perPage + in: query + description: The number of records to fetch per request + schema: + type: integer + default: 50 + - name: page + in: query + description: The offset to retrieve data from + schema: + type: integer + default: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedNubanListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dedicated_account/assign: + post: + tags: + - Dedicated Virtual Account + summary: Assign Dedicated Account + operationId: dedicatedAccount_assign + description: With this endpoint, you can create a customer, validate the customer, and assign a DVA to the customer. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountAssign' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountAssign' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /dedicated_account/{id}: + parameters: + - name: id + in: path + required: true + description: ID of dedicated virtual account + schema: + type: string + get: + tags: + - Dedicated Virtual Account + summary: Fetch Dedicated Account + operationId: dedicatedAccount_fetch + description: Get details of a dedicated virtual account on your integration. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedNubanFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Dedicated Virtual Account + summary: Deactivate Dedicated Account + operationId: dedicatedAccount_deactivate + description: Deactivate a dedicated virtual account on your integration. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedNubanDeactivateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dedicated_account/requery: + parameters: + - name: account_number + description: Virtual account number to requery + in: query + schema: + type: string + example: '0033322211' + - name: provider_slug + description: The bank's slug in lowercase, without spaces. + in: query + schema: + type: string + example: titan-paystack + - name: date + description: The day the transfer was made + in: query + schema: + type: string + format: date-time + get: + tags: + - Dedicated Virtual Account + summary: Requery Dedicated Account + operationId: dedicatedAccount_requery + description: Requery Dedicated Virtual Account for new transactions + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dedicated_account/split: + post: + tags: + - Dedicated Virtual Account + summary: Split Dedicated Account Transaction + operationId: dedicatedAccount_addSplit + description: Split a dedicated virtual account transaction with one or more accounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountSplit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountSplit' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + delete: + tags: + - Dedicated Virtual Account + summary: Remove Split from Dedicated Account + operationId: dedicatedAccount_removeSplit + description: If you've previously set up split payment for transactions on a dedicated virtual account, you can remove it with this endpoint + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountRemoveSplit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountRemoveSplit' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dedicated_account/available_providers: + get: + tags: + - Dedicated Virtual Account + summary: Fetch Bank Providers + operationId: dedicatedAccount_availableProviders + description: Get available bank providers for a dedicated virtual account + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /apple-pay/domain: + post: + tags: + - Apple Pay + summary: Register Domain + description: | + Register a top-level domain or subdomain for your Apple Pay integration. + + > This endpoint can only be called with one domain or subdomain at a time. + operationId: applePay_registerDomain + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplePayParam' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ApplePayParam' + responses: + '200': + $ref: '#/components/responses/ApplePayOkResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Apple Pay + summary: List Domains + description: Lists all registered domains on your integration. Returns an empty array if no domains have been added. + operationId: applePay_listDomain + parameters: + - name: use_cursor + in: query + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + example: true + - name: next + in: query + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + schema: + type: string + - name: previous + in: query + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + schema: + type: string + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Apple Pay + summary: Unregister Domain + description: | + Unregister a top-level domain or subdomain previously used for your Apple + Pay integration. + operationId: applePay_unregisterDomain + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplePayParam' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ApplePayParam' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /plan: + post: + tags: + - Plan + summary: Create Plan + operationId: plan_create + description: Create a plan for recurring payments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PlanCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PlanCreate' + responses: + '200': + $ref: '#/components/responses/PlanCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Plan + summary: List Plans + operationId: plan_list + description: List all recurring payment plans + parameters: + - in: query + name: perPage + description: Number of records to fetch per page + schema: + type: integer + - in: query + name: page + description: The section to retrieve + schema: + type: integer + - in: query + name: interval + description: Specify interval of the plan + schema: + type: string + enum: + - daily + - weekly + - monthly + - biannually + - annually + - in: query + name: amount + schema: + type: integer + description: The amount on the plans to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/PlanListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /plan/{code}: + parameters: + - name: code + in: path + required: true + description: The plan code you want to fetch + schema: + type: string + example: PLN_gx2wn530m0i3w3m + get: + tags: + - Plan + summary: Fetch Plan + operationId: plan_fetch + description: Get the details of a payment plan + responses: + '200': + $ref: '#/components/responses/PlanFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Plan + summary: Update Plan + description: Update a plan details on your integration + operationId: plan_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PlanUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PlanUpdate' + responses: + '200': + $ref: '#/components/responses/PlanUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subscription: + post: + tags: + - Subscription + summary: Create Subscription + description: Create a subscription a customer + operationId: subscription_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubscriptionCreate' + responses: + '200': + $ref: '#/components/responses/SubscriptionCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Subscription + summary: List Subscriptions + description: List all subscriptions available on your integration + operationId: subscription_list + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: plan + description: Plan ID + schema: + type: integer + example: 2697466 + - in: query + name: customer + schema: + type: string + description: Customer ID + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/SubscriptionListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subscription/{code}: + parameters: + - name: code + in: path + required: true + description: The subscription code for the subscription you want to fetch + schema: + type: string + example: SUB_5co81xgmwg78x3d + get: + tags: + - Subscription + summary: Fetch Subscription + description: Get details of a customer's subscription + operationId: subscription_fetch + responses: + '200': + $ref: '#/components/responses/SubscriptionFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subscription/disable: + post: + tags: + - Subscription + summary: Disable Subscription + description: Disable a subscription on your integration + operationId: subscription_disable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionToggle' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubscriptionToggle' + responses: + '200': + $ref: '#/components/responses/SubscriptionDisableSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /subscription/enable: + post: + tags: + - Subscription + summary: Enable Subscription + description: Enable a subscription on your integration + operationId: subscription_enable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionToggle' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubscriptionToggle' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /subscription/{code}/manage/link: + get: + tags: + - Subscription + summary: Generate Update Subscription Link + description: Generate a link for updating the card on a subscription + operationId: subscription_manageLink + parameters: + - name: code + in: path + required: true + description: Subscription code + schema: + type: string + example: qlgwhpyq1ts9nsw + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /subscription/{code}/manage/email: + post: + tags: + - Subscription + summary: Send Update Subscription Link + description: Email a customer a link for updating the card on their subscription + operationId: subscription_manageEmail + parameters: + - name: code + in: path + required: true + description: Subscription code + schema: + type: string + example: qlgwhpyq1ts9nsw + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transferrecipient: + post: + tags: + - Transfer Recipient + summary: Create Transfer Recipient + description: Creates a new recipient. A duplicate account number will lead to the retrieval of the existing record. + operationId: transferrecipient_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferRecipientCreate' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Transfer Recipient + summary: List Transfer Recipients + description: List transfer recipients available on your integration + operationId: transferrecipient_list + parameters: + - in: query + name: use_cursor + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + - in: query + name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + schema: + type: string + - in: query + name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + schema: + type: string + - in: query + name: per_page + schema: + type: integer + description: The number of records to fetch per request + - in: query + name: page + schema: + type: integer + description: The offset to retrieve data from + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transferrecipient/bulk: + post: + tags: + - Transfer Recipient + summary: Bulk Create Transfer Recipient + description: | + Create multiple transfer recipients in batches. A duplicate account number will lead to the retrieval of the existing record. + operationId: transferrecipient_bulk + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientBulk' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferRecipientBulk' + responses: + '200': + description: Sucessful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientBulkCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transferrecipient/{code}: + parameters: + - name: code + description: Transfer recipient code + in: path + required: true + schema: + type: string + example: RCP_5ap8rcimmcj8lbi + get: + tags: + - Transfer Recipient + summary: Fetch Transfer recipient + description: Fetch the details of a transfer recipient + operationId: transferrecipient_fetch + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Transfer Recipient + summary: Update Transfer Recipient + description: Update the details of a transfer recipient + operationId: transferrecipient_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferRecipientUpdate' + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientUpdateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Transfer Recipient + summary: Delete Transfer Recipient + description: Delete a transfer recipient (sets the transfer recipient to inactive) + operationId: transferrecipient_delete + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientDeleteResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer: + post: + tags: + - Transfer + summary: Initiate Transfer + description: Send money to your customers + operationId: transfer_initiate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferInitiate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferInitiate' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/TransferCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Transfer + summary: List Transfers + description: List the transfers made on your integration + operationId: transfer_list + parameters: + - in: query + name: use_cursor + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + example: true + - in: query + name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + schema: + type: string + - in: query + name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + schema: + type: string + - in: query + name: per_page + schema: + type: integer + description: The number of records to fetch per request + - in: query + name: page + schema: + type: integer + description: The offset to retrieve data from + - in: query + name: from + description: The start date + schema: + type: string + format: date-time + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + - in: query + name: recipient + description: Filter transfer by the recipient code + schema: + type: string + - in: query + name: status + description: Filter transfer by status + schema: + type: string + default: pending + enum: + - pending + - success + - failed + - otp + - abandoned + - reversed + - blocked + - rejected + - received + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer/finalize_transfer: + post: + tags: + - Transfer + summary: Finalize Transfer + description: Finalize an initiated transfer + operationId: transfer_finalize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferFinalize' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferFinalize' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/bulk: + post: + tags: + - Transfer + summary: Initiate Bulk Transfer + description: | + Batch multiple transfers in a single request. + + You need to disable the Transfers OTP requirement to use this endpoint. + operationId: transfer_bulk + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferBulk' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferBulk' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferBulkResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/{code}: + parameters: + - name: code + description: Transfer code + in: path + required: true + schema: + type: string + example: TRF_1ptvuv321ahaa7q + get: + tags: + - Transfer + summary: Fetch Transfer + description: Get details of a transfer on your integration + operationId: transfer_fetch + responses: + '200': + description: Succesful operation + content: + application/json: + schema: + $ref: '#/components/schemas/TransferFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer/verify/{reference}: + get: + tags: + - Transfer + summary: Verify Transfer + description: Verify the status of a transfer on your integration + operationId: transfer_verify + parameters: + - name: reference + description: Transfer reference + in: path + required: true + schema: + type: string + example: acv_9ee55786-2323-4760-98e2-6380c9cb3f67 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferVerifyResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer/export: + get: + tags: + - Transfer + summary: Export Transfers + description: Export a list of transfers carried out on your integration + operationId: transfer_exportTransfer + parameters: + - in: query + name: recipient + description: Export transfer by the recipient code + schema: + type: string + - in: query + name: status + description: Export transfer by status + schema: + type: string + default: pending + enum: + - pending + - success + - failed + - otp + - abandoned + - reversed + - blocked + - rejected + - received + example: success + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer/resend_otp: + post: + tags: + - Transfer + summary: Resend OTP for Transfer + description: Generates and send a new OTP to customer in the event they are having trouble receiving one. + operationId: transfer_resendOtp + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferResendOTP' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferResendOTP' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferResendsOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/disable_otp: + post: + tags: + - Transfer + summary: Disable OTP for Transfers + description: | + This is used in the event that you want to be able to complete transfers programmatically without use of OTPs. + No arguments required. You will get an OTP to complete the request. + operationId: transfer_disableOtp + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferDisablesOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/disable_otp_finalize: + post: + tags: + - Transfer + summary: Finalize Disabling OTP for Transfers + description: Finalize the request to disable OTP on your transfers + operationId: transfer_disableOtpFinalize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferFinalizeDisableOTP' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferFinalizeDisableOTP' + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferFinalizeDisablesOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/enable_otp: + post: + tags: + - Transfer + summary: Enable OTP requirement for Transfers + description: | + In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. + No arguments required. + operationId: transfer_enableOtp + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferEnablesOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /balance: + get: + tags: + - Balance + summary: Fetch Balance + operationId: balance_fetch + description: Fetch the available balance on your integration + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceCheckResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /balance/ledger: + get: + tags: + - Balance + summary: Balance Ledger + description: Fetch all pay-ins and pay-outs that occured on your integration + operationId: balance_ledger + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceFetchLedgerResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest: + post: + tags: + - Payment Request + summary: Create Payment Request + description: Create a new payment request by issuing an invoice to a customer + operationId: paymentRequest_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PaymentRequestCreate' + responses: + '200': + $ref: '#/components/responses/PaymentRequestCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Payment Request + summary: List Payment Request + description: List all previously created payment requests to your customers + operationId: paymentRequest_list + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: customer + schema: + type: string + description: Customer ID + - in: query + name: status + schema: + type: string + enum: + - draft + - pending + - success + - failed + example: success + description: Invoice status to filter + - in: query + name: currency + schema: + type: string + description: If your integration supports more than one currency, choose the one to filter + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/PaymentRequestListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + get: + tags: + - Payment Request + summary: Fetch Payment Request + description: Fetch a previously created payment request + operationId: paymentRequest_fetch + responses: + '200': + $ref: '#/components/responses/PaymentRequestListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Payment Request + summary: Update Payment Request + description: Update a previously created payment request + operationId: paymentRequest_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PaymentRequestUpdate' + responses: + '200': + $ref: '#/components/responses/PaymentRequestUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest/verify/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + get: + tags: + - Payment Request + summary: Verify Payment Request + description: Verify the status of a previously created payment request + operationId: paymentRequest_verify + responses: + '200': + $ref: '#/components/responses/PaymentRequestVerifySuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest/notify/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + post: + tags: + - Payment Request + summary: Send Notification + description: Trigger an email reminder to a customer for a previously created payment request + operationId: paymentRequest_notify + responses: + '200': + $ref: '#/components/responses/PaymentRequestSendNotificationSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /paymentrequest/totals: + get: + tags: + - Payment Request + summary: Payment Request Total + description: Get the metric of all pending and successful payment requests + operationId: paymentRequest_totals + responses: + '200': + $ref: '#/components/responses/PaymentRequestTotalSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest/finalize/{id}: + parameters: + - name: id + description: The unique identifier of a draft payment request + in: path + required: true + schema: + type: integer + example: 18823736 + post: + tags: + - Payment Request + summary: Finalize Payment Request + description: Finalise the creation of a draft payment request for a customer + operationId: paymentRequest_finalize + responses: + '200': + $ref: '#/components/responses/PaymentRequestFinalizeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /paymentrequest/archive/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + post: + tags: + - Payment Request + summary: Archive Payment Request + description: | + Archive a payment request to clean up your records. An archived payment request cannot be verified and will not + be returned when listing all previously created payment requests. + operationId: paymentRequest_archive + responses: + '200': + $ref: '#/components/responses/PaymentRequestArchiveSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /product: + post: + tags: + - Product + summary: Create Product + description: Create a new product on your integration + operationId: product_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProductCreate' + responses: + '201': + $ref: '#/components/responses/ProductCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Product + summary: List Products + description: List all previously created products + operationId: product_list + parameters: + - name: perPage + description: Number of records to fetch per page + in: query + schema: + type: integer + - name: page + description: The section to retrieve + in: query + schema: + type: integer + - name: active + description: The state of the product + in: query + schema: + type: boolean + example: true + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/ProductListsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /product/{id}: + parameters: + - name: id + description: The unique identifier of the product + in: path + required: true + schema: + type: integer + example: 2196244 + get: + tags: + - Product + summary: Fetch Product + description: Fetch a previously created product + operationId: product_fetch + responses: + '200': + $ref: '#/components/responses/ProductFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Product + summary: Update product + description: Update a previously created product + operationId: product_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProductUpdate' + responses: + '200': + $ref: '#/components/responses/ProductUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Product + summary: Delete Product + description: Delete a previously created product + operationId: product_delete + responses: + '200': + $ref: '#/components/responses/ProductDeleteSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront: + post: + tags: + - Storefront + summary: Create Storefront + description: Create a digital shop to manage and display your products + operationId: storefront_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/StorefrontCreate' + responses: + '200': + $ref: '#/components/responses/StorefrontCreateSuccess' + '400': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Storefront + summary: List Storefronts + description: List the storefronts you previously created + operationId: storefront_list + parameters: + - in: query + name: perPage + description: Number of records to fetch per request + schema: + type: integer + default: 50 + - in: query + name: page + description: The offset to retrieve data from + schema: + type: integer + default: 1 + - name: status + in: query + schema: + type: string + enum: + - active + - inactive + example: active + responses: + '200': + $ref: '#/components/responses/StorefrontListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/{id}: + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + get: + tags: + - Storefront + summary: Fetch Storefront + description: Get the details of a previously created Storefront + operationId: storefront_fetch + responses: + '200': + $ref: '#/components/responses/StorefrontFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Storefront + summary: Update Storefront + description: Update the details of a previously created Storefront + operationId: storefront_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/StorefrontUpdate' + responses: + '200': + $ref: '#/components/responses/StorefrontUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Storefront + summary: Delete Storefront + description: Delete a previously created Storefront + operationId: storefront_delete + responses: + '200': + $ref: '#/components/responses/StorefrontDeleteSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/verify/{slug}: + parameters: + - name: slug + description: The custom slug to check + in: path + required: true + schema: + type: string + example: struct_and_faces + get: + tags: + - Storefront + summary: Verify Storefront Slug + description: Verify the availability of a slug before using it for your Storefront + operationId: storefront_verifySlug + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/{id}/order: + get: + tags: + - Storefront + summary: Fetch Storefront Orders + description: Fetch all orders in your Storefront + operationId: storefront_fetchOrders + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /storefront/{id}/product: + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + post: + tags: + - Storefront + summary: Add Products to Storefront + description: Add previously created products to a Storefront + operationId: storefront_addProducts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontAddProducts' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/StorefrontAddProducts' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + get: + tags: + - Storefront + summary: List Storefront Products + description: List the products in a Storefront + operationId: storefront_listProducts + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/{id}/publish: + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + post: + tags: + - Storefront + summary: Publish Storefront + description: Make your Storefront publicly available + operationId: storefront_publish + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/{id}/duplicate: + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + post: + tags: + - Storefront + summary: Duplicate Storefront + description: Duplicate a previously created Storefront + operationId: storefront_duplicate + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /order: + post: + tags: + - Order + summary: Create Order + description: Create an order for selected items + operationId: order_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrderCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/OrderCreate' + responses: + '200': + $ref: '#/components/responses/OrderCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Order + summary: List Orders + description: List the previously created orders + operationId: order_list + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/OrderListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /order/{id}: + parameters: + - name: id + description: The unique identifier of the order + in: path + required: true + schema: + type: integer + example: 1559046 + get: + tags: + - Order + summary: Fetch Order + description: Fetch the details of a previously created order + operationId: order_fetch + responses: + '200': + $ref: '#/components/responses/OrderFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /order/product/{id}: + parameters: + - name: id + description: The unique identifier of the order + in: path + required: true + schema: + type: integer + example: 1559046 + get: + tags: + - Order + summary: Fetch Product Orders + description: Fetch all orders for a particular product + operationId: order_product + responses: + '200': + $ref: '#/components/responses/OrderFetchProductSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /order/{code}/validate: + parameters: + - name: code + description: The unique code of a previously created order + in: path + required: true + schema: + type: string + example: ORD_6z0lqwpmxrm7dsp + get: + tags: + - Order + summary: Validate Order + description: Validate a pay for me order + operationId: order_validate + responses: + '200': + $ref: '#/components/responses/OrderValidateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /page: + post: + tags: + - Page + summary: Create Page + description: Create a webpage to receive payments + operationId: page_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PageCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PageCreate' + responses: + '200': + $ref: '#/components/responses/PageCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Page + summary: List Pages + description: List all previously created payment pages + operationId: page_list + parameters: + - in: query + name: perPage + schema: + type: integer + default: 50 + description: Number of records to fetch per page + example: 10 + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/PageListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /page/{id}: + parameters: + - name: id + in: path + description: The unique identifier of a payment page + required: true + schema: + type: integer + example: 1891222 + get: + tags: + - Page + summary: Fetch Page + description: Get a previously created payment page + operationId: page_fetch + responses: + '200': + $ref: '#/components/responses/PageFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Page + summary: Update Page + description: Update a previously created payment page + operationId: page_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PageUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PageUpdate' + responses: + '200': + $ref: '#/components/responses/PageUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /page/check_slug_availability/{slug}: + parameters: + - name: slug + in: path + description: The custom slug to check + required: true + schema: + type: string + example: risky-burger + get: + tags: + - Page + summary: Check Slug Availability + description: Check if a custom slug is available for use when creating a payment page + operationId: page_checkSlugAvailability + responses: + '200': + $ref: '#/components/responses/PageCheckSlugAvailabilitySuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /page/{id}/product: + parameters: + - name: id + in: path + required: true + schema: + type: string + post: + tags: + - Page + summary: Add Products + description: | + Add products to a previously created payment page. You can only add products to pages + that was created with a `product` type. + operationId: page_addProducts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PageProduct' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PageProduct' + responses: + '200': + $ref: '#/components/responses/PageAddProductsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /settlement: + get: + tags: + - Settlement + summary: List Settlements + description: List settlements made to your settlement accounts + operationId: settlements_fetch + parameters: + - name: perPage + description: The number of records to fetch per request + in: query + schema: + type: integer + example: 50 + - name: page + description: The offset to retrieve data from + in: query + schema: + type: integer + example: 2 + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /settlement/{id}/transactions: + get: + tags: + - Settlement + summary: Fetch Settlement Transactions + description: Get the transactions that make up a particular settlement + operationId: settlements_transaction + parameters: + - name: id + description: The settlement ID in which you want to fetch its transactions + in: path + required: true + schema: + type: integer + example: 8610870 + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /integration/payment_session_timeout: + get: + tags: + - Integration + summary: Fetch Payment Session Timeout + description: Fetch the session timeout of a transaction + operationId: integration_fetchPaymentSessionTimeout + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ControlPanelFetchPaymentSessionTimeoutResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Integration + summary: Update Payment Session Timeout + description: Update the session timeout of a transaction + operationId: integration_updatePaymentSessionTimeout + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentSession' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ControlPanelUpdatePaymentSessionTimeoutResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /refund: + post: + tags: + - Refund + summary: Create Refund + description: Initiate a refund for a previously completed transaction + operationId: refund_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RefundCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RefundCreate' + responses: + '200': + $ref: '#/components/responses/RefundCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Refund + summary: List Refunds + description: List previously created refunds + operationId: refund_list + parameters: + - in: query + name: perPage + schema: + type: integer + default: 50 + description: Number of records to fetch per page + example: 10 + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/RefundListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /refund/retry_with_customer_details/{id}: + post: + tags: + - Refund + summary: Retry Refund + description: Retry a refund with a `needs-attention` status by providing the bank account details of a customer. + operationId: refund_retry + parameters: + - name: id + in: path + required: true + description: The identifier of the refund + schema: + type: integer + example: 15581137 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RefundRetry' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RefundRetry' + responses: + '200': + $ref: '#/components/responses/RefundRetrySuccess' + '422': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /refund/{id}: + get: + tags: + - Refund + summary: Fetch Refund + description: Get a previously created refund + operationId: refund_fetch + parameters: + - name: id + in: path + required: true + description: The identifier of the refund + schema: + type: integer + example: 15581137 + responses: + '200': + $ref: '#/components/responses/RefundFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute: + get: + tags: + - Dispute + summary: List Disputes + description: List transaction disputes filed by customers + operationId: dispute_list + parameters: + - in: query + name: perPage + description: Number of records to fetch per page + schema: + type: integer + - in: query + name: page + description: The section to retrieve + schema: + type: integer + - in: query + name: status + description: Dispute status + schema: + type: string + enum: + - awaiting-merchant-feedback + - awaiting-bank-feedback + - pending + - resolved + example: awaiting-merchant-feedback + - in: query + name: transaction + description: Transaction ID + schema: + type: string + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/DisputeListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/{id}: + parameters: + - name: id + description: The unique identifier of the dispute + in: path + required: true + schema: + type: integer + example: 1801929 + get: + tags: + - Dispute + summary: Fetch Dispute + description: Fetch a transaction dispute + operationId: dispute_fetch + responses: + '200': + $ref: '#/components/responses/DisputeFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Dispute + summary: Update Dispute + description: Update a transaction dispute + operationId: dispute_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DisputeUpdate' + responses: + '200': + $ref: '#/components/responses/DisputeUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/{id}/upload_url: + get: + tags: + - Dispute + summary: Fetch Upload URL + description: Get the URL to upload a dispute evidence + operationId: dispute_uploadUrl + parameters: + - name: id + description: The unique identifier of the dispute + in: path + required: true + schema: + type: integer + example: 4734583785 + responses: + '200': + $ref: '#/components/responses/DisputeUploadURLSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/export: + get: + tags: + - Dispute + summary: Export Disputes + description: Export the disputes available on your integration + operationId: dispute_download + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: status + schema: + type: string + enum: + - awaiting-merchant-feedback + - awaiting-bank-feedback + - pending + - resolved + example: awaiting-merchant-feedback + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/DisputeExportSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/transaction/{id}: + get: + tags: + - Dispute + summary: List Transaction Disputes + description: List all disputes filed for a transaction + operationId: dispute_transaction + parameters: + - name: id + description: The unique identifier of the transaction + in: path + required: true + schema: + type: integer + example: 4734583785 + responses: + '200': + $ref: '#/components/responses/DisputeListTransactionSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/{id}/resolve: + put: + tags: + - Dispute + summary: Resolve Dispute + description: Resolve a transaction dispute + operationId: dispute_resolve + parameters: + - name: id + description: The unique identifier of the dispute + in: path + required: true + schema: + type: integer + example: 4734583785 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeResolve' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DisputeResolve' + responses: + '200': + $ref: '#/components/responses/DisputeResolveSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/{id}/evidence: + post: + tags: + - Dispute + summary: Add Evidence + description: Provide evidence for a dispute + operationId: dispute_evidence + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeEvidence' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DisputeEvidence' + parameters: + - name: id + description: The unique identifier of the dispute + in: path + required: true + schema: + type: integer + example: 4734583785 + responses: + '200': + $ref: '#/components/responses/DisputeAddEvidenceSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /bank: + get: + tags: + - Bank + summary: List Banks + description: List banks supported on Paystack + operationId: bank_list + parameters: + - in: query + name: country + description: The country from which to obtain the list of supported banks + schema: + type: string + enum: + - ghana + - kenya + - nigeria + - south africa + example: nigeria + - in: query + name: currency + description: The country from which to obtain the list of supported banks + schema: + type: string + enum: + - GHS + - KES + - NGN + - ZAR + example: NGN + - in: query + name: use_cursor + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + - in: query + name: perPage + description: The number of records to fetch per request + schema: + type: integer + - name: page + in: query + description: The offset to retrieve data from + schema: + type: integer + - in: query + name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to + retrieve the next set of data + schema: + type: string + - in: query + name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to + retrieve the previous set of data + schema: + type: string + - in: query + name: pay_with_bank_transfer + description: A flag to filter for available banks a customer can make a transfer to complete a payment + schema: + type: boolean + - in: query + name: pay_with_bank + description: A flag to filter for banks a customer can pay directly from + schema: + type: boolean + - in: query + name: enabled_for_verification + description: | + A flag to filter the banks that are supported for account verification in South Africa. + You need to combine this with either the `currency` or `country` filter. + schema: + type: boolean + - in: query + name: gateway + description: The type of gateway for a Nigerian bank + schema: + type: string + enum: + - emandate + - digitalbankmandate + - in: query + name: type + description: Type of financial channel + schema: + type: string + enum: + - ghipps + - mobile_money + - nuban + - kepss + - basa + - in: query + name: include_nip_sort_code + description: | + A flag that returns Nigerian banks with their NIP institution code. + The returned value can be used in identifying institutions on NIP. + schema: + type: boolean + responses: + '200': + $ref: '#/components/responses/MiscellaneousListBanksSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bank/resolve: + get: + tags: + - Bank + summary: Resolve Account Number + description: Resolve an account number to confirm the name associated with it + operationId: bank_resolveAccountNumber + parameters: + - name: account_number + description: The account number of interest + in: query + schema: + type: integer + example: 22728151 + - name: bank_code + description: The bank code associated with the account number + in: query + schema: + type: integer + example: 63 + responses: + '200': + $ref: '#/components/responses/VerificationResolveAccountNumberSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bank/validate: + post: + tags: + - Bank + summary: Validate Bank Account + description: Confirm the authenticity of a customer's account number before sending money + operationId: bank_validateAccountNumber + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BankValidateRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/BankValidateRequest' + responses: + '200': + $ref: '#/components/responses/VerificationValidateAccountSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /decision/bin/{bin}: + get: + tags: + - Miscellaneous + summary: Resolve Card BIN + description: Get the details of a card BIN + operationId: miscellaneous_resolveCardBin + parameters: + - name: bin + description: The card bank identification number + in: path + required: true + schema: + type: integer + example: 539983 + responses: + '200': + $ref: '#/components/responses/VerificationResolveCardBINSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /country: + get: + tags: + - Miscellaneous + summary: List Countries + description: List all supported countries on Paystack + operationId: miscellaneous_listCountries + responses: + '200': + $ref: '#/components/responses/MiscellaneousListCountriesSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /address_verification/states: + get: + tags: + - Miscellaneous + summary: List States (AVS) + operationId: miscellaneous_avs + description: Get a list of states for a country for address verification + parameters: + - in: query + name: country + description: The country code of the states to list. It is gotten after the charge request + schema: + type: string + example: CA + responses: + '200': + $ref: '#/components/responses/MiscellaneousListStatesSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + description: Secret key in the format sk_domain_xxxxxx + schemas: + Currency: + description: List of all support currencies + type: string + enum: + - GHS + - KES + - NGN + - ZAR + - USD + example: GHS + SplitSubaccounts: + type: object + properties: + subaccount: + description: Subaccount code of the customer or partner + type: string + share: + description: The percentage or flat quota of the customer or partner + type: integer + example: + subaccount: ACCT_6uujpqtzmnufzkw + share: 50 + SplitCreate: + type: object + description: | + Split configuration for transactions + required: + - name + - type + - subaccounts + - currency + properties: + name: + description: Name of the transaction split + type: string + type: + description: The type of transaction split you want to create. + type: string + enum: + - percentage + - flat + subaccounts: + description: A list of object containing subaccount code and number of shares + type: array + items: + $ref: '#/components/schemas/SplitSubaccounts' + currency: + description: The transaction currency + type: string + enum: + - NGN + - GHS + - ZAR + - USD + bearer_type: + description: This allows you specify how the transaction charge should be processed + type: string + enum: + - subaccount + - account + - all-proportional + - all + bearer_subaccount: + description: This is the subaccount code of the customer or partner that would bear the transaction charge if you specified subaccount as the bearer type + type: string + example: + name: Halfsies + type: percentage + currency: NGN + subaccounts: + - subaccount: ACCT_6uujpqtzmnufzkw + share: 50 + TransactionInitialize: + description: Initialize a transaction + type: object + required: + - email + - amount + properties: + email: + description: Customer's email address + type: string + amount: + description: | + Amount should be in smallest denomination of the currency. + type: integer + currency: + $ref: '#/components/schemas/Currency' + reference: + description: Unique transaction reference. Only -, ., = and alphanumeric characters allowed. + type: string + channels: + description: An array of payment channels to control what channels you want to make available to the user to make a payment with + type: array + items: + type: string + enum: + - apple_pay + - bank + - bank_transfer + - capitec_pay + - card + - eft + - mobile_money + - payattitude + - qr + - ussd + callback_url: + description: | + Fully qualified url, e.g. https://example.com/ to redirect your customers to after a successful payment. Use this to override the callback url provided on the dashboard for this transaction + type: string + plan: + description: | + If transaction is to create a subscription to a predefined plan, provide plan code here. + This would invalidate the value provided in amount + type: string + invoice_limit: + description: Number of times to charge customer during subscription to plan + type: integer + split_code: + description: The split code of the transaction split + type: string + split: + $ref: '#/components/schemas/SplitCreate' + subaccount: + description: The code for the subaccount that owns the payment + type: string + transaction_charge: + description: | + A flat fee to charge the subaccount for a transaction. + This overrides the split percentage set when the subaccount was created + type: string + bearer: + description: The bearer of the transaction charge + type: string + enum: + - account + - subaccount + label: + description: Used to replace the email address shown on the Checkout + type: string + metadata: + description: JSON object of custom data + type: object + example: + email: test@demo.com + amount: 10000 + TransactionInitializeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + authorization_url: + type: string + access_code: + type: string + reference: + type: string + required: + - authorization_url + - access_code + - reference + required: + - status + - message + - data + ErrorMeta: + type: object + description: Extra details to help with a resolution of the error + properties: + nextStep: + type: string + description: A summarised solution for the error + TransactionInitializeBadRequestModel: + type: object + description: | + Error response returned when a transaction is initialized with incorrect parameters + properties: + status: + type: boolean + description: An indicator for the state of the request + message: + type: string + description: A short description of the error + meta: + $ref: '#/components/schemas/ErrorMeta' + type: + type: string + description: A tag to indicate the type of the error + enum: + - validation_error + - processor_error + - api_error + code: + type: string + description: The error code + errorCodeMappingNotFound: + type: boolean + description: An indicator for error mapping for the request + example: + status: false + message: Duplicate Transaction Reference + meta: + nextStep: Try and create the Transaction or Charge with a new reference + type: validation_error + code: duplicate_reference + errorCodeMappingNotFound: false + Error: + type: object + properties: + status: + type: boolean + description: An indicator for the state of the request + message: + type: string + description: A short description of the error + meta: + $ref: '#/components/schemas/ErrorMeta' + type: + type: string + description: A tag to indicate the type of the error + code: + type: string + description: The error code + enum: + - validation_error + - processor_error + - api_error + errorCodeMappingNotFound: + type: boolean + description: An indicator for error mapping for the request + TransactionChargeAuthorization: + type: object + required: + - email + - amount + - authorization_code + properties: + email: + description: Customer's email address + type: string + amount: + description: Amount in the lower denomination of your currency + type: integer + authorization_code: + description: Valid authorization code to charge + type: string + reference: + description: Unique transaction reference. Only -, ., = and alphanumeric characters allowed. + type: string + currency: + $ref: '#/components/schemas/Currency' + split_code: + description: The split code of the transaction split + type: string + split: + $ref: '#/components/schemas/SplitCreate' + subaccount: + description: The code for the subaccount that owns the payment + type: string + transaction_charge: + description: |- + A flat fee to charge the subaccount for a transaction. + This overrides the split percentage set when the subaccount was created + type: string + bearer: + description: The bearer of the transaction charge + type: string + enum: + - account + - subaccount + metadata: + description: Stringified JSON object of custom data + type: string + queue: + description: If you are making a scheduled charge call, it is a good idea to queue them so the processing system does not get overloaded causing transaction processing errors. + type: boolean + example: + email: jb@email.com + amount: 30000 + authorization_code: AUTH_df1l5ehnym + ChargeAuthorizationResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + amount: + type: integer + currency: + type: string + transaction_date: + type: string + status: + type: string + reference: + type: string + domain: + type: string + metadata: + type: string + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + ip_address: + nullable: true + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + nullable: true + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: object + properties: + calling_code: + type: string + nullable: true + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + nullable: true + id: + type: integer + required: + - amount + - currency + - transaction_date + - status + - reference + - domain + - metadata + - gateway_response + - message + - channel + - ip_address + - log + - fees + - authorization + - customer + - plan + - id + required: + - status + - message + - data + TransactionPartialDebit: + type: object + required: + - email + - amount + - authorization_code + - currency + properties: + email: + description: Customer's email address + type: string + amount: + description: Specified in the lowest denomination of your currency + type: integer + format: int64 + authorization_code: + description: Valid authorization code to charge + type: string + currency: + $ref: '#/components/schemas/Currency' + at_least: + description: Minimum amount to charge + type: string + reference: + description: Unique transaction reference. Only -, ., = and alphanumeric characters allowed. + type: string + example: + email: tap@email.com + amount: 40510 + authorization_code: AUTH_df1l5ehnym + currency: ZAR + TransactionPartialDebitResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + amount: + type: integer + currency: + type: string + transaction_date: + type: string + status: + type: string + reference: + type: string + domain: + type: string + metadata: + type: string + gateway_response: + type: string + message: + nullable: true + channel: + type: string + ip_address: + nullable: true + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: object + nullable: true + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + type: integer + requested_amount: + type: integer + id: + type: integer + required: + - amount + - currency + - transaction_date + - status + - reference + - domain + - gateway_response + - message + - channel + - ip_address + - log + - fees + - authorization + - customer + - metadata + - plan + - requested_amount + - id + required: + - status + - message + - data + VerifyResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + type: string + nullable: true + amount: + type: integer + message: + type: string + nullable: true + gateway_response: + type: string + paid_at: + type: string + nullable: true + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + anyOf: + - type: string + - type: object + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + additionalProperties: false + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + nullable: true + fees_split: + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + bin: + nullable: true + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + nullable: true + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + type: string + nullable: true + split: + type: object + order_id: + nullable: true + paidAt: + type: string + nullable: true + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + transaction_date: + type: string + plan_object: + type: object + properties: + id: + type: integer + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + send_invoices: + type: boolean + send_sms: + type: boolean + currency: + type: string + oneOf: + - allOf: + - minProperties: 0 + - {} + - allOf: + - not: + minProperties: 0 + - required: + - id + - name + - plan_code + - description + - amount + - interval + - send_invoices + - send_sms + - currency + additionalProperties: false + subaccount: + type: object + required: + - id + - domain + - status + - reference + - receipt_number + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + - transaction_date + - plan_object + - subaccount + required: + - status + - message + - data + TransactionListResponseArray: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + nullable: true + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + nullable: true + metadata: + type: object + nullable: true + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + nullable: true + fees_split: + type: integer + nullable: true + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + phone: + type: string + nullable: true + metadata: + type: object + nullable: true + customer_code: + type: string + risk_action: + type: string + required: + - id + - first_name + - last_name + - email + - phone + - metadata + - customer_code + - risk_action + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + nullable: true + last4: + type: string + nullable: true + exp_month: + type: string + nullable: true + exp_year: + type: string + nullable: true + channel: + type: string + nullable: true + card_type: + type: string + nullable: true + bank: + type: string + nullable: true + country_code: + type: string + nullable: true + brand: + type: string + nullable: true + reusable: + type: boolean + signature: + type: string + nullable: true + account_name: + type: string + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + plan: + type: object + split: + type: object + subaccount: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + source: + type: object + properties: + source: + type: string + type: + type: string + identifier: + nullable: true + entry_point: + type: string + required: + - source + - type + - identifier + - entry_point + nullable: true + connect: + type: object + nullable: true + pos_transaction_data: + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - customer + - authorization + - plan + - split + - subaccount + - order_id + - paidAt + - createdAt + - requested_amount + - source + - connect + - pos_transaction_data + TransactionListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TransactionListResponseArray' + meta: + type: object + properties: + total: + type: integer + total_volume: + type: number + skipped: + type: integer + perPage: + anyOf: + - type: string + - type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - total_volume + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + MetadataCustomFieldsArray: + type: object + properties: + value: + type: string + display_name: + type: string + variable_name: + type: string + required: + - value + - display_name + - variable_name + TransactionFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + nullable: true + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + helpdesk_link: + nullable: true + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + type: object + properties: + type: + type: string + source: + type: string + identifier: + nullable: true + required: + - type + - source + - identifier + fees_breakdown: + nullable: true + connect: + nullable: true + required: + - id + - domain + - status + - reference + - receipt_number + - amount + - message + - gateway_response + - helpdesk_link + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + required: + - status + - message + - data + TransactionTimelineResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + required: + - status + - message + - data + TransactionTotalVolumeByCurrencyArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + TransactionPendingTransfersByCurrencyArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + TransactionTotalsResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + total_transactions: + type: integer + total_volume: + type: integer + total_volume_by_currency: + type: array + items: + $ref: '#/components/schemas/TransactionTotalVolumeByCurrencyArray' + pending_transfers: + type: integer + pending_transfers_by_currency: + type: array + items: + $ref: '#/components/schemas/TransactionPendingTransfersByCurrencyArray' + required: + - total_transactions + - total_volume + - total_volume_by_currency + - pending_transfers + - pending_transfers_by_currency + required: + - status + - message + - data + TransactionExportResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + path: + type: string + expiresAt: + type: string + required: + - path + - expiresAt + required: + - status + - message + - data + ChargeCreate: + type: object + required: + - email + - amount + properties: + email: + description: Customer's email address + type: string + amount: + description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR + type: integer + authorization_code: + description: An authorization code to charge. + type: string + pin: + description: 4-digit PIN (send with a non-reusable authorization code) + type: string + reference: + description: Unique transaction reference. Only -, .`, = and alphanumeric characters allowed. + type: string + birthday: + description: The customer's birthday in the format YYYY-MM-DD e.g 2017-05-16 + type: string + format: date + device_id: + description: |- + This is the unique identifier of the device a user uses in making payment. + Only -, .`, = and alphanumeric characters are allowed. + type: string + metadata: + description: JSON object of custom data + type: object + example: + email: customer@email.com + amount: 350000 + authorization_code: AUTH_df1l5ehnym + Bank: + type: object + description: The bank object if charging a bank account + properties: + code: + description: Customer's bank code + type: string + account_number: + description: Customer's account number + type: string + MobileMoney: + type: object + description: Details of the mobile service provider + properties: + phone: + description: Customer's phone number + type: string + provider: + description: The telco provider of customer's phone number. This can be fetched from the List Bank endpoint + type: string + USSD: + type: object + description: The USSD code for the provider to charge + properties: + type: + description: The three-digit USSD code. + type: string + enum: + - '737' + - '919' + - '822' + - '966' + EFT: + type: object + description: Details of the EFT provider + properties: + provider: + description: The EFT provider + type: string + ChargeCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + nullable: true + amount: + type: integer + message: + type: string + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + nullable: true + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + transaction_date: + type: string + plan_object: + type: object + subaccount: + type: object + required: + - id + - domain + - status + - reference + - receipt_number + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + - transaction_date + - plan_object + - subaccount + required: + - status + - message + - data + ChargeSubmitPin: + type: object + required: + - pin + - reference + properties: + pin: + description: Customer's PIN for the ongoing transaction + type: string + reference: + description: Transaction reference that requires the PIN + type: string + example: + pin: '1234' + reference: 5bwib5v6anhe9xa + ChargeSubmitPinResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + amount: + type: integer + currency: + type: string + transaction_date: + type: string + reference: + type: string + domain: + type: string + redirect_url: + type: string + nullable: true + metadata: + type: object + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + customer: + type: object + properties: + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + risk_action: + type: string + required: + - first_name + - last_name + - email + - customer_code + - phone + - risk_action + required: + - status + - amount + - currency + - transaction_date + - reference + - domain + - redirect_url + - metadata + - gateway_response + - message + - channel + - fees + - authorization + - customer + required: + - status + - message + - data + ChargeSubmitOTP: + type: object + required: + - otp + - reference + properties: + otp: + description: Customer's OTP for ongoing transaction + type: string + reference: + description: The reference of the ongoing transaction + type: string + example: + otp: '123456' + reference: 5bwib5v6anhe9xa + ChargeSubmitOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + amount: + type: integer + currency: + type: string + transaction_date: + type: string + reference: + type: string + domain: + type: string + redirect_url: + type: string + nullable: true + metadata: + type: object + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + customer: + type: object + properties: + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + risk_action: + type: string + required: + - first_name + - last_name + - email + - customer_code + - phone + - risk_action + required: + - status + - amount + - currency + - transaction_date + - reference + - domain + - redirect_url + - metadata + - gateway_response + - message + - channel + - fees + - authorization + - customer + required: + - status + - message + - data + ChargeSubmitPhone: + type: object + required: + - phone + - reference + properties: + phone: + description: Customer's mobile number + type: string + reference: + description: The reference of the ongoing transaction + type: string + example: + phone: '08012345678' + reference: 5bwib5v6anhe9xa + ChargeSubmitPhoneResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + amount: + type: integer + currency: + type: string + transaction_date: + type: string + reference: + type: string + domain: + type: string + redirect_url: + type: string + nullable: true + metadata: + type: object + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + customer: + type: object + properties: + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + risk_action: + type: string + required: + - first_name + - last_name + - email + - customer_code + - phone + - risk_action + display_text: + type: string + required: + - status + - amount + - currency + - transaction_date + - reference + - domain + - redirect_url + - metadata + - gateway_response + - message + - channel + - fees + - authorization + - customer + - display_text + required: + - status + - message + - data + ChargeSubmitBirthday: + type: object + required: + - birthday + - reference + properties: + birthday: + description: Customer's birthday in the format YYYY-MM-DD e.g 2016-09-21 + type: string + format: date + reference: + description: The reference of the ongoing transaction + type: string + example: + birthday: '1961-09-21' + reference: 5bwib5v6anhe9xa + ChargeSubmitBirthdayResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + display_text: + type: string + required: + - status + - display_text + required: + - status + - message + - data + ChargeSubmitAddress: + type: object + required: + - address + - reference + - city + - state + - zip_code + properties: + address: + description: Customer's address + type: string + city: + description: Customer's city + type: string + state: + description: Customer's state + type: string + zip_code: + description: Customer's zipcode + type: string + reference: + description: The reference of the ongoing transaction + type: string + example: + address: 140 N 2ND ST + city: Stroudsburg + state: PA + zip_code: '18360' + reference: 5bwib5v6anhe9xa + Response: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + ChargeCheckPendingResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + amount: + type: integer + currency: + type: string + transaction_date: + type: string + reference: + type: string + domain: + type: string + redirect_url: + type: string + nullable: true + metadata: + type: object + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + customer: + type: object + properties: + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + risk_action: + type: string + required: + - first_name + - last_name + - email + - customer_code + - phone + - risk_action + required: + - status + - amount + - currency + - transaction_date + - reference + - domain + - redirect_url + - metadata + - gateway_response + - message + - channel + - fees + - authorization + - customer + required: + - status + - message + - data + BulkChargeListResponseArray: + type: object + properties: + integration: + type: integer + domain: + type: string + batch_code: + type: string + status: + type: string + easy_cron_id: + nullable: true + reference: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - domain + - batch_code + - status + - easy_cron_id + - reference + - id + - createdAt + - updatedAt + BulkChargeListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/BulkChargeListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + anyOf: + - type: integer + - type: string + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + BulkChargeInitiate: + type: object + description: A list of charge object + required: + - authorization + - amount + properties: + authorization: + description: Customer's card authorization code + type: string + amount: + description: Amount to charge on the authorization + type: integer + reference: + description: | + A unique identifier containing lowercase letters `(a-z)`, digits `(0-9)` and these symbols: dash (`-`), underscore(`_`) + type: string + attempt_partial_debit: + description: A flag to indicate if you want us to try recouping lower amounts when the customer has insufficient fund + type: boolean + at_least: + description: Minimum amount to charge if the attempt_partial_debit flag is set + type: integer + metadata: + description: JSON object of custom data + type: object + example: + authorization: AUTH_ncx8hews93 + amount: 250000 + reference: dam1266638dhhd + BulkChargeInitiateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + batch_code: + type: string + reference: + type: string + id: + type: integer + integration: + type: integer + domain: + type: string + status: + type: string + total_charges: + type: integer + pending_charges: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - batch_code + - reference + - id + - integration + - domain + - status + - total_charges + - pending_charges + - createdAt + - updatedAt + required: + - status + - message + - data + BulkChargeFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + batch_code: + type: string + reference: + type: string + id: + type: integer + integration: + type: integer + domain: + type: string + status: + type: string + total_charges: + type: integer + pending_charges: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - batch_code + - reference + - id + - integration + - domain + - status + - total_charges + - pending_charges + - createdAt + - updatedAt + required: + - status + - message + - data + BulkChargeFetchBulkBatchChargesResponseArray: + type: object + properties: + integration: + type: integer + bulkcharge: + type: integer + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + domain: + type: string + amount: + type: integer + at_least: + type: integer + currency: + type: string + reference: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + status: + type: string + message: + type: string + attempt_partial_debit: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - bulkcharge + - customer + - authorization + - domain + - amount + - at_least + - currency + - reference + - metadata + - status + - message + - attempt_partial_debit + - id + - createdAt + - updatedAt + BulkChargeFetchBulkBatchChargesResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/BulkChargeFetchBulkBatchChargesResponseArray' + meta: + type: object + properties: + perPage: + type: string + total: + type: integer + skipped: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - perPage + - total + - skipped + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + BulkChargePauseResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + BulkChargeResumeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + SubaccountListResponseArray: + type: object + properties: + id: + type: integer + subaccount_code: + type: string + business_name: + type: string + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + percentage_charge: + type: number + settlement_bank: + type: string + bank_id: + type: integer + account_number: + type: string + currency: + type: string + active: + type: integer + is_verified: + type: boolean + required: + - id + - subaccount_code + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - percentage_charge + - settlement_bank + - bank_id + - account_number + - currency + - active + - is_verified + SubaccountListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/SubaccountListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + SubaccountCreate: + type: object + required: + - business_name + - settlement_bank + - account_number + - percentage_charge + properties: + business_name: + description: Name of business for subaccount + type: string + settlement_bank: + description: Bank code for the bank. You can get the list of Bank Codes by calling the List Banks endpoint. + type: string + account_number: + description: Bank account number + type: string + percentage_charge: + description: Customer's phone number + type: number + format: float + description: + description: A description for this subaccount + type: string + primary_contact_email: + description: A contact email for the subaccount + type: string + primary_contact_name: + description: The name of the contact person for this subaccount + type: string + primary_contact_phone: + description: A phone number to call for this subaccount + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + business_name: Oasis + account_number: '0123456047' + settlement_bank: '058' + percentage_charge: 30 + SubaccountCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + business_name: + type: string + account_name: + type: string + nullable: true + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + account_number: + type: string + percentage_charge: + type: number + settlement_bank: + type: string + currency: + type: string + bank: + type: integer + integration: + type: integer + domain: + type: string + product: + type: string + managed_by_integration: + type: integer + subaccount_code: + type: string + is_verified: + type: boolean + settlement_schedule: + type: string + active: + type: boolean + migrate: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - account_number + - percentage_charge + - settlement_bank + - currency + - bank + - integration + - domain + - managed_by_integration + - product + - subaccount_code + - is_verified + - settlement_schedule + - active + - migrate + - id + - createdAt + - updatedAt + required: + - status + - message + - data + SubaccountFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + account_name: + type: string + nullable: true + bank: + type: integer + managed_by_integration: + type: integer + domain: + type: string + subaccount_code: + type: string + business_name: + type: string + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + percentage_charge: + type: number + is_verified: + type: boolean + settlement_bank: + type: string + account_number: + type: string + settlement_schedule: + type: string + active: + type: boolean + migrate: + type: boolean + currency: + type: string + product: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - bank + - managed_by_integration + - domain + - subaccount_code + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - percentage_charge + - is_verified + - settlement_bank + - account_number + - settlement_schedule + - active + - migrate + - currency + - product + - id + - createdAt + - updatedAt + required: + - status + - message + - data + SubaccountUpdate: + type: object + properties: + business_name: + description: Name of business for subaccount + type: string + settlement_bank: + description: Bank code for the bank. You can get the list of Bank Codes by calling the List Banks endpoint. + type: string + account_number: + description: Bank account number + type: string + active: + description: Activate or deactivate a subaccount + type: boolean + percentage_charge: + description: Customer's phone number + type: number + format: float + description: + description: A description for this subaccount + type: string + primary_contact_email: + description: A contact email for the subaccount + type: string + primary_contact_name: + description: The name of the contact person for this subaccount + type: string + primary_contact_phone: + description: A phone number to call for this subaccount + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + business_name: Sandalwood + SubaccountUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + domain: + type: string + subaccount_code: + type: string + account_name: + type: string + nullable: true + business_name: + type: string + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + percentage_charge: + type: number + is_verified: + type: boolean + settlement_bank: + type: string + account_number: + type: string + settlement_schedule: + type: string + active: + type: boolean + migrate: + type: boolean + currency: + type: string + product: + type: string + id: + type: integer + integration: + type: integer + bank: + type: integer + managed_by_integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - domain + - subaccount_code + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - percentage_charge + - is_verified + - settlement_bank + - account_number + - settlement_schedule + - active + - migrate + - currency + - product + - id + - integration + - bank + - managed_by_integration + - createdAt + - updatedAt + required: + - status + - message + - data + SplitSubaccountsArray: + type: object + properties: + subaccount: + type: object + properties: + id: + type: integer + subaccount_code: + type: string + business_name: + type: string + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + settlement_bank: + type: string + currency: + type: string + account_number: + type: string + required: + - id + - subaccount_code + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - settlement_bank + - currency + - account_number + share: + type: integer + required: + - subaccount + - share + SplitListResponseArray: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + nullable: true + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + SplitListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/SplitListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + SplitCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + SplitFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + SplitUpdate: + type: object + properties: + name: + description: Name of the transaction split + type: string + active: + description: Toggle status of split. When true, the split is active, else it's inactive + type: boolean + bearer_type: + description: This allows you specify how the transaction charge should be processed + type: string + enum: + - subaccount + - account + - all-proportional + - all + bearer_subaccount: + description: This is the subaccount code of the customer or partner that would bear the transaction charge if you specified subaccount as the bearer type + type: string + SplitUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + SplitAddUpdateSubaccountResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + SplitRemoveSubaccountResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TerminalSendEventData: + type: object + description: The parameters needed to perform the specified action + properties: + id: + description: The invoice or transaction ID you want to push to the Terminal + type: integer + format: int64 + reference: + description: The offline_reference from the Payment Request response + type: string + example: + id: 7895939 + reference: '4634337895939' + TerminalSendEvent: + type: object + properties: + type: + description: The type of event to push + type: string + enum: + - invoice + - transaction + action: + description: | + The action the Terminal needs to perform. For the invoice type, the action can either be process or view. + For the transaction type, the action can either be process or print. + type: string + enum: + - process + - view + - print + data: + $ref: '#/components/schemas/TerminalSendEventData' + example: + type: invoice + action: process + data: + id: 7895939 + reference: '4634337895939' + TerminalGetStatusResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + online: + type: boolean + available: + type: boolean + required: + - online + - available + required: + - status + - message + - data + TerminalListsResponseArray: + type: object + properties: + id: + type: integer + serial_number: + type: string + nullable: true + device_make: + type: string + nullable: true + terminal_id: + type: string + integration: + type: integer + domain: + type: string + name: + type: string + nullable: true + address: + type: string + nullable: true + status: + type: string + required: + - id + - serial_number + - device_make + - terminal_id + - integration + - domain + - name + - address + - status + TerminalListsResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TerminalListsResponseArray' + meta: + type: object + properties: + next: + type: string + nullable: true + previous: + type: string + nullable: true + perPage: + type: integer + required: + - next + - previous + - perPage + additionalProperties: false + required: + - status + - message + - data + - meta + TerminalGetResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + serial_number: + type: string + device_make: + type: string + nullable: true + terminal_id: + type: string + integration: + type: integer + domain: + type: string + name: + type: string + nullable: true + address: + type: string + nullable: true + status: + type: string + split_code: + type: string + nullable: true + required: + - id + - serial_number + - device_make + - terminal_id + - integration + - domain + - name + - address + - status + - split_code + required: + - status + - message + - data + TerminalUpate: + type: object + properties: + name: + description: The new name for the Terminal + type: string + address: + description: The new address for the Terminal + type: string + example: + name: Oreos + address: Somewhere on earth + TerminalUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TerminalActivationToggle: + type: object + description: Model for activating and deactivating a debug Terminal + required: + - serial_number + properties: + serial_number: + description: Device Serial Number + type: string + example: + serial_number: '1111150412230003899' + TerminalCommissionDeviceResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TerminalDecommissionDeviceResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + VirtualTerminalListResponseArray: + type: object + properties: + id: + type: integer + code: + type: string + name: + type: string + integration: + type: integer + domain: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + created_at: + type: string + currency: + type: string + required: + - id + - code + - name + - integration + - domain + - paymentMethods + - active + - created_at + - currency + VirtualTerminalListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/VirtualTerminalListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + anyOf: + - type: string + - type: integer + page: + type: integer + pageCount: + type: integer + VirtualTerminalCreate: + type: object + required: + - name + - destinations + properties: + name: + type: string + description: The name of the virtual terminal + destinations: + type: array + description: Array of objects containing recipients for payment notifications for the Virtual Terminal. + items: + type: object + properties: + target: + type: string + description: The WhatsApp number to receive payment notifications + name: + type: string + description: The name of the associated WhatsApp number + split_code: + type: string + description: Split code to associate with the virtual terminal + metadata: + type: object + description: Additional custom data as key-value pairs + example: + name: Sample Terminal + destinations: + - target: '+2548012345678' + name: John Doe + - target: '+2548098765432' + name: Jane Smith + VirtualTerminalCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + integration: + type: integer + domain: + type: string + code: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + metadata: + nullable: true + destinations: + type: array + items: + type: object + properties: + target: + type: string + type: + type: string + name: + type: string + currency: + type: string + required: + - id + - name + - integration + - domain + - code + - paymentMethods + - active + - metadata + - destinations + - currency + required: + - status + - message + - data + VirtualTerminalFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + code: + type: string + name: + type: string + integration: + type: integer + domain: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + created_at: + type: string + connect_account_id: + nullable: true + destinations: + type: array + items: + type: object + properties: + target: + type: string + type: + type: string + name: + type: string + created_at: + type: string + currency: + type: string + required: + - id + - code + - name + - integration + - domain + - paymentMethods + - active + - created_at + - connect_account_id + - destinations + - currency + required: + - status + - message + - data + VirtualTerminalUpdate: + type: object + required: + - name + properties: + name: + description: Name of the virtual terminal + type: string + example: + name: Lagos_Mainland_Zone_1 + VirtualTerminalUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + code: + type: string + name: + type: string + integration: + type: integer + domain: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + created_at: + type: string + connect_account_id: + nullable: true + destinations: + type: array + items: + type: object + properties: + target: + type: string + type: + type: string + name: + type: string + created_at: + type: string + currency: + type: string + required: + - id + - code + - name + - integration + - domain + - paymentMethods + - active + - created_at + - connect_account_id + - destinations + - currency + required: + - status + - message + - data + VirtualTerminalDeactivateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + VirtualTerminalDestinationAssign: + type: object + required: + - destinations + properties: + destinations: + type: array + description: Array of objects containing recipients for payment notifications for the Virtual Terminal. + items: + type: object + properties: + target: + type: string + description: The WhatsApp number to receive payment notifications + name: + type: string + description: The name of the associated WhatsApp number + required: + - target + - name + example: + destinations: + - target: '+2548012345678' + name: John Doe + - target: '+2548098765432' + name: Jane Smith + VirtualTerminalDestinationAssignResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + type: object + properties: + integration: + type: integer + target: + type: string + name: + type: string + type: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - target + - name + - type + - id + - createdAt + - updatedAt + required: + - status + - message + - data + VirtualTerminalDestinationUnassign: + type: object + properties: + targets: + type: array + description: Array of destination targets to unassign + items: + type: string + required: + - targets + example: + targets: + - '+2548012345678' + - '+2548098765432' + VirtualTerminalDestinationUnassignResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + VirtualTerminalAddSplitCode: + type: object + required: + - split_code + properties: + split_code: + description: The split code to assign to the virtual terminal + type: string + example: + split_code: SPL_1234567890abcdef + VirtualTerminalAddSplitCodeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + nullable: true + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + VirtualTerminalDeleteSplitCode: + type: object + required: + - split_code + properties: + split_code: + description: The split code to assign to the virtual terminal + type: string + example: + split_code: SPL_1234567890abcdef + VirtualTerminalDeleteSplitCodeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + CustomerListResponseArray: + type: object + properties: + integration: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + phone: + type: string + nullable: true + metadata: + type: object + nullable: true + domain: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - first_name + - last_name + - email + - phone + - metadata + - domain + - customer_code + - risk_action + - id + - createdAt + - updatedAt + CustomerListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/CustomerListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + anyOf: + - type: string + - type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + CustomerCreate: + type: object + required: + - email + properties: + email: + description: Customer's email address + type: string + first_name: + description: Customer's first name + type: string + last_name: + description: Customer's last name + type: string + phone: + description: Customer's phone number + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + email: rock@sandy.com + first_name: Rock + last_name: Sandy + CustomerCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transactions: + type: array + items: {} + subscriptions: + type: array + items: {} + authorizations: + type: array + items: {} + email: + type: string + first_name: + type: string + last_name: + type: string + phone: + type: string + integration: + type: integer + domain: + type: string + metadata: + type: object + properties: + calling_code: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + identified: + type: boolean + identifications: + nullable: true + required: + - transactions + - subscriptions + - authorizations + - email + - first_name + - last_name + - phone + - integration + - domain + - metadata + - customer_code + - risk_action + - id + - createdAt + - updatedAt + - identified + - identifications + required: + - status + - message + - data + CustomerFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transactions: + type: array + items: {} + subscriptions: + type: array + items: {} + authorizations: + type: array + items: {} + first_name: + type: string + last_name: + type: string + email: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + domain: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + created_at: + type: string + updated_at: + type: string + total_transactions: + type: integer + total_transaction_value: + type: array + items: {} + dedicated_account: + nullable: true + dedicated_accounts: + type: array + items: {} + nullable: true + identified: + type: boolean + identifications: + nullable: true + required: + - transactions + - subscriptions + - authorizations + - first_name + - last_name + - email + - phone + - metadata + - domain + - customer_code + - risk_action + - id + - integration + - createdAt + - updatedAt + - created_at + - updated_at + - total_transactions + - total_transaction_value + - dedicated_account + - dedicated_accounts + - identified + - identifications + required: + - status + - message + - data + CustomerUpdate: + type: object + properties: + first_name: + description: Customer's first name + type: string + last_name: + description: Customer's last name + type: string + phone: + description: Customer's phone number + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + first_name: Cecilia + last_name: Jones + CustomerUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + first_name: + type: string + last_name: + type: string + email: + type: string + phone: + type: string + metadata: + type: object + domain: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + identified: + type: boolean + identifications: + nullable: true + required: + - first_name + - last_name + - email + - phone + - metadata + - domain + - customer_code + - risk_action + - id + - integration + - createdAt + - updatedAt + - identified + - identifications + required: + - status + - message + - data + CustomerRiskAction: + type: object + required: + - customer + properties: + customer: + description: The customer code from the response of the customer creation + type: string + risk_action: + description: This determines the fraud rules that should be applied to the customer + type: string + default: default + enum: + - allow + - deny + - default + example: + customer: CUS_c6wqvwmvwopw4ms + risk_action: deny + CustomerWhitelistBlacklistResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transactions: + type: array + items: {} + subscriptions: + type: array + items: {} + authorizations: + type: array + items: {} + first_name: + type: string + last_name: + type: string + email: + type: string + phone: + type: string + metadata: + type: object + domain: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + identified: + type: boolean + identifications: + nullable: true + required: + - transactions + - subscriptions + - authorizations + - first_name + - last_name + - email + - phone + - metadata + - domain + - customer_code + - risk_action + - id + - integration + - createdAt + - updatedAt + - identified + - identifications + required: + - status + - message + - data + CustomerValidate: + type: object + required: + - first_name + - last_name + - type + - country + - bvn + - bank_code + - account_number + properties: + first_name: + description: Customer's first name + type: string + middle_name: + description: Customer's middle name + type: string + last_name: + description: Customer's last name + type: string + type: + description: Predefined types of identification. + type: string + default: bank_account + value: + description: Customer's identification number. + type: string + country: + description: Two-letter country code of identification issuer + type: string + bvn: + description: Customer's Bank Verification Number + type: string + bank_code: + description: You can get the list of bank codes by calling the List Banks endpoint (https://api.paystack.co/bank). + type: string + account_number: + description: Customer's bank account number. + type: string + example: + first_name: Jabal + last_name: Cedar + country: NG + type: bank_account + account_number: '0123456789' + bank_code: '007' + bvn: '20012345677' + CustomerValidateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + CustomerAuthorizationInitializeAccount: + type: object + properties: + number: + type: string + description: The customer's account number + example: '0123456789' + bank_code: + type: string + description: The code representing the customer's bank + example: '058' + required: + - number + - bank_code + CustomerAuthorizationInitializeAddress: + type: object + properties: + street: + type: string + description: The customer's street + example: 123 Main Street + city: + type: string + description: The customer's city + example: Lagos + state: + type: string + description: The customer's state + example: Lagos + required: + - street + - city + - state + CustomerAuthorizationInitializeRequest: + type: object + required: + - email + - channel + properties: + email: + type: string + description: Customer's email address + example: ravi@demo.com + channel: + type: string + description: direct_debit is the only supported option for now + enum: + - direct_debit + example: direct_debit + callback_url: + type: string + description: Fully qualified url (e.g. https://example.com/) to redirect your customer to + example: http://test.url.com + account: + $ref: '#/components/schemas/CustomerAuthorizationInitializeAccount' + address: + $ref: '#/components/schemas/CustomerAuthorizationInitializeAddress' + CustomerAuthorizationInitializeResponseData: + type: object + properties: + redirect_url: + type: string + example: https://checkout.paystack.com/82t4mp5b5mfn51h + access_code: + type: string + example: 82t4mp5b5mfn51h + reference: + type: string + example: dfbzfotsrbv4n5s82t4mp5b5mfn51h + required: + - redirect_url + - access_code + - reference + CustomerAuthorizationInitializeResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Authorization initialized + data: + $ref: '#/components/schemas/CustomerAuthorizationInitializeResponseData' + required: + - status + - message + - data + CustomerAuthorizationVerifyResponseCustomer: + type: object + properties: + code: + type: string + example: CUS_24lze1c8i2zl76y + email: + type: string + example: ravi@demo.com + required: + - code + - email + CustomerAuthorizationVerifyResponseData: + type: object + properties: + authorization_code: + type: string + example: AUTH_JV4T9Wawdj + channel: + type: string + example: direct_debit + bank: + type: string + example: Guaranty Trust Bank + active: + type: boolean + example: true + customer: + $ref: '#/components/schemas/CustomerAuthorizationVerifyResponseCustomer' + required: + - authorization_code + - channel + - bank + - active + - customer + CustomerAuthorizationVerifyResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Authorization retrieved successfully + data: + $ref: '#/components/schemas/CustomerAuthorizationVerifyResponseData' + required: + - status + - message + - data + CustomerDeactivateAuthorization: + type: object + required: + - authorization_code + properties: + authorization_code: + description: Authorization code to be deactivated + type: string + example: + authorization_code: AUTH_xxxIjkZVj5 + CustomerDeactivateAuthorizationResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + CustomerInitializeDirectDebitAccount: + type: object + properties: + number: + type: string + description: The customer's account number + example: '0123456789' + bank_code: + type: string + description: The code representing the customer's bank + example: '058' + required: + - number + - bank_code + CustomerInitializeDirectDebitAddress: + type: object + properties: + street: + type: string + description: The customer's street + example: Some Where + city: + type: string + description: The customer's city + example: Ikeja + state: + type: string + description: The customer's state + example: Lagos + required: + - street + - city + - state + CustomerInitializeDirectDebitRequest: + type: object + required: + - account + - address + properties: + account: + $ref: '#/components/schemas/CustomerInitializeDirectDebitAccount' + address: + $ref: '#/components/schemas/CustomerInitializeDirectDebitAddress' + CustomerInitializeDirectDebitResponseData: + type: object + properties: + redirect_url: + type: string + example: https://link.paystack.com/ll6b0szngj1f27k + access_code: + type: string + example: ll6b0szngj1f27k + reference: + type: string + example: 1er945lpy4txyki + required: + - redirect_url + - access_code + - reference + CustomerInitializeDirectDebitResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Authorization initialized + data: + $ref: '#/components/schemas/CustomerInitializeDirectDebitResponseData' + required: + - status + - message + - data + CustomerDirectDebitActivationChargeRequest: + type: object + required: + - authorization_id + properties: + authorization_id: + type: integer + description: The authorization ID gotten from the initiation response + example: 1069309917 + CustomerDirectDebitActivationChargeResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Mandate is queued for retry + required: + - status + - message + CustomerFetchMandateAuthorizationsResponseData: + type: object + properties: + id: + type: integer + example: 164098 + status: + type: string + example: active + mandate_id: + type: integer + example: 512003 + authorization_id: + type: integer + example: 110049014 + authorization_code: + type: string + example: AUTH_8Lol0pNt14 + integration_id: + type: integer + example: 463433 + account_number: + type: string + example: '0123456789' + bank_code: + type: string + example: '032' + bank_name: + type: string + nullable: true + example: null + customer: + type: object + properties: + id: + type: integer + example: 43975700 + customer_code: + type: string + example: CUS_2eusy8uwe34s23fy + email: + type: string + example: customer@email.com + first_name: + type: string + example: Smith + last_name: + type: string + example: Bel + authorized_at: + type: string + format: date-time + example: '2024-09-27T10:57:53.824Z' + required: + - id + - status + - mandate_id + - authorization_id + - authorization_code + - integration_id + - account_number + - bank_code + - customer + - authorized_at + CustomerFetchMandateAuthorizationsResponseMeta: + type: object + properties: + per_page: + type: integer + example: 50 + next: + type: string + nullable: true + example: null + count: + type: integer + example: 1 + total: + type: integer + example: 1 + required: + - per_page + - count + - total + CustomerFetchMandateAuthorizationsResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Mandate authorizations retrieved successfully + data: + type: array + items: + $ref: '#/components/schemas/CustomerFetchMandateAuthorizationsResponseData' + meta: + $ref: '#/components/schemas/CustomerFetchMandateAuthorizationsResponseMeta' + required: + - status + - message + - data + - meta + DirectDebitActivationChargeRequest: + type: object + required: + - customer_ids + properties: + customer_ids: + type: array + description: Array of customer IDs to trigger activation charge for + items: + type: integer + example: + - 28958104 + - 983697220 + DirectDebitActivationChargeResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Mandate is queued for retry + required: + - status + - message + DedicatedNubanListResponseArray: + type: object + properties: + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + risk_action: + type: string + international_format_phone: + type: string + nullable: true + bank: + type: object + properties: + name: + type: string + id: + type: integer + slug: + type: string + required: + - name + - id + - slug + id: + type: integer + account_name: + type: string + account_number: + type: string + created_at: + type: string + updated_at: + type: string + currency: + type: string + split_config: + type: object + properties: + subaccount: + type: string + required: + - subaccount + nullable: true + active: + type: boolean + assigned: + type: boolean + required: + - customer + - bank + - id + - account_name + - account_number + - created_at + - updated_at + - currency + - split_config + - active + - assigned + DedicatedNubanListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/DedicatedNubanListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + DedicatedVirtualAccountCreate: + type: object + required: + - customer + properties: + customer: + description: The code for the previously created customer + type: string + preferred_bank: + description: The bank slug for preferred bank. To get a list of available banks, use the List Providers endpoint + type: string + subaccount: + description: Subaccount code of the account you want to split the transaction with + type: string + split_code: + description: Split code consisting of the lists of accounts you want to split the transaction with + type: string + example: + customer: CUS_bo732eugpb2qrg6 + preferred_bank: titan-paystack + DedicatedNubanCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + bank: + type: object + properties: + name: + type: string + id: + type: integer + slug: + type: string + required: + - name + - id + - slug + account_name: + type: string + account_number: + type: string + assigned: + type: boolean + currency: + type: string + metadata: + nullable: true + active: + type: boolean + id: + type: integer + created_at: + type: string + updated_at: + type: string + assignment: + type: object + properties: + integration: + type: integer + assignee_id: + type: integer + assignee_type: + type: string + expired: + type: boolean + account_type: + type: string + assigned_at: + type: string + expired_at: + nullable: true + required: + - integration + - assignee_id + - assignee_type + - expired + - account_type + - assigned_at + - expired_at + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + required: + - bank + - account_name + - account_number + - assigned + - currency + - metadata + - active + - id + - created_at + - updated_at + - assignment + - customer + required: + - status + - message + - data + DedicatedVirtualAccountAssign: + type: object + required: + - email + - first_name + - last_name + - phone + - preferred_bank + - country + properties: + email: + description: Customer's email address + type: string + first_name: + description: Customer's first name + type: string + last_name: + description: Customer's last name + type: string + phone: + description: Customer's phone name + type: string + preferred_bank: + description: | + The bank slug for preferred bank. To get a list of available banks, + use the List Banks endpoint, passing `pay_with_bank_transfer=true` query parameter + type: string + country: + description: The two letter code country + type: string + enum: + - NG + - GH + account_number: + description: Customer's account number + type: string + bvn: + description: Customer's Bank Verification Number + type: string + bank_code: + description: Customer's bank code + type: string + subaccount: + description: Subaccount code of the account you want to split the transaction with + type: string + split_code: + description: Split code consisting of the lists of accounts you want to split the transaction with + type: string + example: + email: salmon.orange@email.com + first_name: Salmon + last_name: Orange + phone: '+2348100000000' + preferred_bank: titan-paystack + country: NG + DedicatedNubanFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + bank: + type: object + properties: + name: + type: string + id: + type: integer + slug: + type: string + required: + - name + - id + - slug + id: + type: integer + account_name: + type: string + account_number: + type: string + created_at: + type: string + updated_at: + type: string + currency: + type: string + split_config: + nullable: true + active: + type: boolean + assigned: + type: boolean + required: + - customer + - bank + - id + - account_name + - account_number + - created_at + - updated_at + - currency + - split_config + - active + - assigned + required: + - status + - message + - data + DedicatedNubanDeactivateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + bank: + type: object + properties: + name: + type: string + id: + type: integer + slug: + type: string + required: + - name + - id + - slug + account_name: + type: string + account_number: + type: string + assigned: + type: boolean + currency: + type: string + metadata: + nullable: true + active: + type: boolean + id: + type: integer + created_at: + type: string + updated_at: + type: string + assignment: + type: object + properties: + assignee_id: + type: integer + assignee_type: + type: string + assigned_at: + type: string + integration: + type: integer + account_type: + type: string + required: + - assignee_id + - assignee_type + - assigned_at + - integration + - account_type + required: + - bank + - account_name + - account_number + - assigned + - currency + - metadata + - active + - id + - created_at + - updated_at + - assignment + required: + - status + - message + - data + DedicatedVirtualAccountSplit: + type: object + required: + - account_number + properties: + account_number: + description: Valid Dedicated virtual account + type: string + subaccount: + description: Subaccount code of the account you want to split the transaction with + type: string + split_code: + description: Split code consisting of the lists of accounts you want to split the transaction with + type: string + example: + account_number: '0033322211' + split_code: SPL_e7jnRLtzla + DedicatedVirtualAccountRemoveSplit: + type: object + required: + - account_number + properties: + account_number: + description: Valid Dedicated virtual account + type: string + example: + account_number: '0033322211' + ApplePayParam: + type: object + required: + - domainName + properties: + domainName: + description: The domain or subdomain for your application + type: string + example: + domainName: example.com + ApplePayCreateOkModel: + type: object + properties: + status: + description: An indicator + type: boolean + message: + description: A short description of the response + type: string + example: + status: true + message: Domain successfully registered on Apple Pay + PlanListResponseArray: + type: object + properties: + subscriptions: + type: array + items: {} + pages: + type: array + items: {} + domain: + type: string + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + invoice_limit: + type: integer + send_invoices: + type: boolean + send_sms: + type: boolean + hosted_page: + type: boolean + hosted_page_url: + nullable: true + hosted_page_summary: + nullable: true + currency: + type: string + migrate: + type: boolean + is_deleted: + type: boolean + is_archived: + type: boolean + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + total_subscriptions: + type: integer + active_subscriptions: + type: integer + total_subscriptions_revenue: + type: integer + required: + - subscriptions + - pages + - domain + - name + - plan_code + - description + - amount + - interval + - invoice_limit + - send_invoices + - send_sms + - hosted_page + - hosted_page_url + - hosted_page_summary + - currency + - migrate + - is_deleted + - is_archived + - id + - integration + - createdAt + - updatedAt + - total_subscriptions + - active_subscriptions + - total_subscriptions_revenue + PlanListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/PlanListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + PlanCreate: + type: object + required: + - name + - amount + - interval + properties: + name: + description: Name of plan + type: string + amount: + description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR + type: integer + interval: + description: Payment interval + type: string + enum: + - daily + - weekly + - monthly + - biannually + - annually + description: + description: A description for this plan + type: string + send_invoices: + description: Set to false if you don't want invoices to be sent to your customers + type: boolean + send_sms: + description: Set to false if you don't want text messages to be sent to your customers + type: boolean + currency: + description: Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD + type: string + invoice_limit: + description: |- + Number of invoices to raise during subscription to this plan. + Can be overridden by specifying an invoice_limit while subscribing. + type: integer + example: + name: Basic + amount: 150000 + interval: monthly + PlanCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + currency: + type: string + name: + type: string + amount: + type: integer + interval: + type: string + integration: + type: integer + domain: + type: string + plan_code: + type: string + invoice_limit: + type: integer + send_invoices: + type: boolean + send_sms: + type: boolean + hosted_page: + type: boolean + migrate: + type: boolean + is_archived: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - currency + - name + - amount + - interval + - integration + - domain + - plan_code + - invoice_limit + - send_invoices + - send_sms + - hosted_page + - migrate + - is_archived + - id + - createdAt + - updatedAt + required: + - status + - message + - data + PlanFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + subscriptions: + type: array + items: {} + pages: + type: array + items: {} + domain: + type: string + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + invoice_limit: + type: integer + send_invoices: + type: boolean + send_sms: + type: boolean + hosted_page: + type: boolean + hosted_page_url: + nullable: true + hosted_page_summary: + nullable: true + currency: + type: string + migrate: + type: boolean + is_deleted: + type: boolean + is_archived: + type: boolean + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + pages_count: + type: integer + subscribers_count: + type: integer + subscriptions_count: + type: integer + active_subscriptions_count: + type: integer + nullable: true + total_revenue: + type: integer + subscribers: + type: array + items: {} + required: + - subscriptions + - pages + - domain + - name + - plan_code + - description + - amount + - interval + - invoice_limit + - send_invoices + - send_sms + - hosted_page + - hosted_page_url + - hosted_page_summary + - currency + - migrate + - is_deleted + - is_archived + - id + - integration + - createdAt + - updatedAt + - pages_count + - subscribers_count + - subscriptions_count + - active_subscriptions_count + - total_revenue + - subscribers + required: + - status + - message + - data + PlanUpdate: + type: object + properties: + name: + description: Name of plan + type: string + amount: + description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR + type: integer + interval: + description: Payment interval + type: string + enum: + - daily + - weekly + - monthly + - biannually + - annually + description: + description: A description for this plan + type: boolean + send_invoices: + description: Set to false if you don't want invoices to be sent to your customers + type: boolean + send_sms: + description: Set to false if you don't want text messages to be sent to your customers + type: boolean + currency: + description: Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD + type: string + invoice_limit: + description: |- + Number of invoices to raise during subscription to this plan. + Can be overridden by specifying an invoice_limit while subscribing. + type: integer + example: + name: Starter + PlanUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + SubscriptionListResponseArray: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + start: + type: integer + quantity: + type: integer + subscription_code: + type: string + email_token: + type: string + amount: + type: integer + cron_expression: + type: string + nullable: true + next_payment_date: + type: string + nullable: true + open_invoice: + nullable: true + createdAt: + type: string + integration: + type: integer + plan: + type: object + properties: + id: + type: integer + domain: + type: string + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + send_invoices: + type: boolean + send_sms: + type: boolean + currency: + type: string + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - id + - domain + - name + - plan_code + - description + - amount + - interval + - send_invoices + - send_sms + - currency + - integration + - createdAt + - updatedAt + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + nullable: true + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + nullable: true + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: integer + signature: + type: string + nullable: true + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + invoice_limit: + type: integer + split_code: + nullable: true + payments_count: + type: integer + most_recent_invoice: + nullable: true + metadata: + type: object + nullable: true + required: + - id + - domain + - status + - start + - quantity + - subscription_code + - email_token + - amount + - cron_expression + - next_payment_date + - open_invoice + - createdAt + - integration + - plan + - authorization + - customer + - invoice_limit + - split_code + - payments_count + - most_recent_invoice + - metadata + SubscriptionListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/SubscriptionListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + SubscriptionCreate: + type: object + required: + - customer + - plan + properties: + customer: + description: Customer's email address or customer code + type: string + plan: + description: Plan code + type: string + authorization: + description: |- + If customer has multiple authorizations, you can set the desired authorization you wish to use for this subscription here. + If this is not supplied, the customer's most recent authorization would be used + type: string + start_date: + description: Set the date for the first debit. (ISO 8601 format) e.g. 2017-05-16T00:30:13+01:00 + type: string + format: date-time + example: + customer: CUS_xnxdt6s1zg1f4nx + plan: PLN_gx2wn530m0i3w3m + SubscriptionCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + customer: + type: integer + plan: + type: integer + integration: + type: integer + domain: + type: string + start: + type: integer + status: + type: string + quantity: + type: integer + amount: + type: integer + authorization: + type: integer + invoice_limit: + type: integer + split_code: + nullable: true + subscription_code: + type: string + email_token: + type: string + id: + type: integer + cancelledAt: + nullable: true + createdAt: + type: string + updatedAt: + type: string + cron_expression: + type: string + next_payment_date: + type: string + easy_cron_id: + type: string + nullable: true + open_invoice: + type: string + nullable: true + metadata: + type: object + nullable: true + required: + - customer + - plan + - integration + - domain + - start + - status + - quantity + - amount + - authorization + - invoice_limit + - split_code + - subscription_code + - email_token + - id + - cancelledAt + - createdAt + - updatedAt + - cron_expression + - next_payment_date + - easy_cron_id + - open_invoice + - metadata + required: + - status + - message + - data + SubscriptionFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + subscription_code: + type: string + email_token: + type: string + amount: + type: integer + cron_expression: + type: string + next_payment_date: + type: string + open_invoice: + nullable: true + createdAt: + type: string + cancelledAt: + nullable: true + integration: + type: integer + plan: + type: object + properties: + id: + type: integer + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + send_invoices: + type: boolean + send_sms: + type: boolean + currency: + type: string + required: + - id + - name + - plan_code + - description + - amount + - interval + - send_invoices + - send_sms + - currency + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + invoices: + type: array + items: {} + invoices_history: + type: array + items: {} + invoice_limit: + type: integer + split_code: + nullable: true + most_recent_invoice: + nullable: true + payments_count: + type: integer + metadata: + type: object + nullable: true + required: + - id + - domain + - status + - subscription_code + - email_token + - amount + - cron_expression + - next_payment_date + - open_invoice + - createdAt + - cancelledAt + - integration + - plan + - authorization + - customer + - invoices + - invoices_history + - invoice_limit + - split_code + - most_recent_invoice + - payments_count + - metadata + required: + - status + - message + - data + SubscriptionToggle: + type: object + required: + - code + - token + properties: + code: + description: Subscription code + type: string + token: + description: Email token + type: string + example: + code: SUB_vsyqdmlzble3uii + token: d7gofp6yppn3qz7 + SubscriptionDisableResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferRecipientListResponseArray: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + nullable: true + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + isDeleted: + type: boolean + details: + type: object + properties: + authorization_code: + type: string + nullable: true + account_number: + type: string + nullable: true + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - isDeleted + - details + TransferRecipientListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TransferRecipientListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + TransferRecipientCreate: + type: object + required: + - type + - name + - account_number + - bank_code + properties: + type: + description: Recipient Type + type: string + enum: + - nuban + - ghipss + - mobile_money + - basa + - authorization + name: + description: The recipient's name according to their account registration. + type: string + account_number: + description: Recipient's bank account number + type: string + bank_code: + description: Recipient's bank code. You can get the list of Bank Codes by calling the List Banks endpoint + type: string + description: + description: A description for this recipient + type: string + currency: + description: Currency for the account receiving the transfer + type: string + authorization_code: + description: An authorization code from a previous transaction + type: string + metadata: + description: JSON object of custom data + type: object + example: + type: nuban + name: Smith Taplo + account_number: '01000000010' + bank_code: '058' + TransferRecipientCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + isDeleted: + type: boolean + details: + type: object + properties: + authorization_code: + type: string + nullable: true + account_number: + type: string + nullable: true + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - isDeleted + - details + required: + - status + - message + - data + TransferRecipientBulk: + type: object + required: + - batch + properties: + batch: + description: A list of transfer recipient object. + type: array + items: + $ref: '#/components/schemas/TransferRecipientCreate' + ErrorRecordsArray: + type: object + properties: + type: + type: string + name: + type: string + description: + type: string + account_number: + type: string + bank_code: + type: string + currency: + type: string + email: + type: string + required: + - type + - name + - description + - account_number + - bank_code + - currency + - email + TransferRecipientErrorsArray: + type: object + properties: + message: + type: string + records: + type: array + items: + $ref: '#/components/schemas/ErrorRecordsArray' + required: + - message + - records + TransferRecipientBulkCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + success: + type: array + items: {} + errors: + type: array + items: + $ref: '#/components/schemas/TransferRecipientErrorsArray' + required: + - success + - errors + required: + - status + - message + - data + TransferRecipientFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + domain: + type: string + type: + type: string + currency: + type: string + name: + type: string + details: + type: object + properties: + account_number: + type: string + nullable: true + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - account_number + - account_name + - bank_code + - bank_name + description: + type: string + metadata: + type: object + nullable: true + recipient_code: + type: string + active: + type: boolean + recipient_account: + type: string + institution_code: + type: string + email: + type: string + id: + type: integer + isDeleted: + type: boolean + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - domain + - type + - currency + - name + - details + - description + - recipient_code + - active + - recipient_account + - institution_code + - email + - id + - isDeleted + - createdAt + - updatedAt + required: + - status + - message + - data + TransferRecipientUpdate: + type: object + properties: + name: + description: Recipient's name + type: string + email: + description: Recipient's email address + type: string + TransferRecipientUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferRecipientDeleteResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferListResponseArray: + type: object + properties: + amount: + type: integer + createdAt: + type: string + currency: + type: string + domain: + type: string + failures: + nullable: true + id: + type: integer + integration: + type: integer + reason: + type: string + reference: + type: string + source: + type: string + source_details: + nullable: true + status: + type: string + titan_code: + nullable: true + transfer_code: + type: string + request: + type: integer + transferred_at: + nullable: true + updatedAt: + type: string + recipient: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + isDeleted: + type: boolean + details: + type: object + properties: + authorization_code: + nullable: true + account_number: + type: string + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - isDeleted + - details + session: + type: object + properties: + provider: + nullable: true + id: + nullable: true + required: + - provider + - id + fee_charged: + type: integer + fees_breakdown: + type: integer + nullable: true + required: + - amount + - createdAt + - currency + - domain + - failures + - id + - integration + - reason + - reference + - source + - source_details + - status + - titan_code + - request + - transfer_code + - transferred_at + - updatedAt + - recipient + - session + - fee_charged + - fees_breakdown + TransferListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TransferListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + TransferBase: + type: object + required: + - amount + - recipient + - reference + properties: + amount: + description: Amount to transfer in kobo if currency is NGN and pesewas if currency is GHS. + type: integer + recipient: + description: The transfer recipient's code + type: string + reference: + description: | + To ensure idempotency, you need to provide e a unique identifier for the request. The identifier should be a lowercase alphanumeric string with only -,_ symbols allowed. + type: string + minimum: 16 + reason: + description: The reason or narration for the transfer. + type: string + example: + amount: 120000 + recipient: RCP_gd9vgag7n5lr5ix + reference: acv_9ee55786-2323-4760-98e2-6380c9cb3f68 + TransferInitiate: + description: Transfer initiation model + allOf: + - $ref: '#/components/schemas/TransferBase' + - type: object + required: + - source + properties: + source: + description: The source of funds to send from + type: string + default: balance + currency: + description: Specify the currency of the transfer. + type: string + default: NGN + enum: + - NGN + - ZAR + - KES + - GHS + example: + source: balance + TransferCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transfersessionid: + type: array + items: {} + transfertrials: + type: array + items: {} + domain: + type: string + amount: + type: integer + currency: + type: string + reference: + type: string + source: + type: string + source_details: + nullable: true + reason: + type: string + status: + type: string + failures: + nullable: true + transfer_code: + type: string + titan_code: + nullable: true + transferred_at: + nullable: true + id: + type: integer + integration: + type: integer + request: + type: integer + recipient: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - transfersessionid + - transfertrials + - domain + - amount + - currency + - reference + - source + - source_details + - reason + - status + - failures + - transfer_code + - titan_code + - transferred_at + - id + - integration + - request + - recipient + - createdAt + - updatedAt + required: + - status + - message + - data + TransferFinalize: + type: object + required: + - transfer_code + - otp + properties: + transfer_code: + description: The transfer code you want to finalize + type: string + otp: + description: OTP sent to business phone to verify transfer + type: string + example: + transfer_code: TRF_vsyqdmlzble3uii + otp: '928783' + TransferBulk: + type: object + required: + - source + - transfers + properties: + source: + description: The source of funds for the transfer. + type: string + default: balance + currency: + description: Specify the currency of the transfer. + type: string + default: NGN + enum: + - NGN + - ZAR + - KES + - GHS + transfers: + description: A list of transfer object + type: array + items: + $ref: '#/components/schemas/TransferBase' + example: + source: balance + transfers: + - amount: 120000 + recipient: RCP_gd9vgag7n5lr5ix + reference: acv_9ee55786-2323-4760-98e2-6380c9cb3f68 + TransferBulkResponseArray: + type: object + properties: + reference: + type: string + recipient: + type: string + amount: + type: integer + transfer_code: + type: string + currency: + type: string + status: + type: string + required: + - reference + - recipient + - amount + - transfer_code + - currency + - status + TransferBulkResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TransferBulkResponseArray' + required: + - status + - message + - data + TransferFeesBreakdownArray: + type: object + properties: + amount: + type: string + formula: + nullable: true + type: + type: string + required: + - amount + - formula + - type + TransferFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + amount: + type: integer + createdAt: + type: string + currency: + type: string + domain: + type: string + failures: + nullable: true + id: + type: integer + integration: + type: integer + reason: + type: string + reference: + type: string + source: + type: string + source_details: + nullable: true + status: + type: string + titan_code: + nullable: true + transfer_code: + type: string + request: + type: integer + transferred_at: + nullable: true + updatedAt: + type: string + recipient: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + isDeleted: + type: boolean + details: + type: object + properties: + authorization_code: + nullable: true + account_number: + type: string + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - isDeleted + - details + session: + type: object + properties: + provider: + nullable: true + id: + nullable: true + required: + - provider + - id + fee_charged: + type: integer + fees_breakdown: + type: array + items: + $ref: '#/components/schemas/TransferFeesBreakdownArray' + nullable: true + gateway_response: + type: string + nullable: true + required: + - amount + - createdAt + - currency + - domain + - failures + - id + - integration + - reason + - reference + - source + - source_details + - status + - titan_code + - transfer_code + - request + - transferred_at + - updatedAt + - recipient + - session + - fee_charged + - fees_breakdown + - gateway_response + required: + - status + - message + - data + TransferVerifyResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + amount: + type: integer + createdAt: + type: string + currency: + type: string + domain: + type: string + failures: + nullable: true + id: + type: integer + integration: + type: integer + reason: + type: string + reference: + type: string + source: + type: string + source_details: + nullable: true + status: + type: string + titan_code: + nullable: true + transfer_code: + type: string + transferred_at: + nullable: true + updatedAt: + type: string + recipient: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + details: + type: object + properties: + authorization_code: + nullable: true + account_number: + type: string + account_name: + type: string + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - details + session: + type: object + properties: + provider: + nullable: true + id: + nullable: true + required: + - provider + - id + gateway_response: + type: string + nullable: true + required: + - amount + - createdAt + - currency + - domain + - failures + - id + - integration + - reason + - reference + - source + - source_details + - status + - titan_code + - transfer_code + - transferred_at + - updatedAt + - recipient + - session + - gateway_response + required: + - status + - message + - data + TransferResendOTP: + type: object + required: + - transfer_code + - reason + properties: + transfer_code: + description: The transfer code that requires an OTP validation + type: string + reason: + description: Specify the flag to indicate the purpose of the OTP + type: string + default: transfer + enum: + - disable_otp + - resend_otp + - transfer + example: + transfer_code: TRF_vsyqdmlzble3uii + reason: resend_otp + TransferResendsOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferDisablesOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferFinalizeDisableOTP: + type: object + required: + - otp + properties: + otp: + description: OTP sent to business phone to verify disabling OTP requirement + type: string + example: + otp: '928783' + TransferFinalizeDisablesOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferEnablesOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + BalanceCheckResponseArray: + type: object + properties: + currency: + type: string + balance: + type: integer + required: + - currency + - balance + BalanceCheckResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/BalanceCheckResponseArray' + required: + - status + - message + - data + BalanceFetchLedgerResponseArray: + type: object + properties: + integration: + type: integer + domain: + type: string + balance: + type: integer + currency: + type: string + difference: + type: integer + reason: + type: string + model_responsible: + type: string + model_row: + type: integer + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - domain + - balance + - currency + - difference + - reason + - model_responsible + - model_row + - id + - createdAt + - updatedAt + BalanceFetchLedgerResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/BalanceFetchLedgerResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + PaymentRequestLineItemsArray: + type: object + properties: + name: + type: string + amount: + type: integer + quantity: + type: integer + required: + - name + - amount + - quantity + PaymentRequestTaxArray: + type: object + properties: + name: + type: string + amount: + type: integer + required: + - name + - amount + PaymentRequestListResponseArray: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + type: string + nullable: true + pdf_url: + type: string + nullable: true + line_items: + type: array + items: + $ref: '#/components/schemas/PaymentRequestLineItemsArray' + tax: + type: array + items: + $ref: '#/components/schemas/PaymentRequestTaxArray' + request_code: + type: string + status: + type: string + paid: + type: boolean + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: {} + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + nullable: true + split_code: + type: string + nullable: true + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + PaymentRequestListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/PaymentRequestListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + anyOf: + - type: integer + - type: string + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + PaymentRequestCreate: + type: object + required: + - customer + - amount + properties: + customer: + description: Customer id or code + type: string + amount: + description: |- + Payment request amount. Only useful if line items and tax values are ignored. + The endpoint will throw a friendly warning if neither is available. + type: integer + currency: + description: Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN + type: string + due_date: + description: ISO 8601 representation of request due date + type: string + format: date-time + description: + description: A short description of the payment request + type: string + line_items: + description: Array of line items + type: array + items: + type: object + tax: + description: Array of taxes + type: array + items: + type: object + send_notification: + description: Indicates whether Paystack sends an email notification to customer. Defaults to true + type: boolean + draft: + description: Indicate if request should be saved as draft. Defaults to false and overrides send_notification + type: boolean + has_invoice: + description: Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no line_items or tax passed + type: boolean + invoice_number: + description: Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. + type: integer + split_code: + description: The split code of the transaction split. + type: string + example: + customer: CUS_xqp6o5oja5cackf + amount: 10000 + PaymentRequestCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + type: string + nullable: true + line_items: + type: array + items: {} + tax: + type: array + items: {} + request_code: + type: string + status: + type: string + paid: + type: boolean + metadata: + type: object + nullable: true + notifications: + type: array + items: {} + offline_reference: + type: string + customer: + type: integer + created_at: + type: string + discount: + nullable: true + split_code: + type: string + nullable: true + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - line_items + - tax + - request_code + - status + - paid + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + required: + - status + - message + - data + PaymentRequestUpdate: + type: object + properties: + customer: + description: Customer id or code + type: string + amount: + description: |- + Payment request amount. Only useful if line items and tax values are ignored. + The endpoint will throw a friendly warning if neither is available. + type: integer + currency: + description: Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN + type: string + due_date: + description: ISO 8601 representation of request due date + type: string + format: date-time + description: + description: A short description of the payment request + type: string + line_items: + description: Array of line items + type: array + items: + type: object + tax: + description: Array of taxes + type: array + items: + type: object + send_notification: + description: Indicates whether Paystack sends an email notification to customer. Defaults to true + type: boolean + draft: + description: Indicate if request should be saved as draft. Defaults to false and overrides send_notification + type: boolean + has_invoice: + description: Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no line_items or tax passed + type: boolean + items: + type: object + invoice_number: + description: Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. + type: integer + split_code: + description: The split code of the transaction split. + type: string + example: + amount: 15000 + PaymentRequestNotificationsArray: + type: object + properties: + sent_at: + type: string + channel: + type: string + required: + - sent_at + - channel + PaymentRequestUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + nullable: true + pdf_url: + type: string + nullable: true + line_items: + type: array + items: {} + tax: + type: array + items: {} + request_code: + type: string + status: + type: string + paid: + type: boolean + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: + $ref: '#/components/schemas/PaymentRequestNotificationsArray' + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + nullable: true + split_code: + nullable: true + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + required: + - status + - message + - data + PaymentRequestVerifyResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + integration: + type: object + properties: + key: + type: string + name: + type: string + logo: + type: string + allowed_currencies: + type: array + items: + type: string + required: + - key + - name + - logo + - allowed_currencies + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + nullable: true + pdf_url: + type: string + nullable: true + line_items: + type: array + items: {} + tax: + type: array + items: {} + request_code: + type: string + status: + type: string + paid: + type: boolean + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: + $ref: '#/components/schemas/PaymentRequestNotificationsArray' + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + nullable: true + split_code: + nullable: true + pending_amount: + type: integer + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + - pending_amount + required: + - status + - message + - data + PaymentRequestSendNotificationResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + PaymentRequestPendingArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + PaymentRequestSuccessfulArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + PaymentRequestTotalArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + PaymentRequestTotalResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + pending: + type: array + items: + $ref: '#/components/schemas/PaymentRequestPendingArray' + successful: + type: array + items: + $ref: '#/components/schemas/PaymentRequestSuccessfulArray' + total: + type: array + items: + $ref: '#/components/schemas/PaymentRequestTotalArray' + required: + - pending + - successful + - total + required: + - status + - message + - data + PaymentRequestFinalizeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + type: string + nullable: true + pdf_url: + nullable: true + line_items: + type: array + items: + $ref: '#/components/schemas/PaymentRequestLineItemsArray' + tax: + type: array + items: + $ref: '#/components/schemas/PaymentRequestTaxArray' + request_code: + type: string + status: + type: string + paid: + type: boolean + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: {} + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + type: object + properties: + type: + type: string + amount: + type: integer + required: + - type + - amount + nullable: true + split_code: + nullable: true + pending_amount: + type: integer + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + - pending_amount + required: + - status + - message + - data + PaymentRequestArchiveResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + ProductListsResponseArray: + type: object + properties: + id: + type: integer + name: + type: string + description: + type: string + product_code: + type: string + slug: + type: string + currency: + type: string + price: + type: integer + quantity: + type: integer + quantity_sold: + type: integer + active: + type: boolean + domain: + type: string + type: + type: string + in_stock: + type: boolean + unlimited: + type: boolean + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + files: + type: array + items: {} + success_message: + nullable: true + redirect_url: + nullable: true + split_code: + nullable: true + notification_emails: + nullable: true + minimum_orderable: + type: integer + maximum_orderable: + nullable: true + createdAt: + type: string + updatedAt: + type: string + digital_assets: + type: array + items: {} + variant_options: + type: array + items: {} + is_shippable: + type: boolean + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + integration: + type: integer + low_stock_alert: + type: integer + required: + - id + - name + - description + - product_code + - slug + - currency + - price + - quantity + - quantity_sold + - active + - domain + - type + - in_stock + - unlimited + - metadata + - files + - success_message + - redirect_url + - split_code + - notification_emails + - minimum_orderable + - maximum_orderable + - createdAt + - updatedAt + - digital_assets + - variant_options + - is_shippable + - shipping_fields + - integration + - low_stock_alert + ProductListsResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/ProductListsResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: string + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + ProductCreate: + type: object + required: + - name + - description + - price + - currency + properties: + name: + description: Name of product + type: string + description: + description: The description of the product + type: string + price: + description: | + Price should be in kobo if currency is NGN, pesewas, if currency is GHS, + and cents, if currency is ZAR + type: integer + currency: + description: | + Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD + type: string + unlimited: + description: | + Set to true if the product has unlimited stock. Leave as false if the + product has limited stock + type: boolean + quantity: + description: Number of products in stock. Use if limited is true + type: integer + split_code: + description: The split code if sharing the transaction with partners + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + name: Cups + description: Environment friendly paper cups + price: 10000 + currency: NGN + ProductCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + variants_options: + type: array + items: {} + variants: + type: array + items: {} + name: + type: string + description: + type: string + currency: + type: string + price: + type: integer + quantity: + type: integer + type: + type: string + is_shippable: + type: boolean + unlimited: + type: boolean + files: + type: array + items: {} + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + integration: + type: integer + domain: + type: string + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + slug: + type: string + product_code: + type: string + quantity_sold: + type: integer + active: + type: boolean + deleted_at: + nullable: true + in_stock: + type: boolean + minimum_orderable: + type: integer + maximum_orderable: + type: integer + nullable: true + redirect_url: + type: string + nullable: true + low_stock_alert: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - variants_options + - variants + - name + - description + - currency + - price + - quantity + - type + - is_shippable + - unlimited + - files + - shipping_fields + - integration + - domain + - metadata + - slug + - product_code + - quantity_sold + - active + - deleted_at + - in_stock + - minimum_orderable + - maximum_orderable + - low_stock_alert + - id + - createdAt + - updatedAt + required: + - status + - message + - data + ProductFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + digital_assets: + type: array + items: {} + integration: + type: integer + name: + type: string + description: + type: string + product_code: + type: string + price: + type: integer + currency: + type: string + quantity: + type: integer + quantity_sold: + nullable: true + type: + type: string + files: + type: array + items: {} + file_path: + nullable: true + is_shippable: + type: boolean + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + unlimited: + type: boolean + domain: + type: string + active: + type: boolean + features: + nullable: true + in_stock: + type: boolean + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + slug: + type: string + success_message: + nullable: true + redirect_url: + nullable: true + split_code: + nullable: true + notification_emails: + nullable: true + minimum_orderable: + type: integer + maximum_orderable: + nullable: true + low_stock_alert: + type: boolean + stock_threshold: + nullable: true + expires_in: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - digital_assets + - integration + - name + - description + - product_code + - price + - currency + - quantity + - quantity_sold + - type + - files + - file_path + - is_shippable + - shipping_fields + - unlimited + - domain + - active + - features + - in_stock + - metadata + - slug + - success_message + - redirect_url + - split_code + - notification_emails + - minimum_orderable + - maximum_orderable + - low_stock_alert + - stock_threshold + - expires_in + - id + - createdAt + - updatedAt + required: + - status + - message + - data + ProductUpdate: + type: object + properties: + name: + description: Name of product + type: string + description: + description: The description of the product + type: string + price: + description: | + Price should be in kobo if currency is NGN, pesewas, if currency is GHS, + and cents, if currency is ZAR + type: integer + currency: + description: | + Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD + type: string + unlimited: + description: | + Set to true if the product has unlimited stock. Leave as false if the + product has limited stock + type: boolean + quantity: + description: Number of products in stock. Use if limited is true + type: integer + split_code: + description: The split code if sharing the transaction with partners + type: string + metadata: + description: JSON object of custom data + type: object + example: + name: Spoon + description: Environment friendly paper spoons + price: 5000 + currency: NGN + ProductUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + name: + type: string + description: + type: string + product_code: + type: string + price: + type: integer + currency: + type: string + quantity: + type: integer + quantity_sold: + type: integer + type: + type: string + files: + type: array + items: {} + file_path: + nullable: true + is_shippable: + type: boolean + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + unlimited: + type: boolean + domain: + type: string + active: + type: boolean + features: + nullable: true + in_stock: + type: boolean + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + slug: + type: string + success_message: + nullable: true + redirect_url: + nullable: true + split_code: + nullable: true + notification_emails: + nullable: true + minimum_orderable: + type: integer + maximum_orderable: + nullable: true + low_stock_alert: + type: boolean + stock_threshold: + nullable: true + expires_in: + nullable: true + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - name + - description + - product_code + - price + - currency + - quantity + - quantity_sold + - type + - files + - file_path + - is_shippable + - shipping_fields + - unlimited + - domain + - active + - features + - in_stock + - metadata + - slug + - success_message + - redirect_url + - split_code + - notification_emails + - minimum_orderable + - maximum_orderable + - low_stock_alert + - stock_threshold + - expires_in + - id + - integration + - createdAt + - updatedAt + required: + - status + - message + - data + ProductDeleteResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + StorefrontListResponseArray: + type: object + properties: + id: + type: integer + name: + type: string + slug: + type: string + orders_count: + type: integer + status: + type: string + revenue: + nullable: true + currency: + type: string + products: + type: array + items: {} + contacts: + type: array + items: {} + social_media: + type: array + items: {} + shipping_fees: + type: array + items: {} + required: + - id + - name + - slug + - orders_count + - status + - revenue + - currency + - products + - contacts + - social_media + - shipping_fees + StorefrontListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/StorefrontListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + StorefrontCreate: + type: object + required: + - name + - slug + - currency + properties: + name: + description: Name of the storefront + type: string + slug: + description: | + A unique identifier to access your store. Once the storefront is created, it can be accessed from https://paystack.shop/your-slug + type: string + currency: + description: Currency for prices of products in your storefront. + type: string + enum: + - GHS + - KES + - NGN + - USD + - ZAR + description: + description: The description of the storefront + type: string + example: + name: Obi and Sons + slug: obi_and_sons + currency: NGN + StorefrontContactsArray: + type: object + properties: + value: + type: string + id: + type: integer + type_name: + nullable: true + type: + type: integer + required: + - value + - id + - type_name + - type + StorefrontCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + social_media: + type: array + items: {} + contacts: + type: array + items: + $ref: '#/components/schemas/StorefrontContactsArray' + name: + type: string + slug: + type: string + currency: + type: string + welcome_message: + nullable: true + success_message: + nullable: true + redirect_url: + nullable: true + description: + nullable: true + delivery_note: + type: string + background_color: + type: string + status: + type: string + shippable: + type: boolean + integration: + type: integer + domain: + type: string + digital_product_expiry: + nullable: true + metadata: + type: object + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + products: + type: array + items: {} + shipping_fees: + type: array + items: {} + required: + - social_media + - contacts + - name + - slug + - currency + - welcome_message + - success_message + - redirect_url + - description + - delivery_note + - background_color + - status + - shippable + - integration + - domain + - digital_product_expiry + - id + - createdAt + - updatedAt + - products + - shipping_fees + required: + - status + - message + - data + StorefrontFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + social_media: + type: array + items: {} + contacts: + type: array + items: + $ref: '#/components/schemas/StorefrontContactsArray' + name: + type: string + slug: + type: string + currency: + type: string + welcome_message: + nullable: true + success_message: + nullable: true + redirect_url: + nullable: true + description: + nullable: true + delivery_note: + type: string + background_color: + type: string + status: + type: string + shippable: + type: boolean + integration: + type: integer + domain: + type: string + digital_product_expiry: + nullable: true + metadata: + type: object + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + products: + type: array + items: {} + shipping_fees: + type: array + items: {} + required: + - social_media + - contacts + - name + - slug + - currency + - welcome_message + - success_message + - redirect_url + - description + - delivery_note + - background_color + - status + - shippable + - integration + - domain + - digital_product_expiry + - id + - createdAt + - updatedAt + - products + - shipping_fees + meta: + type: object + properties: + product_count: + type: integer + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - product_count + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + StorefrontUpdate: + type: object + properties: + name: + description: Name of the storefront + type: string + slug: + description: | + A unique identifier to access your store. Once the storefront is created, it can be accessed from + https://paystack.shop/your-slug + type: string + description: + description: The description of the storefront + type: string + example: + description: Import and Export + StorefrontUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + StorefrontDeleteResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + StorefrontAddProducts: + type: object + required: + - products + properties: + products: + description: An array of product IDs + type: array + items: + type: integer + example: + products: + - 2196244 + - 2179824 + OrderItemsArray: + type: object + properties: + order_item_id: + type: integer + orderId: + type: integer + type: + type: string + item: + type: integer + current_total_items_price: + type: integer + files: + type: string + order: + type: integer + amount: + type: integer + quantity: + type: integer + createdAt: + type: string + name: + type: string + product_level_type: + type: string + product_id: + type: integer + product_success_message: + nullable: true + product_redirect_url: + nullable: true + IFNULL(p1.expires_in, p2.expires_in): + nullable: true + product_quantity_sold: + type: integer + product_notification_emails: + nullable: true + IFNULL(p1.metadata, p2.metadata): + type: string + storefront_redirect_url: + nullable: true + storefront_success_message: + nullable: true + required: + - order_item_id + - orderId + - type + - item + - current_total_items_price + - files + - order + - amount + - quantity + - createdAt + - name + - product_level_type + - product_id + - product_success_message + - product_redirect_url + - IFNULL(p1.expires_in, p2.expires_in) + - product_quantity_sold + - product_notification_emails + - IFNULL(p1.metadata, p2.metadata) + - storefront_redirect_url + - storefront_success_message + OrderListResponseArray: + type: object + properties: + id: + type: integer + order_code: + type: string + integration: + type: integer + domain: + type: string + currency: + type: string + amount: + type: integer + transaction: + type: integer + page: + nullable: true + customer: + type: integer + customer_name: + type: string + status: + type: string + shipping_address: + nullable: true + metadata: + type: string + created_at: + type: string + updated_at: + type: string + email: + type: string + paid_at: + type: string + shipping: + nullable: true + shipping_fees: + type: integer + refunded: + type: boolean + is_viewed: + type: boolean + refunded_amount: + nullable: true + discount_amount: + nullable: true + discounts: + nullable: true + items: + type: array + items: + $ref: '#/components/schemas/OrderItemsArray' + fully_refunded: + type: boolean + required: + - id + - order_code + - integration + - domain + - currency + - amount + - transaction + - page + - customer + - customer_name + - status + - shipping_address + - metadata + - created_at + - updated_at + - email + - paid_at + - shipping + - shipping_fees + - refunded + - is_viewed + - refunded_amount + - discount_amount + - discounts + - items + - fully_refunded + OrderListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/OrderListResponseArray' + meta: + type: object + properties: + total: + type: integer + revenue: + type: object + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - revenue + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + OrderItems: + type: object + description: The collection of items that make up the order + required: + - item + - type + - quantity + - amount + properties: + item: + description: The product ID of the item + type: integer + type: + description: The type of the item. `product` is currently the acceptable value + type: string + quantity: + description: The number of items to get + type: integer + amount: + description: The cost of the item + type: integer + example: + item: 2179824 + type: product + quantity: 200000 + amount: 2 + OrderShipping: + type: object + description: The shipping details of the order + required: + - street_line + - city + - state + - country + - shipping_fee + properties: + street_line: + description: The address of for the delivery + type: string + city: + description: The city of the delivery address + type: string + state: + description: The state of the delivery address + type: string + country: + description: The country of the delivery address + type: string + shipping_fee: + description: The cost of delivery + type: integer + delivery_note: + description: Extra details to be aware of for the delivery + type: string + example: + street_line: Somewhere on Earth + city: Atlantic + state: Pacific + country: Equator + shipping_fee: 10000 + OrderCreate: + type: object + required: + - email + - first_name + - last_name + - phone + - currency + - items + - shipping + properties: + email: + description: The email of the customer placing the order + type: string + first_name: + description: The customer's first name + type: string + last_name: + description: The customer's last name + type: string + phone: + description: The customer's mobile number + type: string + currency: + description: Currency in which amount is set + type: string + enum: + - GHS + - KES + - NGN + - USD + - ZAR + items: + type: array + items: + $ref: '#/components/schemas/OrderItems' + shipping: + $ref: '#/components/schemas/OrderShipping' + is_gift: + description: A flag to indicate if the order is for someone else + type: boolean + pay_for_me: + description: A flag to indicate if the someone else should pay for the order + type: boolean + example: + email: test@email.com + first_name: Demo + last_name: User + phone: '+2348031245678' + currency: NGN + items: + - item: 2179824 + type: product + quantity: 200000 + amount: 2 + shipping: + street_line: Somewhere on Earth + city: Atlantic + state: Pacific + country: Equator + shipping_fee: 10000 + OrderCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + discounts: + type: array + items: {} + currency: + type: string + shipping_address: + nullable: true + integration: + type: integer + domain: + type: string + email: + type: string + customer: + type: integer + amount: + type: integer + pay_for_me: + type: boolean + shipping: + type: object + properties: + customer: + type: integer + integration: + type: integer + domain: + type: string + fees: + type: integer + delivery_note: + nullable: true + street_line: + type: string + city: + type: string + state: + type: string + country: + type: string + is_shipped: + type: boolean + delivery_tracking_link: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - customer + - integration + - domain + - fees + - delivery_note + - street_line + - city + - state + - country + - is_shipped + - delivery_tracking_link + - id + - createdAt + - updatedAt + nullable: true + shipping_fees: + type: integer + shipping_method: + type: object + properties: + region: + type: string + fee: + type: integer + currency: + type: string + required: + - region + - fee + - currency + metadata: + type: object + order_code: + type: string + status: + type: string + refunded: + type: boolean + is_viewed: + type: boolean + expiration_date: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + items: + type: array + items: {} + pay_for_me_code: + type: string + discount_amount: + type: integer + required: + - discounts + - currency + - shipping_address + - integration + - domain + - email + - customer + - amount + - pay_for_me + - shipping + - shipping_fees + - metadata + - order_code + - status + - refunded + - is_viewed + - expiration_date + - id + - createdAt + - updatedAt + - items + - pay_for_me_code + - discount_amount + required: + - status + - message + - data + OrderFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + discounts: + type: array + items: {} + order_code: + type: string + domain: + type: string + currency: + type: string + amount: + type: integer + email: + type: string + status: + type: string + refunded: + type: boolean + paid_at: + type: string + shipping_address: + nullable: true + metadata: + type: object + shipping_fees: + type: integer + shipping_method: + nullable: true + is_viewed: + type: boolean + expiration_date: + type: string + pay_for_me: + type: boolean + id: + type: integer + integration: + type: integer + page: + nullable: true + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + shipping: + nullable: true + createdAt: + type: string + updatedAt: + type: string + transaction: + type: integer + is_gift: + type: boolean + payer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + fully_refunded: + type: boolean + refunded_amount: + type: integer + items: + type: array + items: + $ref: '#/components/schemas/OrderItemsArray' + discount_amount: + nullable: true + required: + - discounts + - order_code + - domain + - currency + - amount + - email + - status + - refunded + - paid_at + - shipping_address + - metadata + - shipping_fees + - shipping_method + - is_viewed + - expiration_date + - pay_for_me + - id + - integration + - page + - customer + - shipping + - createdAt + - updatedAt + - transaction + - is_gift + - payer + - fully_refunded + - refunded_amount + - items + - discount_amount + required: + - status + - message + - data + OrderFetchProductResponseArray: + type: object + properties: + order_id: + type: integer + transaction: + type: integer + order_code: + type: string + customer: + type: integer + first_name: + type: string + last_name: + type: string + customer_name: + type: string + phone: + type: string + email: + type: string + product_code: + type: string + product_id: + type: integer + product_name: + type: string + price: + type: integer + quantity_sold: + type: integer + currency: + type: string + quantity: + type: integer + variant_id: + nullable: true + variant_price: + nullable: true + variant_code: + nullable: true + amount: + type: integer + shipping_method: + nullable: true + status: + type: string + shipping_address: + nullable: true + refunded: + type: boolean + shipping: + nullable: true + paid_at: + type: string + created_at: + type: string + is_shipped: + type: boolean + is_viewed: + type: integer + delivery_note: + nullable: true + shipping_fee: + nullable: true + amount_paid: + type: integer + storefront_slug: + type: string + required: + - order_id + - transaction + - order_code + - customer + - first_name + - last_name + - customer_name + - phone + - email + - product_code + - product_id + - product_name + - price + - quantity_sold + - currency + - quantity + - variant_id + - variant_price + - variant_code + - amount + - shipping_method + - status + - shipping_address + - refunded + - shipping + - paid_at + - created_at + - is_shipped + - is_viewed + - delivery_note + - shipping_fee + - amount_paid + - storefront_slug + OrderFetchProductResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/OrderFetchProductResponseArray' + meta: + type: object + properties: + quantity_sold: + type: integer + revenue: + type: integer + total: + type: integer + skipped: + type: integer + perPage: + type: integer + pageCount: + type: integer + required: + - quantity_sold + - revenue + - total + - skipped + - perPage + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + OrderValidateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + order_code: + type: string + domain: + type: string + currency: + type: string + amount: + type: integer + email: + type: string + status: + type: string + refunded: + type: boolean + paid_at: + nullable: true + shipping_address: + nullable: true + metadata: + nullable: true + shipping_fees: + type: integer + shipping_method: + nullable: true + is_viewed: + type: boolean + expiration_date: + type: string + pay_for_me: + type: boolean + id: + type: integer + integration: + type: object + properties: + key: + type: string + name: + type: string + logo: + type: string + allowed_currencies: + type: array + items: {} + required: + - key + - name + - logo + - allowed_currencies + transaction: + nullable: true + page: + nullable: true + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + shipping: + nullable: true + createdAt: + type: string + updatedAt: + type: string + payer: + nullable: true + required: + - order_code + - domain + - currency + - amount + - email + - status + - refunded + - paid_at + - shipping_address + - metadata + - shipping_fees + - shipping_method + - is_viewed + - expiration_date + - pay_for_me + - id + - integration + - transaction + - page + - customer + - shipping + - createdAt + - updatedAt + - payer + required: + - status + - message + - data + PageListResponseArray: + type: object + properties: + integration: + type: integer + plan: + nullable: true + domain: + type: string + name: + type: string + description: + type: string + nullable: true + amount: + type: integer + nullable: true + currency: + type: string + slug: + type: string + custom_fields: + type: array + nullable: true + items: {} + type: + type: string + redirect_url: + type: string + nullable: true + success_message: + type: string + nullable: true + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: + nullable: true + metadata: + type: object + nullable: true + split_code: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - plan + - domain + - name + - description + - amount + - currency + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email + - metadata + - split_code + - id + - createdAt + - updatedAt + PageListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/PageListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + PageCreate: + type: object + required: + - name + properties: + name: + description: Name of page + type: string + description: + description: The description of the page + type: string + amount: + description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR + type: integer + currency: + description: The transaction currency. Defaults to your integration currency. + type: string + enum: + - NGN + - GHS + - ZAR + - KES + - USD + slug: + description: URL slug you would like to be associated with this page. Page will be accessible at `https://paystack.com/pay/[slug]` + type: string + type: + description: | + The type of payment page to create. Defaults to `payment` if no type is specified. + type: string + enum: + - payment + - subscription + - product + - plan + plan: + description: The ID of the plan to subscribe customers on this payment page to when `type` is set to `subscription`. + type: string + fixed_amount: + description: Specifies whether to collect a fixed amount on the payment page. If true, `amount` must be passed. + type: boolean + split_code: + description: The split code of the transaction split. e.g. `SPL_98WF13Eb3w` + type: string + metadata: + description: JSON object of custom data + type: object + redirect_url: + description: | + If you would like Paystack to redirect to a URL upon successful payment, specify the URL here. + type: string + success_message: + description: | + A success message to display to the customer after a successful transaction + type: string + notification_email: + description: | + An email address that will receive transaction notifications for this payment page + type: string + collect_phone: + description: | + Specify whether to collect phone numbers on the payment page + type: boolean + custom_fields: + description: If you would like to accept custom fields, specify them here. + type: array + items: + type: object + example: + name: Extra Charges + amount: 200000 + PageCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + name: + type: string + integration: + type: integer + domain: + type: string + slug: + type: string + currency: + type: string + type: + type: string + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - name + - integration + - domain + - slug + - currency + - type + - collect_phone + - active + - published + - migrate + - id + - createdAt + - updatedAt + required: + - status + - message + - data + PageFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + domain: + type: string + name: + type: string + description: + nullable: true + amount: + type: integer + nullable: true + currency: + type: string + slug: + type: string + custom_fields: + nullable: true + type: + type: string + redirect_url: + nullable: true + success_message: + nullable: true + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: + nullable: true + metadata: + nullable: true + split_code: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - domain + - name + - description + - amount + - currency + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email + - metadata + - split_code + - id + - createdAt + - updatedAt + required: + - status + - message + - data + PageUpdate: + type: object + properties: + name: + description: Name of page + type: string + description: + description: The description of the page + type: string + amount: + description: Amount should be in the subunit of the currency + type: integer + active: + description: Set to false to deactivate page url + type: boolean + example: + name: Backyard Sale + PageUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + domain: + type: string + name: + type: string + description: + nullable: true + amount: + nullable: true + currency: + type: string + slug: + type: string + custom_fields: + nullable: true + type: + type: string + redirect_url: + nullable: true + success_message: + nullable: true + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: + nullable: true + metadata: + nullable: true + split_code: + nullable: true + id: + type: integer + integration: + type: integer + plan: + nullable: true + createdAt: + type: string + updatedAt: + type: string + required: + - domain + - name + - description + - amount + - currency + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email + - metadata + - split_code + - id + - integration + - plan + - createdAt + - updatedAt + required: + - status + - message + - data + PageCheckSlugAvailabilityResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + PageProduct: + type: object + required: + - products + properties: + products: + description: A list of IDs of products to add to a page. + type: array + items: + type: integer + example: + products: + - 2196244 + - 2179824 + PageProductsArray: + type: object + properties: + product_id: + type: integer + name: + type: string + description: + type: string + product_code: + type: string + page: + type: integer + price: + type: integer + currency: + type: string + quantity: + type: integer + type: + type: string + features: + nullable: true + is_shippable: + type: integer + domain: + type: string + integration: + type: integer + active: + type: integer + in_stock: + type: integer + required: + - product_id + - name + - description + - product_code + - page + - price + - currency + - quantity + - type + - features + - is_shippable + - domain + - integration + - active + - in_stock + PageAddProductsResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + plan: + nullable: true + domain: + type: string + name: + type: string + description: + nullable: true + amount: + nullable: true + currency: + type: string + slug: + type: string + custom_fields: + nullable: true + type: + type: string + redirect_url: + nullable: true + success_message: + nullable: true + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: + nullable: true + metadata: + nullable: true + split_code: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + products: + type: array + items: + $ref: '#/components/schemas/PageProductsArray' + required: + - integration + - plan + - domain + - name + - description + - amount + - currency + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email + - metadata + - split_code + - id + - createdAt + - updatedAt + - products + required: + - status + - message + - data + ControlPanelFetchPaymentSessionTimeoutResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + payment_session_timeout: + type: integer + required: + - payment_session_timeout + required: + - status + - message + - data + PaymentSession: + type: object + required: + - timeout + properties: + timeout: + description: Time in seconds before a transaction becomes invalid + type: integer + example: 30 + ControlPanelUpdatePaymentSessionTimeoutResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + payment_session_timeout: + type: integer + required: + - payment_session_timeout + required: + - status + - message + - data + RefundListResponseArray: + type: object + properties: + integration: + type: integer + transaction: + type: integer + dispute: + nullable: true + settlement: + nullable: true + id: + type: integer + domain: + type: string + currency: + type: string + amount: + type: integer + status: + type: string + refunded_at: + nullable: true + refunded_by: + type: string + customer_note: + type: string + merchant_note: + type: string + deducted_amount: + type: integer + fully_deducted: + type: integer + createdAt: + type: string + bank_reference: + nullable: true + transaction_reference: + type: string + reason: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + refund_type: + type: string + transaction_amount: + type: integer + initiated_by: + type: string + refund_channel: + type: string + session_id: + nullable: true + collect_account_number: + type: boolean + required: + - integration + - transaction + - dispute + - settlement + - id + - domain + - currency + - amount + - status + - refunded_at + - refunded_by + - customer_note + - merchant_note + - deducted_amount + - fully_deducted + - createdAt + - bank_reference + - transaction_reference + - reason + - customer + - refund_type + - transaction_amount + - initiated_by + - refund_channel + - session_id + - collect_account_number + RefundListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/RefundListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: string + page: + type: integer + pageCount: + type: integer + failedRefundCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + - failedRefundCount + additionalProperties: false + required: + - status + - message + - data + - meta + RefundCreate: + type: object + required: + - transaction + properties: + transaction: + description: The reference of a previosuly completed transaction + type: string + amount: + description: Amount to be refunded to the customer. It cannot be more than the original transaction amount + type: integer + currency: + description: Three-letter ISO currency + type: string + enum: + - GHS + - KES + - NGN + - USD + - ZAR + customer_note: + description: Customer reason + type: string + merchant_note: + description: Merchant reason + type: string + example: + transaction: mpkr39h74k + RefundCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + reference: + type: string + amount: + type: integer + paid_at: + type: string + channel: + type: string + currency: + type: string + authorization: + type: object + properties: + exp_month: + nullable: true + exp_year: + nullable: true + account_name: + nullable: true + required: + - exp_month + - exp_year + - account_name + customer: + type: object + properties: + international_format_phone: + type: string + nullable: true + required: + - international_format_phone + plan: + type: object + subaccount: + type: object + properties: + currency: + nullable: true + required: + - currency + split: + type: object + order_id: + nullable: true + paidAt: + type: string + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + required: + - id + - domain + - reference + - amount + - paid_at + - channel + - currency + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - pos_transaction_data + - source + - fees_breakdown + integration: + type: integer + deducted_amount: + type: integer + channel: + nullable: true + merchant_note: + type: string + customer_note: + type: string + status: + type: string + refunded_by: + type: string + expected_at: + type: string + currency: + type: string + domain: + type: string + amount: + type: integer + fully_deducted: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - transaction + - integration + - deducted_amount + - channel + - merchant_note + - customer_note + - status + - refunded_by + - expected_at + - currency + - domain + - amount + - fully_deducted + - id + - createdAt + - updatedAt + required: + - status + - message + - data + RefundRetryAccountDetails: + type: object + description: An object that contains the customer’s account details for refund + required: + - currency + - account_number + - bank_id + properties: + currency: + description: The currency of the customer's bank account. It should be the same as the currency the payment was made + type: string + account_number: + description: The customer's account number + type: string + bank_id: + description: The ID representing the customer's bank. You can get the list of bank IDs by calling the List Banks endpoint. + type: string + example: + currency: NGN + account_number: '1234567890' + bank_id: '9' + RefundRetry: + type: object + required: + - refund_account_details + properties: + refund_account_details: + $ref: '#/components/schemas/RefundRetryAccountDetails' + RefundRetryResponse: + title: Generated schema for Root + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: number + transaction: + type: number + dispute: + type: object + settlement: + type: object + id: + type: number + domain: + type: string + currency: + type: string + amount: + type: number + status: + type: string + refunded_at: + type: string + nullable: true + expected_at: + type: string + channel: + type: string + refunded_by: + type: string + customer_note: + type: string + merchant_note: + type: string + deducted_amount: + type: number + fully_deducted: + type: boolean + bank_reference: + type: string + nullable: true + reason: + type: string + customer: + type: object + initiated_by: + type: string + reversed_at: + type: string + nullable: true + session_id: + type: string + nullable: true + required: + - integration + - transaction + - dispute + - settlement + - id + - domain + - currency + - amount + - status + - refunded_at + - expected_at + - channel + - refunded_by + - customer_note + - merchant_note + - deducted_amount + - fully_deducted + - bank_reference + - reason + - customer + - initiated_by + - reversed_at + - session_id + required: + - status + - message + - data + RefundFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + transaction: + type: integer + dispute: + nullable: true + settlement: + nullable: true + id: + type: integer + domain: + type: string + currency: + type: string + amount: + type: integer + status: + type: string + refunded_at: + nullable: true + refunded_by: + type: string + customer_note: + type: string + merchant_note: + type: string + deducted_amount: + type: integer + fully_deducted: + type: integer + createdAt: + type: string + bank_reference: + nullable: true + transaction_reference: + type: string + reason: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + refund_type: + type: string + transaction_amount: + type: integer + initiated_by: + type: string + refund_channel: + type: string + session_id: + nullable: true + collect_account_number: + type: boolean + required: + - integration + - transaction + - dispute + - settlement + - id + - domain + - currency + - amount + - status + - refunded_at + - refunded_by + - customer_note + - merchant_note + - deducted_amount + - fully_deducted + - createdAt + - bank_reference + - transaction_reference + - reason + - customer + - refund_type + - transaction_amount + - initiated_by + - refund_channel + - session_id + - collect_account_number + required: + - status + - message + - data + DisputeHistoryArray: + type: object + properties: + status: + type: string + by: + type: string + createdAt: + type: string + required: + - status + - by + - createdAt + DisputeMessagesArray: + type: object + properties: + sender: + type: string + body: + type: string + createdAt: + type: string + required: + - sender + - body + - createdAt + DisputeListResponseArray: + type: object + properties: + id: + type: integer + refund_amount: + type: integer + currency: + type: string + status: + type: string + resolution: + nullable: true + domain: + type: string + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + customer: + nullable: true + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - pos_transaction_data + - source + - fees_breakdown + - connect + transaction_reference: + nullable: true + category: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + bin: + type: string + last4: + type: string + dueAt: + nullable: true + resolvedAt: + nullable: true + evidence: + nullable: true + attachments: + nullable: true + note: + nullable: true + history: + type: array + items: + $ref: '#/components/schemas/DisputeHistoryArray' + messages: + type: array + items: + $ref: '#/components/schemas/DisputeMessagesArray' + createdAt: + type: string + updatedAt: + type: string + required: + - id + - refund_amount + - currency + - status + - resolution + - domain + - transaction + - transaction_reference + - category + - customer + - bin + - last4 + - dueAt + - resolvedAt + - evidence + - attachments + - note + - history + - messages + - createdAt + - updatedAt + DisputeListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/DisputeListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + DisputeFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + refund_amount: + type: integer + currency: + type: string + status: + type: string + resolution: + nullable: true + domain: + type: string + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + type: integer + nullable: true + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + international_format_phone: + nullable: true + required: + - international_format_phone + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + transaction_reference: + nullable: true + category: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + bin: + type: string + last4: + type: string + dueAt: + nullable: true + resolvedAt: + nullable: true + evidence: + nullable: true + attachments: + nullable: true + note: + nullable: true + history: + type: array + items: + $ref: '#/components/schemas/DisputeHistoryArray' + messages: + type: array + items: + $ref: '#/components/schemas/DisputeMessagesArray' + createdAt: + type: string + updatedAt: + type: string + required: + - id + - refund_amount + - currency + - status + - resolution + - domain + - transaction + - transaction_reference + - category + - customer + - bin + - last4 + - dueAt + - resolvedAt + - evidence + - attachments + - note + - history + - messages + - createdAt + - updatedAt + required: + - status + - message + - data + DisputeUpdate: + type: object + required: + - refund_amount + properties: + refund_amount: + description: The amount to refund, in the subunit of your currency + type: integer + uploaded_filename: + description: Filename of attachment returned via response from the Dispute upload URL + type: string + example: + refund_amount: 50000 + DisputeUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + refund_amount: + type: integer + currency: + type: string + status: + type: string + resolution: + nullable: true + domain: + type: string + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + type: integer + nullable: true + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + international_format_phone: + nullable: true + required: + - international_format_phone + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + transaction_reference: + nullable: true + category: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + bin: + type: string + last4: + type: string + dueAt: + nullable: true + resolvedAt: + nullable: true + evidence: + nullable: true + attachments: + nullable: true + note: + nullable: true + history: + type: array + items: + $ref: '#/components/schemas/DisputeHistoryArray' + messages: + type: array + items: + $ref: '#/components/schemas/DisputeMessagesArray' + createdAt: + type: string + updatedAt: + type: string + required: + - id + - refund_amount + - currency + - status + - resolution + - domain + - transaction + - transaction_reference + - category + - customer + - bin + - last4 + - dueAt + - resolvedAt + - evidence + - attachments + - note + - history + - messages + - createdAt + - updatedAt + required: + - status + - message + - data + DisputeUploadURLResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + signedUrl: + type: string + fileName: + type: string + required: + - signedUrl + - fileName + required: + - status + - message + - data + DisputeExportResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + path: + type: string + expiresAt: + type: string + required: + - path + - expiresAt + required: + - status + - message + - data + DisputeListTransactionResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + history: + type: array + items: + $ref: '#/components/schemas/DisputeHistoryArray' + messages: + type: array + items: + $ref: '#/components/schemas/DisputeMessagesArray' + currency: + type: string + last4: + type: string + bin: + type: string + transaction_reference: + nullable: true + merchant_transaction_reference: + type: string + refund_amount: + type: integer + status: + type: string + domain: + type: string + resolution: + nullable: true + category: + type: string + note: + nullable: true + attachments: + nullable: true + id: + type: integer + integration: + type: integer + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + type: integer + nullable: true + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + international_format_phone: + nullable: true + required: + - international_format_phone + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + type: object + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + created_by: + type: integer + evidence: + nullable: true + resolvedAt: + nullable: true + createdAt: + type: string + updatedAt: + type: string + dueAt: + nullable: true + required: + - history + - messages + - currency + - last4 + - bin + - transaction_reference + - merchant_transaction_reference + - refund_amount + - status + - domain + - resolution + - category + - note + - attachments + - id + - integration + - transaction + - created_by + - evidence + - resolvedAt + - createdAt + - updatedAt + - dueAt + required: + - status + - message + - data + DisputeResolve: + type: object + required: + - resolution + - message + - refund_amount + - uploaded_filename + properties: + resolution: + description: Dispute resolution. Accepted values, merchant-accepted, declined + type: string + message: + description: Reason for resolving + type: string + refund_amount: + description: The amount to refund, in the subunit of your integration currency + type: integer + uploaded_filename: + description: Filename of attachment returned via response from the Dispute upload URL + type: string + evidence: + description: Evidence Id for fraud claims + type: integer + example: + resolution: merchant-accepted + message: Merchant accepted + refund_amount: 50000 + uploaded_filename: qesp8a4df1xejihd9x5q + DisputeResolveResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + currency: + type: string + last4: + type: string + bin: + type: string + transaction_reference: + nullable: true + merchant_transaction_reference: + type: string + refund_amount: + type: integer + status: + type: string + domain: + type: string + resolution: + type: string + category: + type: string + note: + nullable: true + attachments: + type: string + id: + type: integer + integration: + type: integer + transaction: + type: integer + created_by: + type: integer + evidence: + type: integer + resolvedAt: + type: string + createdAt: + type: string + updatedAt: + type: string + dueAt: + nullable: true + message: + type: object + properties: + dispute: + type: integer + sender: + type: string + body: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - dispute + - sender + - body + - id + - createdAt + - updatedAt + required: + - currency + - last4 + - bin + - transaction_reference + - merchant_transaction_reference + - refund_amount + - status + - domain + - resolution + - category + - note + - attachments + - id + - integration + - transaction + - created_by + - evidence + - resolvedAt + - createdAt + - updatedAt + - dueAt + - message + required: + - status + - message + - data + DisputeEvidence: + type: object + required: + - customer_email + - customer_name + - customer_phone + - service_details + properties: + customer_email: + description: Customer email + type: string + customer_name: + description: Customer name + type: string + customer_phone: + description: Customer mobile number + type: string + service_details: + description: Details of service offered + type: string + delivery_address: + description: Delivery address + type: string + delivery_date: + description: ISO 8601 representation of delivery date (YYYY-MM-DD) + type: string + format: date-time + example: + customer_email: customer@email.com + customer_name: Mensah King + customer_phone: '08012345678' + service_details: claim for buying cups + DisputeAddEvidenceResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + customer_email: + type: string + customer_name: + type: string + customer_phone: + type: string + service_details: + type: string + delivery_address: + type: string + delivery_date: + type: string + dispute: + type: integer + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - customer_email + - customer_name + - customer_phone + - service_details + - delivery_address + - delivery_date + - dispute + - id + - createdAt + - updatedAt + required: + - status + - message + - data + MiscellaneousListBanksResponseArray: + type: object + properties: + name: + type: string + slug: + type: string + code: + type: string + longcode: + type: string + gateway: + type: string + nullable: true + pay_with_bank: + type: boolean + supports_transfer: + type: boolean + available_for_direct_debit: + type: boolean + active: + type: boolean + is_deleted: + type: boolean + nullable: true + country: + type: string + currency: + type: string + type: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - name + - slug + - code + - longcode + - gateway + - pay_with_bank + - supports_transfer + - available_for_direct_debit + - active + - is_deleted + - country + - currency + - type + - id + - createdAt + - updatedAt + MiscellaneousListBanksResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/MiscellaneousListBanksResponseArray' + required: + - status + - message + - data + VerificationResolveAccountNumberResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + account_number: + type: string + account_name: + type: string + bank_id: + type: integer + required: + - account_number + - account_name + - bank_id + required: + - status + - message + - data + BankValidateRequest: + type: object + required: + - account_name + - account_number + - account_type + - bank_code + - country_code + - document_type + properties: + account_name: + description: Customer's first and last name registered with their bank + type: string + account_number: + description: Customer's account number + type: string + account_type: + description: The type of the customer's account number + type: string + enum: + - personal + - business + bank_code: + description: The bank code of the customer’s bank. You can fetch the bank codes by using our List Banks endpoint + type: string + country_code: + description: The two digit ISO code of the customer’s bank + type: string + document_type: + description: Customer’s mode of identity + type: string + enum: + - identityNumber + - passportNumber + - businessRegistrationNumber + document_number: + description: Customer’s mode of identity number + type: string + example: + account_name: Ann Bron + account_number: '0123456789' + account_type: personal + bank_code: '632005' + country_code: ZA + document_type: identityNumber + document_number: '1234567890123' + VerificationValidateAccountResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + verified: + type: boolean + verificationMessage: + type: string + accountAcceptsDebits: + type: boolean + accountAcceptsCredits: + type: boolean + accountOpenForMoreThanThreeMonths: + type: boolean + accountHolderMatch: + type: boolean + accountOpen: + type: boolean + required: + - verified + - verificationMessage + - accountAcceptsDebits + - accountAcceptsCredits + - accountOpenForMoreThanThreeMonths + - accountHolderMatch + - accountOpen + required: + - status + - message + - data + VerificationResolveCardBINResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + bin: + type: string + brand: + type: string + sub_brand: + type: string + country_code: + type: string + country_name: + type: string + card_type: + type: string + bank: + type: string + currency: + type: string + linked_bank_id: + type: integer + required: + - bin + - brand + - sub_brand + - country_code + - country_name + - card_type + - bank + - currency + - linked_bank_id + required: + - status + - message + - data + MiscellaneousListCountriesResponseArray: + type: object + properties: + id: + type: integer + active_for_dashboard_onboarding: + type: boolean + name: + type: string + iso_code: + type: string + default_currency_code: + type: string + integration_defaults: + type: object + calling_code: + type: string + pilot_mode: + type: boolean + relationships: + type: object + properties: + currency: + type: object + properties: + type: + type: string + data: + type: array + items: + type: string + supported_currencies: + type: object + properties: + NGN: + type: object + properties: + bank: + type: object + properties: + bank_type: + type: string + branch_code: + type: boolean + branch_code_type: + type: string + account_name: + type: boolean + account_verification_required: + type: boolean + account_number_label: + type: string + account_number_pattern: + type: object + properties: + exact_match: + type: boolean + pattern: + type: string + required: + - exact_match + - pattern + documents: + type: array + items: {} + show_account_number_tooltip: + type: boolean + required: + - bank_type + - branch_code + - branch_code_type + - account_name + - account_verification_required + - account_number_label + - account_number_pattern + - documents + - show_account_number_tooltip + required: + - bank + USD: + type: object + properties: + bank: + type: object + properties: + bank_type: + type: string + required_fields: + type: array + items: + type: string + branch_code: + type: boolean + branch_code_type: + type: string + account_name: + type: boolean + account_verification_required: + type: boolean + account_number_label: + type: string + account_number_pattern: + type: object + properties: + exact_match: + type: boolean + pattern: + type: string + required: + - exact_match + - pattern + documents: + type: array + items: {} + notices: + type: array + items: + type: string + required: + - bank_type + - required_fields + - branch_code + - branch_code_type + - account_name + - account_verification_required + - account_number_label + - account_number_pattern + - documents + - notices + required: + - bank + required: + - NGN + - USD + required: + - type + - data + - supported_currencies + integration_feature: + type: object + properties: + type: + type: string + data: + type: array + items: {} + required: + - type + - data + integration_type: + type: object + properties: + type: + type: string + data: + type: array + items: + type: string + required: + - type + - data + payment_method: + type: object + properties: + type: + type: string + data: + type: array + items: + type: string + required: + - type + - data + required: + - currency + - integration_feature + - integration_type + - payment_method + required: + - id + - active_for_dashboard_onboarding + - name + - iso_code + - default_currency_code + - integration_defaults + - calling_code + - pilot_mode + - relationships + MiscellaneousListCountriesResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/MiscellaneousListCountriesResponseArray' + required: + - status + - message + - data + MiscellaneousListStatesResponseArray: + type: object + properties: + name: + type: string + slug: + type: string + abbreviation: + type: string + required: + - name + - slug + - abbreviation + MiscellaneousListStatesResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/MiscellaneousListStatesResponseArray' + required: + - status + - message + - data + responses: + TransactionInitializeBadRequestResponse: + description: Responses from the Transaction Initialize endpoint + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionInitializeBadRequestModel' + Unauthorized: + description: Unauthorized operation + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: false + message: Invalid key + NotFound: + description: Entity not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: false + message: Entity not found + Ok: + description: Request successful + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + TerminalGetStatusSuccess: + description: Terminal Get Status response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalGetStatusResponse' + TerminalListsSuccess: + description: Terminal Lists response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalListsResponse' + TerminalGetSuccess: + description: Terminal Get response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalGetResponse' + TerminalUpdateSuccess: + description: Terminal Update response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalUpdateResponse' + TerminalCommissionDeviceSuccess: + description: Terminal Commission Device response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalCommissionDeviceResponse' + TerminalDecommissionDeviceSuccess: + description: Terminal Decommission Device response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalDecommissionDeviceResponse' + VirtualTerminalListSuccess: + description: Virtual Terminal Lists response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalListResponse' + VirtualTerminalCreateSuccess: + description: Virtual Terminal Create response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalCreateResponse' + VirtualTerminalFetchSuccess: + description: Virtual Terminal Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalFetchResponse' + VirtualTerminalUpdateSuccess: + description: Virtual Terminal Update response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalUpdateResponse' + VirtualTerminalDeactivateSuccess: + description: Virtual Terminal Deactivate response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDeactivateResponse' + VirtualTerminalDestinationAssignSuccess: + description: Virtual Terminal Deactivate response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationAssignResponse' + VirtualTerminalDestinationUnassignSuccess: + description: Virtual Terminal unassign response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationUnassignResponse' + VirtualTerminalAddSplitCodeSuccess: + description: Virtual Terminal Split Assign response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalAddSplitCodeResponse' + VirtualTerminalDeleteSplitCodeSuccess: + description: Virtual Terminal Split Remove response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDeleteSplitCodeResponse' + CustomerAuthorizationInitializeSuccess: + description: Customer Authorization Initialize response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAuthorizationInitializeResponse' + CustomerAuthorizationVerifySuccess: + description: Customer Authorization Verify response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAuthorizationVerifyResponse' + CustomerInitializeDirectDebitSuccess: + description: Customer Initialize Direct Debit response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerInitializeDirectDebitResponse' + CustomerDirectDebitActivationChargeSuccess: + description: Customer Direct Debit Activation Charge response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerDirectDebitActivationChargeResponse' + CustomerFetchMandateAuthorizationsSuccess: + description: Customer Fetch Mandate Authorizations response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerFetchMandateAuthorizationsResponse' + DirectDebitActivationChargeSuccess: + description: Direct Debit Activation Charge response + content: + application/json: + schema: + $ref: '#/components/schemas/DirectDebitActivationChargeResponse' + ApplePayOkResponse: + description: Responses from the Transaction Initialize endpoint + content: + application/json: + schema: + $ref: '#/components/schemas/ApplePayCreateOkModel' + PlanListSuccess: + description: Plan List response + content: + application/json: + schema: + $ref: '#/components/schemas/PlanListResponse' + PlanCreateSuccess: + description: Plan Create response + content: + application/json: + schema: + $ref: '#/components/schemas/PlanCreateResponse' + PlanFetchSuccess: + description: Plan Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/PlanFetchResponse' + PlanUpdateSuccess: + description: Plan Update response + content: + application/json: + schema: + $ref: '#/components/schemas/PlanUpdateResponse' + SubscriptionListSuccess: + description: Subscription List response + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionListResponse' + SubscriptionCreateSuccess: + description: Subscription Create response + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionCreateResponse' + SubscriptionFetchSuccess: + description: Subscription Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionFetchResponse' + SubscriptionDisableSuccess: + description: Subscription Disable response + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionDisableResponse' + PaymentRequestListSuccess: + description: Payment Request List response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestListResponse' + PaymentRequestCreateSuccess: + description: Payment Request Create response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestCreateResponse' + PaymentRequestUpdateSuccess: + description: Payment Request Update response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestUpdateResponse' + PaymentRequestVerifySuccess: + description: Payment Request Verify response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestVerifyResponse' + PaymentRequestSendNotificationSuccess: + description: Payment Request Send Notification response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestSendNotificationResponse' + PaymentRequestTotalSuccess: + description: Payment Request Total response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestTotalResponse' + PaymentRequestFinalizeSuccess: + description: Payment Request Finalize response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestFinalizeResponse' + PaymentRequestArchiveSuccess: + description: Payment Request Archive response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestArchiveResponse' + ProductListsSuccess: + description: Product Lists response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductListsResponse' + ProductCreateSuccess: + description: Product Create response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductCreateResponse' + ProductFetchSuccess: + description: Product Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductFetchResponse' + ProductUpdateSuccess: + description: Product Update response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductUpdateResponse' + ProductDeleteSuccess: + description: Product Delete response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductDeleteResponse' + StorefrontListSuccess: + description: Storefront List response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontListResponse' + StorefrontCreateSuccess: + description: Storefront Create response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontCreateResponse' + StorefrontFetchSuccess: + description: Storefront Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontFetchResponse' + StorefrontUpdateSuccess: + description: Storefront Update response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontUpdateResponse' + StorefrontDeleteSuccess: + description: Storefront Delete response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontDeleteResponse' + OrderListSuccess: + description: Order List response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderListResponse' + OrderCreateSuccess: + description: Order Create response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderCreateResponse' + OrderFetchSuccess: + description: Order Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderFetchResponse' + OrderFetchProductSuccess: + description: Order Fetch Product response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderFetchProductResponse' + OrderValidateSuccess: + description: Order Validate response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderValidateResponse' + PageListSuccess: + description: Page List response + content: + application/json: + schema: + $ref: '#/components/schemas/PageListResponse' + PageCreateSuccess: + description: Page Create response + content: + application/json: + schema: + $ref: '#/components/schemas/PageCreateResponse' + PageFetchSuccess: + description: Page Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/PageFetchResponse' + PageUpdateSuccess: + description: Page Update response + content: + application/json: + schema: + $ref: '#/components/schemas/PageUpdateResponse' + PageCheckSlugAvailabilitySuccess: + description: Page Check Slug Availability response + content: + application/json: + schema: + $ref: '#/components/schemas/PageCheckSlugAvailabilityResponse' + PageAddProductsSuccess: + description: Page Add Products response + content: + application/json: + schema: + $ref: '#/components/schemas/PageAddProductsResponse' + RefundListSuccess: + description: Refund List response + content: + application/json: + schema: + $ref: '#/components/schemas/RefundListResponse' + RefundCreateSuccess: + description: Refund Create response + content: + application/json: + schema: + $ref: '#/components/schemas/RefundCreateResponse' + RefundRetrySuccess: + description: Refund Create response + content: + application/json: + schema: + $ref: '#/components/schemas/RefundRetryResponse' + RefundFetchSuccess: + description: Refund Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/RefundFetchResponse' + DisputeListSuccess: + description: Dispute List response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeListResponse' + DisputeFetchSuccess: + description: Dispute Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeFetchResponse' + DisputeUpdateSuccess: + description: Dispute Update response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeUpdateResponse' + DisputeUploadURLSuccess: + description: Dispute Upload URL response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeUploadURLResponse' + DisputeExportSuccess: + description: Dispute Export response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeExportResponse' + DisputeListTransactionSuccess: + description: Dispute List Transaction response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeListTransactionResponse' + DisputeResolveSuccess: + description: Dispute Resolve response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeResolveResponse' + DisputeAddEvidenceSuccess: + description: Dispute Add Evidence response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeAddEvidenceResponse' + MiscellaneousListBanksSuccess: + description: Miscellaneous List Banks response + content: + application/json: + schema: + $ref: '#/components/schemas/MiscellaneousListBanksResponse' + VerificationResolveAccountNumberSuccess: + description: Verification Resolve Account Number response + content: + application/json: + schema: + $ref: '#/components/schemas/VerificationResolveAccountNumberResponse' + VerificationValidateAccountSuccess: + description: Verification Validate Account response + content: + application/json: + schema: + $ref: '#/components/schemas/VerificationValidateAccountResponse' + VerificationResolveCardBINSuccess: + description: Verification Resolve Card B I N response + content: + application/json: + schema: + $ref: '#/components/schemas/VerificationResolveCardBINResponse' + MiscellaneousListCountriesSuccess: + description: Miscellaneous List Countries response + content: + application/json: + schema: + $ref: '#/components/schemas/MiscellaneousListCountriesResponse' + MiscellaneousListStatesSuccess: + description: Miscellaneous List States response + content: + application/json: + schema: + $ref: '#/components/schemas/MiscellaneousListStatesResponse' diff --git a/paystack-ruby.gemspec b/paystack-ruby.gemspec index 4cd0237..237eb4c 100644 --- a/paystack-ruby.gemspec +++ b/paystack-ruby.gemspec @@ -1,27 +1,24 @@ # frozen_string_literal: true -require_relative "lib/paystack/ruby/version" +require_relative "lib/paystack/version" Gem::Specification.new do |spec| spec.name = "paystack-ruby" - spec.version = Paystack::Ruby::VERSION + spec.version = Paystack::VERSION spec.authors = ["andrew-paystack"] spec.email = ["andrew@paystack.com"] - spec.summary = "TODO: Write a short summary, because RubyGems requires one." - spec.description = "TODO: Write a longer description or delete this line." - spec.homepage = "TODO: Put your gem's website or public repo URL here." + spec.summary = "Ruby SDK for the Paystack API" + spec.description = "A Ruby gem for interacting with the Paystack API, generated from the official OpenAPI spec." + spec.homepage = "https://github.com/PaystackHQ/paystack-ruby" spec.license = "MIT" spec.required_ruby_version = ">= 3.1.0" - spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'" - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here." - spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here." + spec.metadata["source_code_uri"] = spec.homepage + spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md" + spec.metadata["rubygems_mfa_required"] = "true" - # Specify which files should be added to the gem when it is released. - # The `git ls-files -z` loads the files in the RubyGem that have been added into git. gemspec = File.basename(__FILE__) spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls| ls.readlines("\x0", chomp: true).reject do |f| @@ -32,10 +29,4 @@ Gem::Specification.new do |spec| spec.bindir = "exe" spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - - # Uncomment to register a new dependency of your gem - # spec.add_dependency "example-gem", "~> 1.0" - - # For more information and examples about making a new gem, check out our - # guide at: https://bundler.io/guides/creating_gem.html end diff --git a/test/paystack/client_test.rb b/test/paystack/client_test.rb new file mode 100644 index 0000000..cdcfc79 --- /dev/null +++ b/test/paystack/client_test.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require "test_helper" + +class Paystack::ClientTest < Minitest::Test + include PaystackTestHelpers + + def test_exposes_transaction_resource + assert_instance_of Paystack::Resources::Transaction, paystack_client.transaction + end + + def test_memoizes_transaction_resource + client = paystack_client + assert_same client.transaction, client.transaction + end + + def test_exposes_customer_resource + assert_instance_of Paystack::Resources::Customer, paystack_client.customer + end + + def test_memoizes_customer_resource + client = paystack_client + assert_same client.customer, client.customer + end +end diff --git a/test/paystack/resources/customer_test.rb b/test/paystack/resources/customer_test.rb new file mode 100644 index 0000000..9f2003b --- /dev/null +++ b/test/paystack/resources/customer_test.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +require "test_helper" + +class Paystack::Resources::CustomerTest < Minitest::Test + include PaystackTestHelpers + + def setup + @customer = paystack_client.customer + end + + def test_create_posts_to_correct_endpoint + stub_paystack(:post, "/customer", + request_body: {email: "customer@example.com", first_name: "John", last_name: "Doe"}, + body: {status: true, message: "Customer created", data: {id: 99, customer_code: "CUS_xxx", email: "customer@example.com"}}) + + response = @customer.create(email: "customer@example.com", first_name: "John", last_name: "Doe") + + assert response.success? + assert_equal "CUS_xxx", response.data[:customer_code] + end + + def test_list_passes_query_params + stub_request(:get, "https://api.paystack.co/customer") + .with(query: {"page" => "1"}, headers: {"Authorization" => "Bearer #{API_KEY}"}) + .to_return(status: 200, body: {status: true, message: "Customers retrieved", data: []}.to_json, headers: {"Content-Type" => "application/json"}) + + response = @customer.list(page: 1) + + assert response.success? + end + + def test_fetch_gets_by_code + stub_paystack(:get, "/customer/CUS_xxx", + body: {status: true, message: "Customer retrieved", data: {customer_code: "CUS_xxx", email: "customer@example.com"}}) + + response = @customer.fetch(code: "CUS_xxx") + + assert response.success? + assert_equal "CUS_xxx", response.data[:customer_code] + end + + def test_update_puts_to_correct_endpoint + stub_paystack(:put, "/customer/CUS_xxx", + request_body: {first_name: "Jane"}, + body: {status: true, message: "Customer updated", data: {customer_code: "CUS_xxx", first_name: "Jane"}}) + + response = @customer.update(code: "CUS_xxx", first_name: "Jane") + + assert response.success? + assert_equal "Jane", response.data[:first_name] + end + + def test_validate_posts_to_identification_endpoint + stub_paystack(:post, "/customer/CUS_xxx/identification", + request_body: {country: "NG", type: "bvn", value: "12345678901"}, + body: {status: true, message: "Customer Identification in progress"}) + + response = @customer.validate(code: "CUS_xxx", country: "NG", type: "bvn", value: "12345678901") + + assert response.success? + end + + def test_risk_action_posts_to_correct_endpoint + stub_paystack(:post, "/customer/set_risk_action", + request_body: {customer: "CUS_xxx", risk_action: "whitelist"}, + body: {status: true, message: "Customer updated", data: {risk_action: "whitelist"}}) + + response = @customer.risk_action(customer: "CUS_xxx", risk_action: "whitelist") + + assert response.success? + end + + def test_deactivate_authorization_posts_auth_code + stub_paystack(:post, "/customer/authorization/deactivate", + request_body: {authorization_code: "AUTH_xxx"}, + body: {status: true, message: "Authorization has been deactivated"}) + + response = @customer.deactivate_authorization(authorization_code: "AUTH_xxx") + + assert response.success? + end + + def test_raises_validation_error_on_400 + stub_paystack(:post, "/customer", + status: 400, + body: {status: false, message: "Email already exists"}) + + error = assert_raises(Paystack::ValidationError) do + @customer.create(email: "existing@example.com") + end + + assert_equal "Email already exists", error.message + assert_equal 400, error.http_status + end + + def test_initialize_authorization_posts_correctly + stub_paystack(:post, "/customer/authorization/initialize", + request_body: {email: "customer@example.com", amount: 10000}, + body: {status: true, message: "Authorization URL created", data: {authorization_url: "https://checkout.paystack.com/xyz"}}) + + response = @customer.initialize_authorization(email: "customer@example.com", amount: 10000) + + assert response.success? + end + + def test_verify_authorization_gets_by_reference + stub_paystack(:get, "/customer/authorization/verify/ref_xyz", + body: {status: true, message: "Authorization verified", data: {status: "success"}}) + + response = @customer.verify_authorization(reference: "ref_xyz") + + assert response.success? + end +end diff --git a/test/paystack/resources/transaction_test.rb b/test/paystack/resources/transaction_test.rb new file mode 100644 index 0000000..b2ff1be --- /dev/null +++ b/test/paystack/resources/transaction_test.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +require "test_helper" + +class Paystack::Resources::TransactionTest < Minitest::Test + include PaystackTestHelpers + + def setup + @transaction = paystack_client.transaction + end + + def test_initialize_posts_to_correct_endpoint + stub_paystack(:post, "/transaction/initialize", + request_body: {email: "test@example.com", amount: 20000}, + body: {status: true, message: "Authorization URL created", data: {authorization_url: "https://checkout.paystack.com/abc", reference: "ref_abc"}}) + + response = @transaction.initialize(email: "test@example.com", amount: 20000) + + assert response.success? + assert_equal "Authorization URL created", response.message + assert_equal "https://checkout.paystack.com/abc", response.data[:authorization_url] + end + + def test_verify_fetches_by_reference + stub_paystack(:get, "/transaction/verify/ref_abc", + body: {status: true, message: "Verification successful", data: {status: "success", reference: "ref_abc", amount: 20000}}) + + response = @transaction.verify(reference: "ref_abc") + + assert response.success? + assert_equal "success", response.data[:status] + end + + def test_list_passes_query_params + stub_request(:get, "https://api.paystack.co/transaction") + .with(query: {"page" => "1", "per_page" => "50"}, headers: {"Authorization" => "Bearer #{API_KEY}"}) + .to_return(status: 200, body: {status: true, message: "Transactions retrieved", data: []}.to_json, headers: {"Content-Type" => "application/json"}) + + response = @transaction.list(page: 1, per_page: 50) + + assert response.success? + end + + def test_fetch_gets_by_id + stub_paystack(:get, "/transaction/12345", + body: {status: true, message: "Transaction retrieved", data: {id: 12345, amount: 20000}}) + + response = @transaction.fetch(id: 12345) + + assert response.success? + assert_equal 12345, response.data[:id] + end + + def test_charge_authorization_posts_body + stub_paystack(:post, "/transaction/charge_authorization", + request_body: {authorization_code: "AUTH_xxx", email: "test@example.com", amount: 10000}, + body: {status: true, message: "Charge attempted", data: {status: "success"}}) + + response = @transaction.charge_authorization( + authorization_code: "AUTH_xxx", + email: "test@example.com", + amount: 10000 + ) + + assert response.success? + end + + def test_totals_passes_query_params + stub_request(:get, "https://api.paystack.co/transaction/totals") + .with(query: {"from" => "2024-01-01"}, headers: {"Authorization" => "Bearer #{API_KEY}"}) + .to_return(status: 200, body: {status: true, message: "Transaction totals", data: {total_volume: 5000000}}.to_json, headers: {"Content-Type" => "application/json"}) + + response = @transaction.totals(from: "2024-01-01") + + assert response.success? + end + + def test_raises_authentication_error_on_401 + stub_paystack(:post, "/transaction/initialize", + status: 401, + body: {status: false, message: "Invalid key"}) + + assert_raises(Paystack::AuthenticationError) do + @transaction.initialize(email: "test@example.com", amount: 20000) + end + end + + def test_raises_not_found_error_on_404 + stub_paystack(:get, "/transaction/verify/bad_ref", + status: 404, + body: {status: false, message: "Transaction reference not found"}) + + error = assert_raises(Paystack::NotFoundError) do + @transaction.verify(reference: "bad_ref") + end + + assert_equal "Transaction reference not found", error.message + assert_equal 404, error.http_status + end + + def test_timeline_gets_by_id + stub_paystack(:get, "/transaction/timeline/12345", + body: {status: true, message: "Timeline retrieved", data: {history: []}}) + + response = @transaction.timeline(id: 12345) + + assert response.success? + end + + def test_export_passes_query_params + stub_request(:get, "https://api.paystack.co/transaction/export") + .with(query: {"status" => "success"}, headers: {"Authorization" => "Bearer #{API_KEY}"}) + .to_return(status: 200, body: {status: true, message: "Export successful", data: {path: "https://files.paystack.co/export.csv"}}.to_json, headers: {"Content-Type" => "application/json"}) + + response = @transaction.export(status: "success") + + assert response.success? + end +end diff --git a/test/paystack/test_ruby.rb b/test/paystack/test_ruby.rb index e75da12..f3e174f 100644 --- a/test/paystack/test_ruby.rb +++ b/test/paystack/test_ruby.rb @@ -2,12 +2,8 @@ require "test_helper" -class Paystack::TestRuby < Minitest::Test - def test_that_it_has_a_version_number - refute_nil ::Paystack::Ruby::VERSION - end - - def test_it_does_something_useful - assert false +class Paystack::VersionTest < Minitest::Test + def test_version_is_defined + refute_nil Paystack::VERSION end end diff --git a/test/test_helper.rb b/test/test_helper.rb index 3cb3f0c..8822150 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,6 +1,29 @@ # frozen_string_literal: true $LOAD_PATH.unshift File.expand_path("../lib", __dir__) -require "paystack/ruby" +require "paystack" require "minitest/autorun" +require "webmock/minitest" + +module PaystackTestHelpers + API_KEY = "sk_test_xxxxxxxxxxxxxxxxxxxx" + BASE_URL = "https://api.paystack.co" + + def stub_paystack(method, path, status: 200, body: {}, request_body: nil) + stub = stub_request(method, "#{BASE_URL}#{path}") + .with(headers: {"Authorization" => "Bearer #{API_KEY}"}) + + stub = stub.with(body: request_body.to_json) if request_body + + stub.to_return( + status: status, + body: body.to_json, + headers: {"Content-Type" => "application/json"} + ) + end + + def paystack_client + Paystack::Client.new(API_KEY) + end +end From 401a5419826573e72f0aa64ec4efbf7ef38a3a98 Mon Sep 17 00:00:00 2001 From: andrew-paystack Date: Thu, 25 Jun 2026 12:04:05 +0300 Subject: [PATCH 2/2] chore:clean up dependancies --- Gemfile | 6 ------ paystack-ruby.gemspec | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index b713503..9796afe 100644 --- a/Gemfile +++ b/Gemfile @@ -6,9 +6,3 @@ source "https://rubygems.org" gemspec gem "irb" -gem "rake", "~> 13.0" - -gem "minitest", "~> 5.16" -gem "webmock", "~> 3.0" - -gem "standard", "~> 1.3" diff --git a/paystack-ruby.gemspec b/paystack-ruby.gemspec index 237eb4c..e81b157 100644 --- a/paystack-ruby.gemspec +++ b/paystack-ruby.gemspec @@ -29,4 +29,9 @@ Gem::Specification.new do |spec| spec.bindir = "exe" spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] + + spec.add_development_dependency "rake", "~> 13.0" + spec.add_development_dependency "minitest", "~> 5.16" + spec.add_development_dependency "webmock", "~> 3.0" + spec.add_development_dependency "standard", "~> 1.3" end