code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.treasury.OutboundPayment.TestHelpers.return(
    "obp_1LSdi72eZvKYlo2C9qeS9ZNt",
    return_details={"code": "account_closed"},
  )
  '''Response {
    "id": "obp_1LSdi72eZvKYlo2C9qeS9ZNt",
    "object": "treasury.outbound_payment",
    "amount": 10000,
    "cancelable": false,
    "created": 1659518271,
    "currency": "usd",
    "customer": null,
    "description": "OutboundPayment to a 3rd party",
    "destination_payment_method": null,
    "destination_payment_method_details": {
      "type": "us_bank_account",
      "destination": "ba_1LSdi12eZvKYlo2CVq3qRggm"
    },
    "end_user_details": {
      "ip_address": null,
      "present": false
    },
    "expected_arrival_date": 1659657600,
    "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F",
    "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A",
    "livemode": false,
    "metadata": {},
    "returned_details": {
      "code": "account_closed",
      "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w"
    },
    "statement_descriptor": "payment",
    "status": "returned",
    "status_transitions": {
      "failed_at": null,
      "posted_at": 1659518271,
      "returned_at": 1659518272,
      "canceled_at": null
    },
    "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w"
  }'''
nl: Test mode: Return an OutboundPaymentTransitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.Parameters returned_details optional dictionary Optional hash to set the the return code.Show child parametersReturnsReturns the OutboundPayment object in the returned state. Returns an error if the OutboundPayment has already been returned or cannot be returned