naftiko: 1.0.0-alpha2 info: label: Core API — chargebacks description: 'Core API — chargebacks. 10 operations. Lead operation: List all chargebacks. Self-contained Naftiko capability covering one Marqeta business surface.' tags: - Marqeta - chargebacks created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: MARQETA_API_KEY: MARQETA_API_KEY capability: consumes: - type: http namespace: core-chargebacks baseUri: '' description: Core API — chargebacks business capability. Self-contained, no shared references. resources: - name: chargebacks path: /chargebacks operations: - name: getchargebacks method: GET description: List all chargebacks outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: count in: query type: integer description: Number of chargebacks to retrieve - name: start_index in: query type: integer description: Start index - name: network_reference_id in: query type: string description: Network reference ID - name: transaction_token in: query type: string description: Transaction token - name: amount in: query type: string description: Amount - name: states in: query type: string description: Comma-delimited list of chargeback states to display e.g. INITIATED | REPRESENTMENT | PREARBITRATION | ARBITRATION | CASE_WON | CASE_LOST | NETWORK_REJECTED | W - name: sort_by in: query type: string description: Sort order - name: network_case_id in: query type: string - name: postchargebacks method: POST description: Creates a chargeback outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: chargebacks-allocationacknowledgement path: /chargebacks/allocationacknowledgement operations: - name: postchargebackallocationacknowledgment method: POST description: Creates a chargeback allocation acknowledgement outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: chargebacks-transitions path: /chargebacks/transitions operations: - name: postchargebackstransitions method: POST description: Creates a chargeback transition outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: chargebacks-transitions-token path: /chargebacks/transitions/{token} operations: - name: getchargebackstransitionstoken method: GET description: Returns a specific chargeback transition outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: token in: path type: string description: Chargeback transition token required: true - name: chargebacks-chargeback_token-transitions path: /chargebacks/{chargeback_token}/transitions operations: - name: getchargebackschargebacktokentransitions method: GET description: Lists all chargeback transitions that are related to a chargeback outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: count in: query type: integer description: Number of transitions to retrieve - name: start_index in: query type: integer description: Start index - name: sort_by in: query type: string description: Sort order - name: chargeback_token in: path type: string description: Chargeback token required: true - name: chargebacks-token path: /chargebacks/{token} operations: - name: getchargebackstoken method: GET description: Returns a specific chargeback outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: token in: path type: string required: true - name: putchargebackstoken method: PUT description: Updates chargeback data outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: token in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: chargebacks-token-grantprovisionalcredit path: /chargebacks/{token}/grantprovisionalcredit operations: - name: putchargebackstokengrantprovisionalcredit method: PUT description: Grants provisional credit outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: token in: path type: string required: true - name: chargebacks-token-reverseprovisionalcredit path: /chargebacks/{token}/reverseprovisionalcredit operations: - name: putchargebackstokenreverseprovisionalcredit method: PUT description: Reverses provisional credit outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: token in: path type: string required: true authentication: type: basic username: '{{env.MARQETA_USER}}' password: '{{env.MARQETA_PASS}}' exposes: - type: rest namespace: core-chargebacks-rest port: 8080 description: REST adapter for Core API — chargebacks. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/chargebacks name: chargebacks description: REST surface for chargebacks. operations: - method: GET name: getchargebacks description: List all chargebacks call: core-chargebacks.getchargebacks with: count: rest.count start_index: rest.start_index network_reference_id: rest.network_reference_id transaction_token: rest.transaction_token amount: rest.amount states: rest.states sort_by: rest.sort_by network_case_id: rest.network_case_id outputParameters: - type: object mapping: $. - method: POST name: postchargebacks description: Creates a chargeback call: core-chargebacks.postchargebacks with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/chargebacks/allocationacknowledgement name: chargebacks-allocationacknowledgement description: REST surface for chargebacks-allocationacknowledgement. operations: - method: POST name: postchargebackallocationacknowledgment description: Creates a chargeback allocation acknowledgement call: core-chargebacks.postchargebackallocationacknowledgment with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/chargebacks/transitions name: chargebacks-transitions description: REST surface for chargebacks-transitions. operations: - method: POST name: postchargebackstransitions description: Creates a chargeback transition call: core-chargebacks.postchargebackstransitions with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/chargebacks/transitions/{token} name: chargebacks-transitions-token description: REST surface for chargebacks-transitions-token. operations: - method: GET name: getchargebackstransitionstoken description: Returns a specific chargeback transition call: core-chargebacks.getchargebackstransitionstoken with: token: rest.token outputParameters: - type: object mapping: $. - path: /v1/chargebacks/{chargeback-token}/transitions name: chargebacks-chargeback-token-transitions description: REST surface for chargebacks-chargeback_token-transitions. operations: - method: GET name: getchargebackschargebacktokentransitions description: Lists all chargeback transitions that are related to a chargeback call: core-chargebacks.getchargebackschargebacktokentransitions with: count: rest.count start_index: rest.start_index sort_by: rest.sort_by chargeback_token: rest.chargeback_token outputParameters: - type: object mapping: $. - path: /v1/chargebacks/{token} name: chargebacks-token description: REST surface for chargebacks-token. operations: - method: GET name: getchargebackstoken description: Returns a specific chargeback call: core-chargebacks.getchargebackstoken with: token: rest.token outputParameters: - type: object mapping: $. - method: PUT name: putchargebackstoken description: Updates chargeback data call: core-chargebacks.putchargebackstoken with: token: rest.token body: rest.body outputParameters: - type: object mapping: $. - path: /v1/chargebacks/{token}/grantprovisionalcredit name: chargebacks-token-grantprovisionalcredit description: REST surface for chargebacks-token-grantprovisionalcredit. operations: - method: PUT name: putchargebackstokengrantprovisionalcredit description: Grants provisional credit call: core-chargebacks.putchargebackstokengrantprovisionalcredit with: token: rest.token outputParameters: - type: object mapping: $. - path: /v1/chargebacks/{token}/reverseprovisionalcredit name: chargebacks-token-reverseprovisionalcredit description: REST surface for chargebacks-token-reverseprovisionalcredit. operations: - method: PUT name: putchargebackstokenreverseprovisionalcredit description: Reverses provisional credit call: core-chargebacks.putchargebackstokenreverseprovisionalcredit with: token: rest.token outputParameters: - type: object mapping: $. - type: mcp namespace: core-chargebacks-mcp port: 9090 transport: http description: MCP adapter for Core API — chargebacks. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-all-chargebacks description: List all chargebacks hints: readOnly: true destructive: false idempotent: true call: core-chargebacks.getchargebacks with: count: tools.count start_index: tools.start_index network_reference_id: tools.network_reference_id transaction_token: tools.transaction_token amount: tools.amount states: tools.states sort_by: tools.sort_by network_case_id: tools.network_case_id outputParameters: - type: object mapping: $. - name: creates-chargeback description: Creates a chargeback hints: readOnly: false destructive: false idempotent: false call: core-chargebacks.postchargebacks with: body: tools.body outputParameters: - type: object mapping: $. - name: creates-chargeback-allocation-acknowledgement description: Creates a chargeback allocation acknowledgement hints: readOnly: false destructive: false idempotent: false call: core-chargebacks.postchargebackallocationacknowledgment with: body: tools.body outputParameters: - type: object mapping: $. - name: creates-chargeback-transition description: Creates a chargeback transition hints: readOnly: false destructive: false idempotent: false call: core-chargebacks.postchargebackstransitions with: body: tools.body outputParameters: - type: object mapping: $. - name: returns-specific-chargeback-transition description: Returns a specific chargeback transition hints: readOnly: true destructive: false idempotent: true call: core-chargebacks.getchargebackstransitionstoken with: token: tools.token outputParameters: - type: object mapping: $. - name: lists-all-chargeback-transitions-that description: Lists all chargeback transitions that are related to a chargeback hints: readOnly: true destructive: false idempotent: true call: core-chargebacks.getchargebackschargebacktokentransitions with: count: tools.count start_index: tools.start_index sort_by: tools.sort_by chargeback_token: tools.chargeback_token outputParameters: - type: object mapping: $. - name: returns-specific-chargeback description: Returns a specific chargeback hints: readOnly: true destructive: false idempotent: true call: core-chargebacks.getchargebackstoken with: token: tools.token outputParameters: - type: object mapping: $. - name: updates-chargeback-data description: Updates chargeback data hints: readOnly: false destructive: false idempotent: true call: core-chargebacks.putchargebackstoken with: token: tools.token body: tools.body outputParameters: - type: object mapping: $. - name: grants-provisional-credit description: Grants provisional credit hints: readOnly: false destructive: false idempotent: true call: core-chargebacks.putchargebackstokengrantprovisionalcredit with: token: tools.token outputParameters: - type: object mapping: $. - name: reverses-provisional-credit description: Reverses provisional credit hints: readOnly: false destructive: false idempotent: true call: core-chargebacks.putchargebackstokenreverseprovisionalcredit with: token: tools.token outputParameters: - type: object mapping: $.