openapi: 3.0.3 info: contact: email: support@marqeta.com name: Marqeta description: Marqeta's Core API endpoints, conveniently annotated to enable code generation (including SDKs), test cases, and documentation. Currently in beta. termsOfService: https://www.marqeta.com/api-terms title: Core accepted countries Refunds API version: 3.0.39 servers: - url: /v3 security: - mqAppAndAccessToken: [] tags: - name: Refunds paths: /simulation/accounts/{account_token}/refunds/{refund_token}/transitions: post: description: api to simulate status transition of a refund. operationId: simulateTransitionRefund parameters: - description: 'Unique identifier of the credit account for which you want to create a balance refund. Send a `GET` request to `/credit/accounts` to retrieve existing credit account tokens.' explode: false in: path name: account_token required: true schema: type: string x-allowableValues: Existing account token style: simple - description: 'Unique identifier of the refund to retrieve. Send a `GET` request to `/credit/accounts/{account_token}/refunds/{refund_token}` to retrieve existing refunds.' explode: false in: path name: refund_token required: true schema: type: string x-allowableValues: Existing refund token style: simple requestBody: content: application/json: example: status: COMPLETED token: my_refund_token schema: $ref: '#/components/schemas/SimulateRefundTransitionRequest' required: true responses: '201': content: application/json: example: account_token: my_account_token_12 amount: 10 created_time: 2025-01-02 20:17:28+00:00 currency_code: USD description: credit balance refund method: ACH payment_source_token: my_payment_funding_source_token status: PENDING token: credit_balance_refund_token1234 type: CREDIT_BALANCE_REFUND updated_time: 2025-01-02 20:17:28+00:00 schema: $ref: '#/components/schemas/RefundResponse' description: Expected response. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error security: - zionToken: [] summary: Simulate Refund Transition tags: - Refunds components: schemas: RefundType: description: Type of refund. enum: - PAYMENT_REFUND - CREDIT_BALANCE_REFUND type: string SimulateRefundTransitionRequest: description: Specifies the details of simulate refund transition request . properties: status: $ref: '#/components/schemas/RefundStatus' token: description: Unique identifier for the refund. type: string required: - status - token type: object CurrencyCode: default: USD description: Valid three-digit link:https://www.iso.org/iso-4217-currency-codes.html[ISO 4217 currency code, window="_blank"]. enum: - USD type: string RefundMethod: description: Payment instrument used to issue the refund. enum: - ACH - CHECK type: string RefundStatus: description: Current status of the refund. enum: - INITIATED - PENDING - PROCESSING - SUBMITTED - CANCELLED - COMPLETED - RETURNED type: string Error: properties: code: type: integer message: type: string type: object RefundResponse: description: Detailed refund response object. properties: account_token: description: Unique identifier of the account for which the refund is issued. maxLength: 36 type: string amount: description: 'Amount of the refund. The maximum refund amount is the amount that brings the account balance to $0. For example, $4000 is the maximum refund amount for a -$4000 account balance.' type: number created_time: description: Date and time when the refund was created. format: date-time type: string currency_code: $ref: '#/components/schemas/CurrencyCode' description: description: Description of the refund. type: string method: $ref: '#/components/schemas/RefundMethod' payment_source_token: description: Unique identifier of the payment source that receives the refunded amount. maxLength: 36 type: string status: $ref: '#/components/schemas/RefundStatus' token: description: Unique identifier of the refund. type: string type: $ref: '#/components/schemas/RefundType' updated_time: description: Date and time when the refund was last updated. format: date-time type: string required: - account_token - amount - created_time - currency_code - method - status - token - type - updated_time type: object securitySchemes: mqAppAndAccessToken: scheme: basic type: http