SAP BRIM Authorize and Confirm a Charge Reservation

Version 1.0.0

Reserve an amount against a prepaid balance, confirm it into a final charge, and read the balance.

1 workflow 1 source API 1 provider
View Spec View on GitHub BillingEnterpriseOrder to CashRevenue ManagementSAPSubscription ManagementUsage-Based PricingArazzoWorkflows

Provider

sap-brim-billing-and-revenue-innovation-management

Workflows

authorize-confirm-charge
Authorize a reservation and confirm it into a final charge.
Reserves an amount against the account, confirms the reservation as a final charge, and reads the resulting account balance.
3 steps inputs: accountId, amountValue, currency, finalValue, serviceType outputs: authorizationId, availableBalance, chargeId
1
authorize
authorizeCharge
Reserve the amount against the prepaid balance.
2
confirm
confirmAuthorization
Confirm the authorization, capturing the reserved amount as a charge.
3
getBalance
getAccountBalance
Read the account balance after the charge is captured.

Source API Descriptions

Arazzo Workflow Specification

sap-brim-billing-and-revenue-innovation-management-authorize-confirm-charge-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: SAP BRIM Authorize and Confirm a Charge Reservation
  summary: Reserve an amount against a prepaid balance, confirm it into a final charge, and read the balance.
  description: >-
    Runs the reserve-then-capture charging pattern on SAP BRIM Convergent
    Charging. The workflow authorizes (reserves) an amount against a prepaid
    balance, confirms the authorization to convert the reservation into a final
    charge, and reads the account balance to observe the result. 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: convergentChargingApi
  url: ../openapi/sap-brim-convergent-charging-openapi.yml
  type: openapi
workflows:
- workflowId: authorize-confirm-charge
  summary: Authorize a reservation and confirm it into a final charge.
  description: >-
    Reserves an amount against the account, confirms the reservation as a final
    charge, and reads the resulting account balance.
  inputs:
    type: object
    required:
    - accountId
    - amountValue
    - currency
    properties:
      accountId:
        type: string
        description: Identifier of the subscriber account.
      amountValue:
        type: number
        description: Amount value to reserve against the account.
      currency:
        type: string
        description: ISO 4217 currency code for the reservation.
      finalValue:
        type: number
        description: Optional final amount value to capture at confirmation.
      serviceType:
        type: string
        description: Optional service type associated with the authorization.
  steps:
  - stepId: authorize
    description: Reserve the amount against the prepaid balance.
    operationId: authorizeCharge
    requestBody:
      contentType: application/json
      payload:
        accountId: $inputs.accountId
        amount:
          value: $inputs.amountValue
          currency: $inputs.currency
        serviceType: $inputs.serviceType
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.status == "AUTHORIZED"
      type: jsonpath
    outputs:
      authorizationId: $response.body#/authorizationId
      reservedAmount: $response.body#/reservedAmount
  - stepId: confirm
    description: Confirm the authorization, capturing the reserved amount as a charge.
    operationId: confirmAuthorization
    parameters:
    - name: authorizationId
      in: path
      value: $steps.authorize.outputs.authorizationId
    requestBody:
      contentType: application/json
      payload:
        finalAmount:
          value: $inputs.finalValue
          currency: $inputs.currency
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      chargeId: $response.body#/chargeId
      status: $response.body#/status
      remainingBalance: $response.body#/remainingBalance
  - stepId: getBalance
    description: Read the account balance after the charge is captured.
    operationId: getAccountBalance
    parameters:
    - name: accountId
      in: path
      value: $inputs.accountId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      availableBalance: $response.body#/availableBalance
      reservedAmount: $response.body#/reservedAmount
  outputs:
    authorizationId: $steps.authorize.outputs.authorizationId
    chargeId: $steps.confirm.outputs.chargeId
    availableBalance: $steps.getBalance.outputs.availableBalance