Paystack · Arazzo Workflow

Paystack Resolve Card BIN and Charge Authorization

Version 1.0.0

Resolve a card BIN to learn the card brand and country, then charge a saved authorization for that card.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub PaymentsAfricaFintechRecurring BillingMarketplacesPayoutsMobile MoneyStripeArazzoWorkflows

Provider

paystack

Workflows

resolve-card-bin-and-charge
Inspect the card BIN, then charge its saved authorization.
Resolves the card BIN for brand and country, then charges the saved authorization.
2 steps inputs: amount, authorization_code, bin, email outputs: brand, chargeStatus, countryCode, reference
1
resolveCardBin
verification_resolveCardBin
Resolve the card BIN to learn the card brand, type and country.
2
chargeAuthorization
transaction_chargeAuthorization
Charge the saved authorization for the resolved card.

Source API Descriptions

Arazzo Workflow Specification

paystack-resolve-card-bin-and-charge-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Paystack Resolve Card BIN and Charge Authorization
  summary: Resolve a card BIN to learn the card brand and country, then charge a saved authorization for that card.
  description: >-
    A card-aware charging flow. The first six digits of the card are resolved to
    reveal the card brand, type, and issuing country, and a saved authorization is
    then charged. Reading the BIN up front lets the integration apply
    brand-specific or country-specific routing before money moves. 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: verificationApi
  url: ../openapi/paystack-verification-openapi.yml
  type: openapi
- name: acceptPaymentsApi
  url: ../openapi/paystack-accept-payments-openapi.yml
  type: openapi
workflows:
- workflowId: resolve-card-bin-and-charge
  summary: Inspect the card BIN, then charge its saved authorization.
  description: >-
    Resolves the card BIN for brand and country, then charges the saved
    authorization.
  inputs:
    type: object
    required:
    - bin
    - email
    - amount
    - authorization_code
    properties:
      bin:
        type: string
        description: First 6 digits of the card to resolve.
      email:
        type: string
        description: Customer's email address.
      amount:
        type: integer
        description: Amount to charge in the smallest currency unit.
      authorization_code:
        type: string
        description: Saved authorization code to charge.
  steps:
  - stepId: resolveCardBin
    description: Resolve the card BIN to learn the card brand, type and country.
    operationId: verification_resolveCardBin
    parameters:
    - name: bin
      in: path
      value: $inputs.bin
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      brand: $response.body#/data/brand
      cardType: $response.body#/data/card_type
      countryCode: $response.body#/data/country_code
  - stepId: chargeAuthorization
    description: Charge the saved authorization for the resolved card.
    operationId: transaction_chargeAuthorization
    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
  outputs:
    brand: $steps.resolveCardBin.outputs.brand
    countryCode: $steps.resolveCardBin.outputs.countryCode
    reference: $steps.chargeAuthorization.outputs.reference
    chargeStatus: $steps.chargeAuthorization.outputs.chargeStatus