Paystack · Arazzo Workflow

Paystack Create Charge and Submit OTP

Version 1.0.0

Create a direct charge, branch when an OTP is required, submit the OTP, then check the final charge status.

1 workflow 1 source API 1 provider
View Spec View on GitHub PaymentsAfricaFintechRecurring BillingMarketplacesPayoutsMobile MoneyStripeArazzoWorkflows

Provider

paystack

Workflows

charge-and-submit-otp
Charge a card, satisfy an OTP challenge, then read the final status.
Creates a charge, branches on whether an OTP is required, submits the OTP, and checks the pending charge.
3 steps inputs: amount, authorization_code, email, otp outputs: finalStatus, reference
1
createCharge
Create a direct charge against the card authorization.
2
submitOtp
Submit the OTP against the ongoing charge reference.
3
checkCharge
Check the pending charge to read its final status.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Paystack Create Charge and Submit OTP
  summary: Create a direct charge, branch when an OTP is required, submit the OTP, then check the final charge status.
  description: >-
    The OTP step of the Charge API's progressive authentication. A direct charge
    is created with the customer's card authorization; when Paystack responds that
    an OTP is required the workflow submits the OTP against the same reference and
    then checks the pending charge for its final status. A branch short-circuits
    to the status check when no OTP is needed. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: chargeApi
  url: ../openapi/paystack-charge-api-openapi.yml
  type: openapi
workflows:
- workflowId: charge-and-submit-otp
  summary: Charge a card, satisfy an OTP challenge, then read the final status.
  description: >-
    Creates a charge, branches on whether an OTP is required, submits the OTP, and
    checks the pending charge.
  inputs:
    type: object
    required:
    - email
    - amount
    - authorization_code
    - otp
    properties:
      email:
        type: string
        description: Customer's email address.
      amount:
        type: string
        description: Amount to charge in the smallest currency unit, as a string.
      authorization_code:
        type: string
        description: A non-reusable authorization code to charge.
      otp:
        type: string
        description: The one-time password the customer received.
  steps:
  - stepId: createCharge
    description: Create a direct charge against the card authorization.
    operationId: charge_create
    requestBody:
      contentType: application/json
      payload:
        email: $inputs.email
        amount: $inputs.amount
        authorization_code: $inputs.authorization_code
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      reference: $response.body#/data/reference
      chargeStatus: $response.body#/data/status
    onSuccess:
    - name: otpRequired
      type: goto
      stepId: submitOtp
      criteria:
      - context: $response.body
        condition: $.data.status == "send_otp"
        type: jsonpath
    - name: noOtpNeeded
      type: goto
      stepId: checkCharge
      criteria:
      - context: $response.body
        condition: $.data.status != "send_otp"
        type: jsonpath
  - stepId: submitOtp
    description: Submit the OTP against the ongoing charge reference.
    operationId: charge_submitOtp
    requestBody:
      contentType: application/json
      payload:
        otp: $inputs.otp
        reference: $steps.createCharge.outputs.reference
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      status: $response.body#/data/status
  - stepId: checkCharge
    description: Check the pending charge to read its final status.
    operationId: charge_check
    parameters:
    - name: reference
      in: path
      value: $steps.createCharge.outputs.reference
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      finalStatus: $response.body#/data/status
  outputs:
    reference: $steps.createCharge.outputs.reference
    finalStatus: $steps.checkCharge.outputs.finalStatus

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/paystack-charge-and-submit-otp-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.