{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blindpay-com/json-schema/blindpay-com-create-payin-out-schema.json",
  "title": "CreatePayinOut",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blindpay-com-payins-api-openapi.yml#/components/schemas/CreatePayinOut",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 15,
      "maxLength": 15
    },
    "status": {
      "type": "string",
      "enum": [
        "processing",
        "on_hold",
        "failed",
        "refunded",
        "completed"
      ],
      "description": "Payin general status"
    },
    "pix_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "PIX code"
    },
    "memo_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "Memo code"
    },
    "clabe": {
      "type": [
        "string",
        "null"
      ],
      "description": "CLABE code"
    },
    "partner_fee": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Payin partner fee amount in cents"
    },
    "tracking_complete": {
      "type": "object",
      "properties": {
        "step": {
          "type": "string",
          "enum": [
            "processing",
            "on_hold",
            "pending_review",
            "pending_refund_review",
            "completed"
          ],
          "description": "Complete step"
        },
        "transaction_hash": {
          "type": [
            "string",
            "null"
          ],
          "description": "Complete transaction hash"
        },
        "completed_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Complete completed date"
        }
      },
      "required": [
        "step"
      ]
    },
    "tracking_payment": {
      "type": "object",
      "properties": {
        "step": {
          "type": "string",
          "enum": [
            "processing",
            "on_hold",
            "pending_review",
            "pending_refund_review",
            "completed"
          ],
          "description": "Payment step"
        },
        "provider_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Payment provider name"
        },
        "completed_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Payment completed date"
        },
        "review_source": {
          "type": [
            "string",
            "null"
          ],
          "description": "Primary risk source that sent this payin to manual review"
        },
        "review_context": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {},
          "description": "Structured risk context for manual review"
        },
        "review_sources": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Every risk source that flagged this payin on the pending review"
        },
        "review_contexts": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {},
          "description": "Structured risk context per flagging source"
        },
        "approved_risk_sources": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Risk sources already approved by an analyst"
        }
      },
      "required": [
        "step"
      ]
    },
    "tracking_transaction": {
      "type": "object",
      "properties": {
        "step": {
          "type": "string",
          "enum": [
            "processing",
            "on_hold",
            "pending_review",
            "pending_refund_review",
            "completed"
          ],
          "description": "Payin transaction step"
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "failed",
            "completed"
          ],
          "description": "Payin transaction status"
        },
        "external_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Payin transaction external id"
        },
        "completed_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Payin transaction completed date"
        },
        "transaction_hash": {
          "type": [
            "string",
            "null"
          ],
          "description": "Blockchain transaction hash"
        },
        "provider_name": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "Nvio Pagos",
            "Brex",
            "Stark Bank",
            "JPMorgan Chase",
            "HSBC",
            "Inter",
            "JP Morgan Chase",
            "Bitso",
            "Citi",
            "CFSB",
            "Triple A Technologies",
            "BCB Group",
            "Portage Bank",
            "NMI"
          ],
          "description": "Payment provider name"
        },
        "provider_transaction_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Payment provider transaction id"
        },
        "sender_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "sender_bank_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "sender_tax_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "sender_bank_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "sender_account_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "end_to_end_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "BACEN Pix end-to-end transaction ID (govt Pix ID)"
        },
        "trace_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "transaction_reference": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "pse_instruction": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "payment_link": {
              "type": "string",
              "description": "PSE payment link URL"
            },
            "fid": {
              "type": "string",
              "description": "PSE provider reference used for webhook matching (the payin intent id)"
            },
            "payin_intent_id": {
              "type": [
                "string",
                "null"
              ],
              "description": "PSE payin intent id at the provider"
            },
            "expires_at": {
              "type": [
                "string",
                "null"
              ],
              "description": "When the PSE payment link expires"
            },
            "full_name": {
              "type": "string",
              "description": "PSE payer full name"
            },
            "tax_id": {
              "type": "string",
              "description": "PSE payer document number"
            },
            "document_type": {
              "type": "string",
              "enum": [
                "CC",
                "NIT"
              ],
              "description": "PSE payer document type"
            },
            "phone": {
              "type": "string",
              "description": "PSE payer phone number"
            },
            "email": {
              "type": "string",
              "description": "PSE payer email"
            },
            "bank_code": {
              "type": [
                "string",
                "null"
              ],
              "description": "PSE payer bank code"
            }
          },
          "required": [
            "payment_link",
            "fid",
            "full_name",
            "tax_id",
            "document_type",
            "phone",
            "email"
          ]
        },
        "transfers_instruction": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "account": {
              "type": "string",
              "description": "CVU/CBU/Alias account number"
            },
            "type": {
              "type": "string",
              "enum": [
                "CVU",
                "CBU",
                "ALIAS"
              ],
              "description": "Account type (CVU, CBU, or ALIAS)"
            },
            "tax_id": {
              "type": [
                "string",
                "null"
              ],
              "description": "CUIT/CUIL (normalized, digits only)"
            }
          },
          "required": [
            "account",
            "type"
          ]
        },
        "ted_instruction": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "beneficiary_name": {
              "type": "string"
            },
            "tax_id": {
              "type": "string"
            },
            "bank_code": {
              "type": "string"
            },
            "bank_name": {
              "type": "string"
            },
            "branch_code": {
              "type": "string"
            },
            "account_number": {
              "type": "string"
            },
            "account_type": {
              "type": "string"
            }
          },
          "required": [
            "beneficiary_name",
            "tax_id",
            "bank_code",
            "bank_name",
            "branch_code",
            "account_number",
            "account_type"
          ]
        },
        "card_instruction": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "provider": {
              "type": "string",
              "description": "Which card gateway issued the tokenization key, so the checkout knows which tokenization library to load."
            },
            "tokenization_key": {
              "type": "string",
              "description": "NMI Collect.js public tokenization key. Load https://secure.nmi.com/token/Collect.js with this key, tokenize the card in the browser, and submit the payment_token to the card-payment endpoint."
            }
          },
          "required": [
            "provider",
            "tokenization_key"
          ]
        },
        "card_evidence": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "eci": {
              "type": [
                "string",
                "null"
              ],
              "description": "3DS ECI value returned by payer authentication"
            },
            "cavv": {
              "type": [
                "string",
                "null"
              ],
              "description": "3DS cardholder authentication verification value"
            },
            "avs_response": {
              "type": [
                "string",
                "null"
              ],
              "description": "Gateway AVS result code"
            },
            "cvv_response": {
              "type": [
                "string",
                "null"
              ],
              "description": "Gateway CVV result code"
            },
            "auth_code": {
              "type": [
                "string",
                "null"
              ],
              "description": "Issuer authorization code"
            },
            "cardholder_name": {
              "type": [
                "string",
                "null"
              ],
              "description": "Cardholder name as submitted with the charge"
            },
            "three_ds_version": {
              "type": [
                "string",
                "null"
              ],
              "description": "3DS protocol version used"
            }
          }
        },
        "card_failed_attempts": {
          "type": [
            "integer",
            "null"
          ],
          "description": "How many card charge attempts on this payin were declined. A payin stops accepting charges after the limit."
        },
        "card_claim_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Set while a card charge attempt is in flight for this payin; guards against a double charge (NMI has no idempotency key)."
        },
        "card_gates_failed_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Set when an approved card sale failed the post-capture risk gates (CVV/AVS) and was voided; blocks any later confirmation of that charge."
        }
      },
      "required": [
        "step"
      ]
    },
    "billing_fee_amount": {
      "type": [
        "number",
        "null"
      ],
      "description": "BlindPay fee in cents accrued to your billing cycle (charged at the end of the month). Virtual account deposits below $100.00 always accrue here, so small deposits are delivered in full."
    },
    "transaction_fee_amount": {
      "type": [
        "number",
        "null"
      ],
      "description": "BlindPay fee in cents deducted from the transaction at the time it is processed. Virtual account deposits of $100.00 or more are charged here (unless your instance is configured for end-of-month billing, in which case every fee accrues to billing_fee_amount)."
    },
    "blindpay_bank_details": {
      "type": "object",
      "properties": {
        "routing_number": {
          "type": "string",
          "default": "121145349"
        },
        "account_number": {
          "type": "string",
          "default": "621327727210181"
        },
        "account_type": {
          "type": "string",
          "default": "Business checking"
        },
        "swift_bic_code": {
          "type": [
            "string",
            "null"
          ],
          "default": "CHASUS33"
        },
        "ach": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "routing_number": {
              "type": "string"
            },
            "account_number": {
              "type": "string"
            }
          },
          "required": [
            "routing_number",
            "account_number"
          ]
        },
        "wire": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "routing_number": {
              "type": "string"
            },
            "account_number": {
              "type": "string"
            }
          },
          "required": [
            "routing_number",
            "account_number"
          ]
        },
        "rtp": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "routing_number": {
              "type": "string"
            },
            "account_number": {
              "type": "string"
            }
          },
          "required": [
            "routing_number",
            "account_number"
          ]
        },
        "beneficiary": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "default": "BlindPay, Inc."
            },
            "address_line_1": {
              "type": "string",
              "default": "8 The Green, #19364"
            },
            "address_line_2": {
              "type": "string",
              "default": "Dover, DE 19901"
            }
          }
        },
        "receiving_bank": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "default": "CFSB"
            },
            "address_line_1": {
              "type": "string",
              "default": "1 Letterman Drive, Building A, Suite A4-700"
            },
            "address_line_2": {
              "type": "string",
              "default": "San Francisco, CA 94129"
            }
          }
        },
        "swift_account_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "swift_receiving_bank": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "address_line_1": {
              "type": [
                "string",
                "null"
              ]
            },
            "address_line_2": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      },
      "required": [
        "beneficiary",
        "receiving_bank"
      ]
    },
    "customer_id": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 15,
      "maxLength": 15
    },
    "receiver_amount": {
      "type": [
        "number",
        "null"
      ],
      "description": "10.10 USDC"
    },
    "payment_method": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "ach",
        "ach_pull",
        "wire",
        "pix",
        "card",
        "ted",
        "spei",
        "transfers",
        "pse",
        "bre_b",
        "international_swift",
        "rtp"
      ]
    },
    "sender_amount": {
      "type": [
        "number",
        "null"
      ],
      "description": "52.40 BRL needs to be sent in a pix transfer"
    }
  },
  "required": [
    "id",
    "status",
    "tracking_complete",
    "tracking_payment",
    "tracking_transaction",
    "blindpay_bank_details"
  ]
}