Cellulant · Arazzo Workflow

Cellulant Check Balance and Payout

Version 1.0.0

Read the float balance, then disburse a payout only when the platform authenticated the balance query.

1 workflow 1 source API 1 provider
View Spec View on GitHub PaymentsMobile MoneyCheckoutPayoutsDisbursementAfricaPan-AfricanFintechBank TransferCardsAirtimeBill PaymentSMSOTPTinggArazzoWorkflows

Provider

cellulant

Workflows

check-balance-and-payout
Read the float balance and disburse a payout when the balance query authenticates.
Reads the float balance with BEEP.getBalance and, when the query authenticates, posts the payout with BEEP.postPayment.
2 steps inputs: accountNumber, amount, basicAuth, callbackUrl, countryCode, currencyCode, datePaymentReceived, msisdn, narration, password, payerTransactionId, paymentMode, serviceCode, username outputs: balanceAuthStatusCode, beepTransactionId, paymentStatusCode
1
getBalance
postPayment
Read the float balance with function BEEP.getBalance. Branch to the payout only when the platform authenticated the query (authStatusCode 131).
2
postPayout
postPayment
Disburse the payout with function BEEP.postPayment once the balance query authenticated.

Source API Descriptions

Arazzo Workflow Specification

cellulant-check-balance-and-payout-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Cellulant Check Balance and Payout
  summary: Read the float balance, then disburse a payout only when the platform authenticated the balance query.
  description: >-
    Guards a disbursement behind a float-balance read so the merchant does not
    post a payout against an unreachable account. Both steps call the single
    Beep endpoint — BEEP.getBalance returns the float balance, and on a
    successful authenticated response the flow proceeds to BEEP.postPayment;
    otherwise it ends without disbursing. Both steps reference the bare
    postPayment operationId and inline the Beep Basic Authorization header
    alongside the payload credentials.
  version: 1.0.0
sourceDescriptions:
- name: payoutsApi
  url: ../openapi/cellulant-payouts-api-openapi.yml
  type: openapi
workflows:
- workflowId: check-balance-and-payout
  summary: Read the float balance and disburse a payout when the balance query authenticates.
  description: >-
    Reads the float balance with BEEP.getBalance and, when the query
    authenticates, posts the payout with BEEP.postPayment.
  inputs:
    type: object
    required:
    - basicAuth
    - username
    - password
    - countryCode
    - serviceCode
    - msisdn
    - accountNumber
    - payerTransactionId
    - amount
    - datePaymentReceived
    - currencyCode
    properties:
      basicAuth:
        type: string
        description: Base64-encoded Beep Basic auth credentials for the Authorization header.
      username:
        type: string
        description: Beep payload credential username.
      password:
        type: string
        description: Beep payload credential password.
      countryCode:
        type: string
        description: ISO 3166-1 alpha-2 country code.
      serviceCode:
        type: string
        description: Beep service code identifying the payout rail.
      msisdn:
        type: string
        description: Customer mobile number with country code.
      accountNumber:
        type: string
        description: Destination account number.
      payerTransactionId:
        type: string
        description: Unique merchant payer transaction id.
      amount:
        type: number
        description: Payout amount.
      datePaymentReceived:
        type: string
        description: Payment received timestamp (yyyy-mm-dd hh:mm:ss).
      currencyCode:
        type: string
        description: Currency code for the payout.
      narration:
        type: string
        description: Free-text narration for the payout.
      paymentMode:
        type: string
        description: Payment mode (ATM, Mobile, Bank, Card, Cash).
      callbackUrl:
        type: string
        description: URL Beep posts the delivery callback to.
  steps:
  - stepId: getBalance
    description: >-
      Read the float balance with function BEEP.getBalance. Branch to the payout
      only when the platform authenticated the query (authStatusCode 131).
    operationId: postPayment
    parameters:
    - name: Authorization
      in: header
      value: "Basic $inputs.basicAuth"
    requestBody:
      contentType: application/json
      payload:
        function: BEEP.getBalance
        countryCode: $inputs.countryCode
        payload:
          credentials:
            username: $inputs.username
            password: $inputs.password
          packet:
            serviceCode: $inputs.serviceCode
            MSISDN: $inputs.msisdn
            accountNumber: $inputs.accountNumber
            payerTransactionID: $inputs.payerTransactionId
            amount: $inputs.amount
            datePaymentReceived: $inputs.datePaymentReceived
            currencyCode: $inputs.currencyCode
            countryCode: $inputs.countryCode
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      authStatusCode: $response.body#/authStatus/authStatusCode
    onSuccess:
    - name: balanceAvailable
      type: goto
      stepId: postPayout
      criteria:
      - context: $response.body
        condition: $.authStatus.authStatusCode == 131
        type: jsonpath
    - name: balanceUnavailable
      type: end
      criteria:
      - context: $response.body
        condition: $.authStatus.authStatusCode != 131
        type: jsonpath
  - stepId: postPayout
    description: >-
      Disburse the payout with function BEEP.postPayment once the balance query
      authenticated.
    operationId: postPayment
    parameters:
    - name: Authorization
      in: header
      value: "Basic $inputs.basicAuth"
    requestBody:
      contentType: application/json
      payload:
        function: BEEP.postPayment
        countryCode: $inputs.countryCode
        payload:
          credentials:
            username: $inputs.username
            password: $inputs.password
          packet:
            serviceCode: $inputs.serviceCode
            MSISDN: $inputs.msisdn
            accountNumber: $inputs.accountNumber
            payerTransactionID: $inputs.payerTransactionId
            amount: $inputs.amount
            datePaymentReceived: $inputs.datePaymentReceived
            currencyCode: $inputs.currencyCode
            countryCode: $inputs.countryCode
            narration: $inputs.narration
            paymentMode: $inputs.paymentMode
            extraData:
              callbackUrl: $inputs.callbackUrl
              pushToOriginator: true
    successCriteria:
    - condition: $statusCode == 200
    - condition: $response.body#/authStatus/authStatusCode == 131
    outputs:
      beepTransactionId: $response.body#/results/0/beepTransactionID
      paymentStatusCode: $response.body#/results/0/statusCode
  outputs:
    balanceAuthStatusCode: $steps.getBalance.outputs.authStatusCode
    beepTransactionId: $steps.postPayout.outputs.beepTransactionId
    paymentStatusCode: $steps.postPayout.outputs.paymentStatusCode