Cellulant · Arazzo Workflow

Cellulant Post Payout and Query Status

Version 1.0.0

Disburse a payout, then poll the Beep platform with queryPayment until the payout reaches a terminal state.

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

Provider

cellulant

Workflows

post-payout-and-query-status
Disburse a payout and poll its status until it resolves.
Posts a payout with BEEP.postPayment and polls BEEP.queryPayment until the payout leaves the pending state.
2 steps inputs: accountNumber, amount, basicAuth, callbackUrl, countryCode, currencyCode, datePaymentReceived, msisdn, narration, password, payerTransactionId, paymentMode, serviceCode, username outputs: beepTransactionId, queryStatusCode, queryStatusDescription
1
postPayout
postPayment
Disburse the payout with function BEEP.postPayment. The platform accepts the payout asynchronously with a pending-acknowledgement result.
2
queryPayout
postPayment
Query the payout outcome with function BEEP.queryPayment for the same payerTransactionID. Repeat while the payout is still pending (status code 139); end once a terminal result is returned.

Source API Descriptions

Arazzo Workflow Specification

cellulant-post-payout-and-query-status-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Cellulant Post Payout and Query Status
  summary: Disburse a payout, then poll the Beep platform with queryPayment until the payout reaches a terminal state.
  description: >-
    Beep payouts are accepted asynchronously and confirmed by callback, so this
    workflow proactively polls for the outcome. It posts a payout with
    BEEP.postPayment and then repeatedly calls the same endpoint with
    BEEP.queryPayment for the same payerTransactionID, branching back to poll
    while the payout is still pending and ending once a terminal result is
    returned. Both steps use the single 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: post-payout-and-query-status
  summary: Disburse a payout and poll its status until it resolves.
  description: >-
    Posts a payout with BEEP.postPayment and polls BEEP.queryPayment until the
    payout leaves the pending state.
  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 used for both post and query.
      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: postPayout
    description: >-
      Disburse the payout with function BEEP.postPayment. The platform accepts
      the payout asynchronously with a pending-acknowledgement result.
    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
      postStatusCode: $response.body#/results/0/statusCode
  - stepId: queryPayout
    description: >-
      Query the payout outcome with function BEEP.queryPayment for the same
      payerTransactionID. Repeat while the payout is still pending (status code
      139); end once a terminal result is returned.
    operationId: postPayment
    parameters:
    - name: Authorization
      in: header
      value: "Basic $inputs.basicAuth"
    requestBody:
      contentType: application/json
      payload:
        function: BEEP.queryPayment
        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
    - condition: $response.body#/authStatus/authStatusCode == 131
    outputs:
      queryStatusCode: $response.body#/results/0/statusCode
      queryStatusDescription: $response.body#/results/0/statusDescription
      beepTransactionId: $response.body#/results/0/beepTransactionID
    onSuccess:
    - name: payoutPending
      type: goto
      stepId: queryPayout
      criteria:
      - context: $response.body
        condition: $.results[0].statusCode == 139
        type: jsonpath
    - name: payoutResolved
      type: end
      criteria:
      - context: $response.body
        condition: $.results[0].statusCode != 139
        type: jsonpath
  outputs:
    beepTransactionId: $steps.postPayout.outputs.beepTransactionId
    queryStatusCode: $steps.queryPayout.outputs.queryStatusCode
    queryStatusDescription: $steps.queryPayout.outputs.queryStatusDescription