# Payouts ## Lookup a payout `client.Payouts.Get(ctx, id, query) (*PayoutV1, error)` **get** `/v1/payouts/{id}` Retrieves the details of an existing payout. Supply the unique payout `id` to retrieve the corresponding payout information. ### Parameters - `id string` - `query PayoutGetParams` - `CorrelationID param.Field[string]` Optional client generated identifier to trace and debug a series of requests. - `RequestID param.Field[string]` Optional client generated identifier to trace and debug a request. - `StraddleAccountID param.Field[string]` For use by platforms to specify an account id and set scope of a request. ### Returns - `type PayoutV1 struct{…}` - `Data PayoutV1Data` - `ID string` Unique identifier for the payout. - `Amount int64` The amount of the payout in cents. - `Config PayoutV1DataConfig` Configuration for the payout. - `AutoHold bool` Defines whether to automatically place this charge on hold after being created. - `AutoHoldMessage string` The reason the payout is being automatically held on creation. - `SandboxOutcome string` Payment will simulate processing if not Standard. - `const PayoutV1DataConfigSandboxOutcomeStandard PayoutV1DataConfigSandboxOutcome = "standard"` - `const PayoutV1DataConfigSandboxOutcomePaid PayoutV1DataConfigSandboxOutcome = "paid"` - `const PayoutV1DataConfigSandboxOutcomeOnHoldDailyLimit PayoutV1DataConfigSandboxOutcome = "on_hold_daily_limit"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForFraudRisk PayoutV1DataConfigSandboxOutcome = "cancelled_for_fraud_risk"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForBalanceCheck PayoutV1DataConfigSandboxOutcome = "cancelled_for_balance_check"` - `const PayoutV1DataConfigSandboxOutcomeFailedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "failed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeReversedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "reversed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeFailedCustomerDispute PayoutV1DataConfigSandboxOutcome = "failed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeReversedCustomerDispute PayoutV1DataConfigSandboxOutcome = "reversed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeFailedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "failed_closed_bank_account"` - `const PayoutV1DataConfigSandboxOutcomeReversedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "reversed_closed_bank_account"` - `Currency string` The currency of the payout. Only USD is supported. - `Description string` An arbitrary description for the payout. - `Device DeviceInfoV1` Information about the device used when the customer authorized the payout. - `IPAddress string` The IP address of the device used when the customer authorized the charge or payout. Use `0.0.0.0` to represent an offline consent interaction. - `ExternalID string` Unique identifier for the payout in your database. This value must be unique across all payouts. - `FundingIDs []string` Funding Ids - `Paykey string` Value of the `paykey` used for the payout. - `PaymentDate Time` The desired date on which the payment should be occur. For payouts, this means the date you want the funds to be sent from your bank account. - `Status string` The current status of the payout. - `const PayoutV1DataStatusCreated PayoutV1DataStatus = "created"` - `const PayoutV1DataStatusScheduled PayoutV1DataStatus = "scheduled"` - `const PayoutV1DataStatusFailed PayoutV1DataStatus = "failed"` - `const PayoutV1DataStatusCancelled PayoutV1DataStatus = "cancelled"` - `const PayoutV1DataStatusOnHold PayoutV1DataStatus = "on_hold"` - `const PayoutV1DataStatusPending PayoutV1DataStatus = "pending"` - `const PayoutV1DataStatusPaid PayoutV1DataStatus = "paid"` - `const PayoutV1DataStatusReversed PayoutV1DataStatus = "reversed"` - `const PayoutV1DataStatusValidating PayoutV1DataStatus = "validating"` - `StatusDetails StatusDetailsV1` Details about the current status of the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason StatusDetailsV1Reason` A machine-readable identifier for the specific status, useful for programmatic handling. - `const StatusDetailsV1ReasonInsufficientFunds StatusDetailsV1Reason = "insufficient_funds"` - `const StatusDetailsV1ReasonClosedBankAccount StatusDetailsV1Reason = "closed_bank_account"` - `const StatusDetailsV1ReasonInvalidBankAccount StatusDetailsV1Reason = "invalid_bank_account"` - `const StatusDetailsV1ReasonInvalidRouting StatusDetailsV1Reason = "invalid_routing"` - `const StatusDetailsV1ReasonDisputed StatusDetailsV1Reason = "disputed"` - `const StatusDetailsV1ReasonPaymentStopped StatusDetailsV1Reason = "payment_stopped"` - `const StatusDetailsV1ReasonOwnerDeceased StatusDetailsV1Reason = "owner_deceased"` - `const StatusDetailsV1ReasonFrozenBankAccount StatusDetailsV1Reason = "frozen_bank_account"` - `const StatusDetailsV1ReasonRiskReview StatusDetailsV1Reason = "risk_review"` - `const StatusDetailsV1ReasonFraudulent StatusDetailsV1Reason = "fraudulent"` - `const StatusDetailsV1ReasonDuplicateEntry StatusDetailsV1Reason = "duplicate_entry"` - `const StatusDetailsV1ReasonInvalidPaykey StatusDetailsV1Reason = "invalid_paykey"` - `const StatusDetailsV1ReasonPaymentBlocked StatusDetailsV1Reason = "payment_blocked"` - `const StatusDetailsV1ReasonAmountTooLarge StatusDetailsV1Reason = "amount_too_large"` - `const StatusDetailsV1ReasonTooManyAttempts StatusDetailsV1Reason = "too_many_attempts"` - `const StatusDetailsV1ReasonInternalSystemError StatusDetailsV1Reason = "internal_system_error"` - `const StatusDetailsV1ReasonUserRequest StatusDetailsV1Reason = "user_request"` - `const StatusDetailsV1ReasonOk StatusDetailsV1Reason = "ok"` - `const StatusDetailsV1ReasonOtherNetworkReturn StatusDetailsV1Reason = "other_network_return"` - `const StatusDetailsV1ReasonPayoutRefused StatusDetailsV1Reason = "payout_refused"` - `const StatusDetailsV1ReasonCancelRequest StatusDetailsV1Reason = "cancel_request"` - `const StatusDetailsV1ReasonFailedVerification StatusDetailsV1Reason = "failed_verification"` - `const StatusDetailsV1ReasonRequireReview StatusDetailsV1Reason = "require_review"` - `const StatusDetailsV1ReasonBlockedBySystem StatusDetailsV1Reason = "blocked_by_system"` - `const StatusDetailsV1ReasonWatchtowerReview StatusDetailsV1Reason = "watchtower_review"` - `const StatusDetailsV1ReasonValidating StatusDetailsV1Reason = "validating"` - `const StatusDetailsV1ReasonAutoHold StatusDetailsV1Reason = "auto_hold"` - `Source StatusDetailsV1Source` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const StatusDetailsV1SourceWatchtower StatusDetailsV1Source = "watchtower"` - `const StatusDetailsV1SourceBankDecline StatusDetailsV1Source = "bank_decline"` - `const StatusDetailsV1SourceCustomerDispute StatusDetailsV1Source = "customer_dispute"` - `const StatusDetailsV1SourceUserAction StatusDetailsV1Source = "user_action"` - `const StatusDetailsV1SourceSystem StatusDetailsV1Source = "system"` - `Code string` The status code if applicable. - `StatusHistory []PayoutV1DataStatusHistory` History of the status changes for the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the status. - `Reason string` A machine-readable identifier for the specific status, useful for programmatic handling. - `const PayoutV1DataStatusHistoryReasonInsufficientFunds PayoutV1DataStatusHistoryReason = "insufficient_funds"` - `const PayoutV1DataStatusHistoryReasonClosedBankAccount PayoutV1DataStatusHistoryReason = "closed_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidBankAccount PayoutV1DataStatusHistoryReason = "invalid_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidRouting PayoutV1DataStatusHistoryReason = "invalid_routing"` - `const PayoutV1DataStatusHistoryReasonDisputed PayoutV1DataStatusHistoryReason = "disputed"` - `const PayoutV1DataStatusHistoryReasonPaymentStopped PayoutV1DataStatusHistoryReason = "payment_stopped"` - `const PayoutV1DataStatusHistoryReasonOwnerDeceased PayoutV1DataStatusHistoryReason = "owner_deceased"` - `const PayoutV1DataStatusHistoryReasonFrozenBankAccount PayoutV1DataStatusHistoryReason = "frozen_bank_account"` - `const PayoutV1DataStatusHistoryReasonRiskReview PayoutV1DataStatusHistoryReason = "risk_review"` - `const PayoutV1DataStatusHistoryReasonFraudulent PayoutV1DataStatusHistoryReason = "fraudulent"` - `const PayoutV1DataStatusHistoryReasonDuplicateEntry PayoutV1DataStatusHistoryReason = "duplicate_entry"` - `const PayoutV1DataStatusHistoryReasonInvalidPaykey PayoutV1DataStatusHistoryReason = "invalid_paykey"` - `const PayoutV1DataStatusHistoryReasonPaymentBlocked PayoutV1DataStatusHistoryReason = "payment_blocked"` - `const PayoutV1DataStatusHistoryReasonAmountTooLarge PayoutV1DataStatusHistoryReason = "amount_too_large"` - `const PayoutV1DataStatusHistoryReasonTooManyAttempts PayoutV1DataStatusHistoryReason = "too_many_attempts"` - `const PayoutV1DataStatusHistoryReasonInternalSystemError PayoutV1DataStatusHistoryReason = "internal_system_error"` - `const PayoutV1DataStatusHistoryReasonUserRequest PayoutV1DataStatusHistoryReason = "user_request"` - `const PayoutV1DataStatusHistoryReasonOk PayoutV1DataStatusHistoryReason = "ok"` - `const PayoutV1DataStatusHistoryReasonOtherNetworkReturn PayoutV1DataStatusHistoryReason = "other_network_return"` - `const PayoutV1DataStatusHistoryReasonPayoutRefused PayoutV1DataStatusHistoryReason = "payout_refused"` - `const PayoutV1DataStatusHistoryReasonCancelRequest PayoutV1DataStatusHistoryReason = "cancel_request"` - `const PayoutV1DataStatusHistoryReasonFailedVerification PayoutV1DataStatusHistoryReason = "failed_verification"` - `const PayoutV1DataStatusHistoryReasonRequireReview PayoutV1DataStatusHistoryReason = "require_review"` - `const PayoutV1DataStatusHistoryReasonBlockedBySystem PayoutV1DataStatusHistoryReason = "blocked_by_system"` - `const PayoutV1DataStatusHistoryReasonWatchtowerReview PayoutV1DataStatusHistoryReason = "watchtower_review"` - `const PayoutV1DataStatusHistoryReasonValidating PayoutV1DataStatusHistoryReason = "validating"` - `const PayoutV1DataStatusHistoryReasonAutoHold PayoutV1DataStatusHistoryReason = "auto_hold"` - `Source string` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const PayoutV1DataStatusHistorySourceWatchtower PayoutV1DataStatusHistorySource = "watchtower"` - `const PayoutV1DataStatusHistorySourceBankDecline PayoutV1DataStatusHistorySource = "bank_decline"` - `const PayoutV1DataStatusHistorySourceCustomerDispute PayoutV1DataStatusHistorySource = "customer_dispute"` - `const PayoutV1DataStatusHistorySourceUserAction PayoutV1DataStatusHistorySource = "user_action"` - `const PayoutV1DataStatusHistorySourceSystem PayoutV1DataStatusHistorySource = "system"` - `Status string` The current status of the `charge` or `payout`. - `const PayoutV1DataStatusHistoryStatusCreated PayoutV1DataStatusHistoryStatus = "created"` - `const PayoutV1DataStatusHistoryStatusScheduled PayoutV1DataStatusHistoryStatus = "scheduled"` - `const PayoutV1DataStatusHistoryStatusFailed PayoutV1DataStatusHistoryStatus = "failed"` - `const PayoutV1DataStatusHistoryStatusCancelled PayoutV1DataStatusHistoryStatus = "cancelled"` - `const PayoutV1DataStatusHistoryStatusOnHold PayoutV1DataStatusHistoryStatus = "on_hold"` - `const PayoutV1DataStatusHistoryStatusPending PayoutV1DataStatusHistoryStatus = "pending"` - `const PayoutV1DataStatusHistoryStatusPaid PayoutV1DataStatusHistoryStatus = "paid"` - `const PayoutV1DataStatusHistoryStatusReversed PayoutV1DataStatusHistoryStatus = "reversed"` - `const PayoutV1DataStatusHistoryStatusValidating PayoutV1DataStatusHistoryStatus = "validating"` - `Code string` The status code if applicable. - `TraceIDs map[string, string]` Trace Ids. - `CreatedAt Time` The time the payout was created. - `CustomerDetails CustomerDetailsV1` Information about the customer associated with the payout. - `ID string` Unique identifier for the customer - `CustomerType CustomerDetailsV1CustomerType` The type of customer - `const CustomerDetailsV1CustomerTypeIndividual CustomerDetailsV1CustomerType = "individual"` - `const CustomerDetailsV1CustomerTypeBusiness CustomerDetailsV1CustomerType = "business"` - `Email string` The customer's email address - `Name string` The name of the customer - `Phone string` The customer's phone number in E.164 format - `EffectiveAt Time` The actual date on which the payment occurred. For payouts, this is the date the funds were sent from your bank account. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format. - `PaykeyDetails PaykeyDetailsV1` Information about the paykey used for the payout. - `ID string` Unique identifier for the paykey. - `CustomerID string` Unique identifier for the customer associated with the paykey. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Balance int64` The most recent balance of the bank account associated with the paykey in dollars. - `PaymentRail string` The payment rail used for the payout. - `const PayoutV1DataPaymentRailACH PayoutV1DataPaymentRail = "ach"` - `ProcessedAt Time` The time the payout was processed by Straddle and originated to the payment rail. - `RelatedPayments map[string, string]` Related payments. - `const PayoutV1DataRelatedPaymentOriginal PayoutV1DataRelatedPayment = "original"` - `const PayoutV1DataRelatedPaymentResubmit PayoutV1DataRelatedPayment = "resubmit"` - `const PayoutV1DataRelatedPaymentRefund PayoutV1DataRelatedPayment = "refund"` - `UpdatedAt Time` The time the payout was last updated. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType PayoutV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const PayoutV1ResponseTypeObject PayoutV1ResponseType = "object"` - `const PayoutV1ResponseTypeArray PayoutV1ResponseType = "array"` - `const PayoutV1ResponseTypeError PayoutV1ResponseType = "error"` - `const PayoutV1ResponseTypeNone PayoutV1ResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) payoutV1, err := client.Payouts.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.PayoutGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", payoutV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "amount": 10000, "config": { "auto_hold": true, "auto_hold_message": "auto_hold_message", "sandbox_outcome": "standard" }, "currency": "currency", "description": "description", "device": { "ip_address": "192.168.1.1" }, "external_id": "external_id", "funding_ids": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "paykey": "paykey", "payment_date": "2019-12-27", "status": "created", "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "system", "code": null }, "status_history": [ { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "watchtower", "status": "created", "code": null } ], "trace_ids": { "foo": "string" }, "created_at": "2019-12-27T18:11:19.117Z", "customer_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_type": "individual", "email": "ron@swanson.com", "name": "Ron Swanson", "phone": "+1234567890" }, "effective_at": "2019-12-27T18:11:19.117Z", "metadata": { "foo": "string" }, "paykey_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "label": "Bank of America ****1234", "balance": 0 }, "payment_rail": "ach", "processed_at": "2019-12-27T18:11:19.117Z", "related_payments": { "foo": "original" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Update a payout `client.Payouts.Update(ctx, id, params) (*PayoutV1, error)` **put** `/v1/payouts/{id}` Update the details of a payout prior to processing. The status of the payout must be `created`, `scheduled`, or `on_hold`. ### Parameters - `id string` - `params PayoutUpdateParams` - `Amount param.Field[int64]` Body param: The amount of the payout in cents. - `Description param.Field[string]` Body param: An arbitrary description for the payout. - `PaymentDate param.Field[Time]` Body param: The desired date on which the payment should be occur. For payouts, this means the date you want the funds to be sent from your bank account. - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format. - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Header param: Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. - `StraddleAccountID param.Field[string]` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `type PayoutV1 struct{…}` - `Data PayoutV1Data` - `ID string` Unique identifier for the payout. - `Amount int64` The amount of the payout in cents. - `Config PayoutV1DataConfig` Configuration for the payout. - `AutoHold bool` Defines whether to automatically place this charge on hold after being created. - `AutoHoldMessage string` The reason the payout is being automatically held on creation. - `SandboxOutcome string` Payment will simulate processing if not Standard. - `const PayoutV1DataConfigSandboxOutcomeStandard PayoutV1DataConfigSandboxOutcome = "standard"` - `const PayoutV1DataConfigSandboxOutcomePaid PayoutV1DataConfigSandboxOutcome = "paid"` - `const PayoutV1DataConfigSandboxOutcomeOnHoldDailyLimit PayoutV1DataConfigSandboxOutcome = "on_hold_daily_limit"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForFraudRisk PayoutV1DataConfigSandboxOutcome = "cancelled_for_fraud_risk"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForBalanceCheck PayoutV1DataConfigSandboxOutcome = "cancelled_for_balance_check"` - `const PayoutV1DataConfigSandboxOutcomeFailedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "failed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeReversedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "reversed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeFailedCustomerDispute PayoutV1DataConfigSandboxOutcome = "failed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeReversedCustomerDispute PayoutV1DataConfigSandboxOutcome = "reversed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeFailedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "failed_closed_bank_account"` - `const PayoutV1DataConfigSandboxOutcomeReversedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "reversed_closed_bank_account"` - `Currency string` The currency of the payout. Only USD is supported. - `Description string` An arbitrary description for the payout. - `Device DeviceInfoV1` Information about the device used when the customer authorized the payout. - `IPAddress string` The IP address of the device used when the customer authorized the charge or payout. Use `0.0.0.0` to represent an offline consent interaction. - `ExternalID string` Unique identifier for the payout in your database. This value must be unique across all payouts. - `FundingIDs []string` Funding Ids - `Paykey string` Value of the `paykey` used for the payout. - `PaymentDate Time` The desired date on which the payment should be occur. For payouts, this means the date you want the funds to be sent from your bank account. - `Status string` The current status of the payout. - `const PayoutV1DataStatusCreated PayoutV1DataStatus = "created"` - `const PayoutV1DataStatusScheduled PayoutV1DataStatus = "scheduled"` - `const PayoutV1DataStatusFailed PayoutV1DataStatus = "failed"` - `const PayoutV1DataStatusCancelled PayoutV1DataStatus = "cancelled"` - `const PayoutV1DataStatusOnHold PayoutV1DataStatus = "on_hold"` - `const PayoutV1DataStatusPending PayoutV1DataStatus = "pending"` - `const PayoutV1DataStatusPaid PayoutV1DataStatus = "paid"` - `const PayoutV1DataStatusReversed PayoutV1DataStatus = "reversed"` - `const PayoutV1DataStatusValidating PayoutV1DataStatus = "validating"` - `StatusDetails StatusDetailsV1` Details about the current status of the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason StatusDetailsV1Reason` A machine-readable identifier for the specific status, useful for programmatic handling. - `const StatusDetailsV1ReasonInsufficientFunds StatusDetailsV1Reason = "insufficient_funds"` - `const StatusDetailsV1ReasonClosedBankAccount StatusDetailsV1Reason = "closed_bank_account"` - `const StatusDetailsV1ReasonInvalidBankAccount StatusDetailsV1Reason = "invalid_bank_account"` - `const StatusDetailsV1ReasonInvalidRouting StatusDetailsV1Reason = "invalid_routing"` - `const StatusDetailsV1ReasonDisputed StatusDetailsV1Reason = "disputed"` - `const StatusDetailsV1ReasonPaymentStopped StatusDetailsV1Reason = "payment_stopped"` - `const StatusDetailsV1ReasonOwnerDeceased StatusDetailsV1Reason = "owner_deceased"` - `const StatusDetailsV1ReasonFrozenBankAccount StatusDetailsV1Reason = "frozen_bank_account"` - `const StatusDetailsV1ReasonRiskReview StatusDetailsV1Reason = "risk_review"` - `const StatusDetailsV1ReasonFraudulent StatusDetailsV1Reason = "fraudulent"` - `const StatusDetailsV1ReasonDuplicateEntry StatusDetailsV1Reason = "duplicate_entry"` - `const StatusDetailsV1ReasonInvalidPaykey StatusDetailsV1Reason = "invalid_paykey"` - `const StatusDetailsV1ReasonPaymentBlocked StatusDetailsV1Reason = "payment_blocked"` - `const StatusDetailsV1ReasonAmountTooLarge StatusDetailsV1Reason = "amount_too_large"` - `const StatusDetailsV1ReasonTooManyAttempts StatusDetailsV1Reason = "too_many_attempts"` - `const StatusDetailsV1ReasonInternalSystemError StatusDetailsV1Reason = "internal_system_error"` - `const StatusDetailsV1ReasonUserRequest StatusDetailsV1Reason = "user_request"` - `const StatusDetailsV1ReasonOk StatusDetailsV1Reason = "ok"` - `const StatusDetailsV1ReasonOtherNetworkReturn StatusDetailsV1Reason = "other_network_return"` - `const StatusDetailsV1ReasonPayoutRefused StatusDetailsV1Reason = "payout_refused"` - `const StatusDetailsV1ReasonCancelRequest StatusDetailsV1Reason = "cancel_request"` - `const StatusDetailsV1ReasonFailedVerification StatusDetailsV1Reason = "failed_verification"` - `const StatusDetailsV1ReasonRequireReview StatusDetailsV1Reason = "require_review"` - `const StatusDetailsV1ReasonBlockedBySystem StatusDetailsV1Reason = "blocked_by_system"` - `const StatusDetailsV1ReasonWatchtowerReview StatusDetailsV1Reason = "watchtower_review"` - `const StatusDetailsV1ReasonValidating StatusDetailsV1Reason = "validating"` - `const StatusDetailsV1ReasonAutoHold StatusDetailsV1Reason = "auto_hold"` - `Source StatusDetailsV1Source` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const StatusDetailsV1SourceWatchtower StatusDetailsV1Source = "watchtower"` - `const StatusDetailsV1SourceBankDecline StatusDetailsV1Source = "bank_decline"` - `const StatusDetailsV1SourceCustomerDispute StatusDetailsV1Source = "customer_dispute"` - `const StatusDetailsV1SourceUserAction StatusDetailsV1Source = "user_action"` - `const StatusDetailsV1SourceSystem StatusDetailsV1Source = "system"` - `Code string` The status code if applicable. - `StatusHistory []PayoutV1DataStatusHistory` History of the status changes for the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the status. - `Reason string` A machine-readable identifier for the specific status, useful for programmatic handling. - `const PayoutV1DataStatusHistoryReasonInsufficientFunds PayoutV1DataStatusHistoryReason = "insufficient_funds"` - `const PayoutV1DataStatusHistoryReasonClosedBankAccount PayoutV1DataStatusHistoryReason = "closed_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidBankAccount PayoutV1DataStatusHistoryReason = "invalid_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidRouting PayoutV1DataStatusHistoryReason = "invalid_routing"` - `const PayoutV1DataStatusHistoryReasonDisputed PayoutV1DataStatusHistoryReason = "disputed"` - `const PayoutV1DataStatusHistoryReasonPaymentStopped PayoutV1DataStatusHistoryReason = "payment_stopped"` - `const PayoutV1DataStatusHistoryReasonOwnerDeceased PayoutV1DataStatusHistoryReason = "owner_deceased"` - `const PayoutV1DataStatusHistoryReasonFrozenBankAccount PayoutV1DataStatusHistoryReason = "frozen_bank_account"` - `const PayoutV1DataStatusHistoryReasonRiskReview PayoutV1DataStatusHistoryReason = "risk_review"` - `const PayoutV1DataStatusHistoryReasonFraudulent PayoutV1DataStatusHistoryReason = "fraudulent"` - `const PayoutV1DataStatusHistoryReasonDuplicateEntry PayoutV1DataStatusHistoryReason = "duplicate_entry"` - `const PayoutV1DataStatusHistoryReasonInvalidPaykey PayoutV1DataStatusHistoryReason = "invalid_paykey"` - `const PayoutV1DataStatusHistoryReasonPaymentBlocked PayoutV1DataStatusHistoryReason = "payment_blocked"` - `const PayoutV1DataStatusHistoryReasonAmountTooLarge PayoutV1DataStatusHistoryReason = "amount_too_large"` - `const PayoutV1DataStatusHistoryReasonTooManyAttempts PayoutV1DataStatusHistoryReason = "too_many_attempts"` - `const PayoutV1DataStatusHistoryReasonInternalSystemError PayoutV1DataStatusHistoryReason = "internal_system_error"` - `const PayoutV1DataStatusHistoryReasonUserRequest PayoutV1DataStatusHistoryReason = "user_request"` - `const PayoutV1DataStatusHistoryReasonOk PayoutV1DataStatusHistoryReason = "ok"` - `const PayoutV1DataStatusHistoryReasonOtherNetworkReturn PayoutV1DataStatusHistoryReason = "other_network_return"` - `const PayoutV1DataStatusHistoryReasonPayoutRefused PayoutV1DataStatusHistoryReason = "payout_refused"` - `const PayoutV1DataStatusHistoryReasonCancelRequest PayoutV1DataStatusHistoryReason = "cancel_request"` - `const PayoutV1DataStatusHistoryReasonFailedVerification PayoutV1DataStatusHistoryReason = "failed_verification"` - `const PayoutV1DataStatusHistoryReasonRequireReview PayoutV1DataStatusHistoryReason = "require_review"` - `const PayoutV1DataStatusHistoryReasonBlockedBySystem PayoutV1DataStatusHistoryReason = "blocked_by_system"` - `const PayoutV1DataStatusHistoryReasonWatchtowerReview PayoutV1DataStatusHistoryReason = "watchtower_review"` - `const PayoutV1DataStatusHistoryReasonValidating PayoutV1DataStatusHistoryReason = "validating"` - `const PayoutV1DataStatusHistoryReasonAutoHold PayoutV1DataStatusHistoryReason = "auto_hold"` - `Source string` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const PayoutV1DataStatusHistorySourceWatchtower PayoutV1DataStatusHistorySource = "watchtower"` - `const PayoutV1DataStatusHistorySourceBankDecline PayoutV1DataStatusHistorySource = "bank_decline"` - `const PayoutV1DataStatusHistorySourceCustomerDispute PayoutV1DataStatusHistorySource = "customer_dispute"` - `const PayoutV1DataStatusHistorySourceUserAction PayoutV1DataStatusHistorySource = "user_action"` - `const PayoutV1DataStatusHistorySourceSystem PayoutV1DataStatusHistorySource = "system"` - `Status string` The current status of the `charge` or `payout`. - `const PayoutV1DataStatusHistoryStatusCreated PayoutV1DataStatusHistoryStatus = "created"` - `const PayoutV1DataStatusHistoryStatusScheduled PayoutV1DataStatusHistoryStatus = "scheduled"` - `const PayoutV1DataStatusHistoryStatusFailed PayoutV1DataStatusHistoryStatus = "failed"` - `const PayoutV1DataStatusHistoryStatusCancelled PayoutV1DataStatusHistoryStatus = "cancelled"` - `const PayoutV1DataStatusHistoryStatusOnHold PayoutV1DataStatusHistoryStatus = "on_hold"` - `const PayoutV1DataStatusHistoryStatusPending PayoutV1DataStatusHistoryStatus = "pending"` - `const PayoutV1DataStatusHistoryStatusPaid PayoutV1DataStatusHistoryStatus = "paid"` - `const PayoutV1DataStatusHistoryStatusReversed PayoutV1DataStatusHistoryStatus = "reversed"` - `const PayoutV1DataStatusHistoryStatusValidating PayoutV1DataStatusHistoryStatus = "validating"` - `Code string` The status code if applicable. - `TraceIDs map[string, string]` Trace Ids. - `CreatedAt Time` The time the payout was created. - `CustomerDetails CustomerDetailsV1` Information about the customer associated with the payout. - `ID string` Unique identifier for the customer - `CustomerType CustomerDetailsV1CustomerType` The type of customer - `const CustomerDetailsV1CustomerTypeIndividual CustomerDetailsV1CustomerType = "individual"` - `const CustomerDetailsV1CustomerTypeBusiness CustomerDetailsV1CustomerType = "business"` - `Email string` The customer's email address - `Name string` The name of the customer - `Phone string` The customer's phone number in E.164 format - `EffectiveAt Time` The actual date on which the payment occurred. For payouts, this is the date the funds were sent from your bank account. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format. - `PaykeyDetails PaykeyDetailsV1` Information about the paykey used for the payout. - `ID string` Unique identifier for the paykey. - `CustomerID string` Unique identifier for the customer associated with the paykey. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Balance int64` The most recent balance of the bank account associated with the paykey in dollars. - `PaymentRail string` The payment rail used for the payout. - `const PayoutV1DataPaymentRailACH PayoutV1DataPaymentRail = "ach"` - `ProcessedAt Time` The time the payout was processed by Straddle and originated to the payment rail. - `RelatedPayments map[string, string]` Related payments. - `const PayoutV1DataRelatedPaymentOriginal PayoutV1DataRelatedPayment = "original"` - `const PayoutV1DataRelatedPaymentResubmit PayoutV1DataRelatedPayment = "resubmit"` - `const PayoutV1DataRelatedPaymentRefund PayoutV1DataRelatedPayment = "refund"` - `UpdatedAt Time` The time the payout was last updated. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType PayoutV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const PayoutV1ResponseTypeObject PayoutV1ResponseType = "object"` - `const PayoutV1ResponseTypeArray PayoutV1ResponseType = "array"` - `const PayoutV1ResponseTypeError PayoutV1ResponseType = "error"` - `const PayoutV1ResponseTypeNone PayoutV1ResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "time" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) payoutV1, err := client.Payouts.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.PayoutUpdateParams{ Amount: 10000, Description: straddle.String("description"), PaymentDate: time.Now(), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", payoutV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "amount": 10000, "config": { "auto_hold": true, "auto_hold_message": "auto_hold_message", "sandbox_outcome": "standard" }, "currency": "currency", "description": "description", "device": { "ip_address": "192.168.1.1" }, "external_id": "external_id", "funding_ids": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "paykey": "paykey", "payment_date": "2019-12-27", "status": "created", "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "system", "code": null }, "status_history": [ { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "watchtower", "status": "created", "code": null } ], "trace_ids": { "foo": "string" }, "created_at": "2019-12-27T18:11:19.117Z", "customer_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_type": "individual", "email": "ron@swanson.com", "name": "Ron Swanson", "phone": "+1234567890" }, "effective_at": "2019-12-27T18:11:19.117Z", "metadata": { "foo": "string" }, "paykey_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "label": "Bank of America ****1234", "balance": 0 }, "payment_rail": "ach", "processed_at": "2019-12-27T18:11:19.117Z", "related_payments": { "foo": "original" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Create a payout `client.Payouts.New(ctx, params) (*PayoutV1, error)` **post** `/v1/payouts` Use payouts to send money to your customers. ### Parameters - `params PayoutNewParams` - `Amount param.Field[int64]` Body param: The amount of the payout in cents. - `Currency param.Field[string]` Body param: The currency of the payout. Only USD is supported. - `Description param.Field[string]` Body param: An arbitrary description for the payout. - `Device param.Field[DeviceInfoV1]` Body param: Information about the device used when the customer authorized the payout. - `ExternalID param.Field[string]` Body param: Unique identifier for the payout in your database. This value must be unique across all payouts. - `Paykey param.Field[string]` Body param: Value of the `paykey` used for the payout. - `PaymentDate param.Field[Time]` Body param: The desired date on which the payout should be occur. For payouts, this means the date you want the funds to be sent from your bank account. - `Config param.Field[PayoutNewParamsConfig]` Body param - `AutoHold bool` Defines whether to automatically place this charge on hold after being created. - `AutoHoldMessage string` The reason the payout is being automatically held on creation. - `SandboxOutcome string` Payment will simulate processing if not Standard. - `const PayoutNewParamsConfigSandboxOutcomeStandard PayoutNewParamsConfigSandboxOutcome = "standard"` - `const PayoutNewParamsConfigSandboxOutcomePaid PayoutNewParamsConfigSandboxOutcome = "paid"` - `const PayoutNewParamsConfigSandboxOutcomeOnHoldDailyLimit PayoutNewParamsConfigSandboxOutcome = "on_hold_daily_limit"` - `const PayoutNewParamsConfigSandboxOutcomeCancelledForFraudRisk PayoutNewParamsConfigSandboxOutcome = "cancelled_for_fraud_risk"` - `const PayoutNewParamsConfigSandboxOutcomeCancelledForBalanceCheck PayoutNewParamsConfigSandboxOutcome = "cancelled_for_balance_check"` - `const PayoutNewParamsConfigSandboxOutcomeFailedInsufficientFunds PayoutNewParamsConfigSandboxOutcome = "failed_insufficient_funds"` - `const PayoutNewParamsConfigSandboxOutcomeReversedInsufficientFunds PayoutNewParamsConfigSandboxOutcome = "reversed_insufficient_funds"` - `const PayoutNewParamsConfigSandboxOutcomeFailedCustomerDispute PayoutNewParamsConfigSandboxOutcome = "failed_customer_dispute"` - `const PayoutNewParamsConfigSandboxOutcomeReversedCustomerDispute PayoutNewParamsConfigSandboxOutcome = "reversed_customer_dispute"` - `const PayoutNewParamsConfigSandboxOutcomeFailedClosedBankAccount PayoutNewParamsConfigSandboxOutcome = "failed_closed_bank_account"` - `const PayoutNewParamsConfigSandboxOutcomeReversedClosedBankAccount PayoutNewParamsConfigSandboxOutcome = "reversed_closed_bank_account"` - `Metadata param.Field[map[string, string]]` Body param: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format. - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Header param: Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. - `StraddleAccountID param.Field[string]` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `type PayoutV1 struct{…}` - `Data PayoutV1Data` - `ID string` Unique identifier for the payout. - `Amount int64` The amount of the payout in cents. - `Config PayoutV1DataConfig` Configuration for the payout. - `AutoHold bool` Defines whether to automatically place this charge on hold after being created. - `AutoHoldMessage string` The reason the payout is being automatically held on creation. - `SandboxOutcome string` Payment will simulate processing if not Standard. - `const PayoutV1DataConfigSandboxOutcomeStandard PayoutV1DataConfigSandboxOutcome = "standard"` - `const PayoutV1DataConfigSandboxOutcomePaid PayoutV1DataConfigSandboxOutcome = "paid"` - `const PayoutV1DataConfigSandboxOutcomeOnHoldDailyLimit PayoutV1DataConfigSandboxOutcome = "on_hold_daily_limit"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForFraudRisk PayoutV1DataConfigSandboxOutcome = "cancelled_for_fraud_risk"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForBalanceCheck PayoutV1DataConfigSandboxOutcome = "cancelled_for_balance_check"` - `const PayoutV1DataConfigSandboxOutcomeFailedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "failed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeReversedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "reversed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeFailedCustomerDispute PayoutV1DataConfigSandboxOutcome = "failed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeReversedCustomerDispute PayoutV1DataConfigSandboxOutcome = "reversed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeFailedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "failed_closed_bank_account"` - `const PayoutV1DataConfigSandboxOutcomeReversedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "reversed_closed_bank_account"` - `Currency string` The currency of the payout. Only USD is supported. - `Description string` An arbitrary description for the payout. - `Device DeviceInfoV1` Information about the device used when the customer authorized the payout. - `IPAddress string` The IP address of the device used when the customer authorized the charge or payout. Use `0.0.0.0` to represent an offline consent interaction. - `ExternalID string` Unique identifier for the payout in your database. This value must be unique across all payouts. - `FundingIDs []string` Funding Ids - `Paykey string` Value of the `paykey` used for the payout. - `PaymentDate Time` The desired date on which the payment should be occur. For payouts, this means the date you want the funds to be sent from your bank account. - `Status string` The current status of the payout. - `const PayoutV1DataStatusCreated PayoutV1DataStatus = "created"` - `const PayoutV1DataStatusScheduled PayoutV1DataStatus = "scheduled"` - `const PayoutV1DataStatusFailed PayoutV1DataStatus = "failed"` - `const PayoutV1DataStatusCancelled PayoutV1DataStatus = "cancelled"` - `const PayoutV1DataStatusOnHold PayoutV1DataStatus = "on_hold"` - `const PayoutV1DataStatusPending PayoutV1DataStatus = "pending"` - `const PayoutV1DataStatusPaid PayoutV1DataStatus = "paid"` - `const PayoutV1DataStatusReversed PayoutV1DataStatus = "reversed"` - `const PayoutV1DataStatusValidating PayoutV1DataStatus = "validating"` - `StatusDetails StatusDetailsV1` Details about the current status of the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason StatusDetailsV1Reason` A machine-readable identifier for the specific status, useful for programmatic handling. - `const StatusDetailsV1ReasonInsufficientFunds StatusDetailsV1Reason = "insufficient_funds"` - `const StatusDetailsV1ReasonClosedBankAccount StatusDetailsV1Reason = "closed_bank_account"` - `const StatusDetailsV1ReasonInvalidBankAccount StatusDetailsV1Reason = "invalid_bank_account"` - `const StatusDetailsV1ReasonInvalidRouting StatusDetailsV1Reason = "invalid_routing"` - `const StatusDetailsV1ReasonDisputed StatusDetailsV1Reason = "disputed"` - `const StatusDetailsV1ReasonPaymentStopped StatusDetailsV1Reason = "payment_stopped"` - `const StatusDetailsV1ReasonOwnerDeceased StatusDetailsV1Reason = "owner_deceased"` - `const StatusDetailsV1ReasonFrozenBankAccount StatusDetailsV1Reason = "frozen_bank_account"` - `const StatusDetailsV1ReasonRiskReview StatusDetailsV1Reason = "risk_review"` - `const StatusDetailsV1ReasonFraudulent StatusDetailsV1Reason = "fraudulent"` - `const StatusDetailsV1ReasonDuplicateEntry StatusDetailsV1Reason = "duplicate_entry"` - `const StatusDetailsV1ReasonInvalidPaykey StatusDetailsV1Reason = "invalid_paykey"` - `const StatusDetailsV1ReasonPaymentBlocked StatusDetailsV1Reason = "payment_blocked"` - `const StatusDetailsV1ReasonAmountTooLarge StatusDetailsV1Reason = "amount_too_large"` - `const StatusDetailsV1ReasonTooManyAttempts StatusDetailsV1Reason = "too_many_attempts"` - `const StatusDetailsV1ReasonInternalSystemError StatusDetailsV1Reason = "internal_system_error"` - `const StatusDetailsV1ReasonUserRequest StatusDetailsV1Reason = "user_request"` - `const StatusDetailsV1ReasonOk StatusDetailsV1Reason = "ok"` - `const StatusDetailsV1ReasonOtherNetworkReturn StatusDetailsV1Reason = "other_network_return"` - `const StatusDetailsV1ReasonPayoutRefused StatusDetailsV1Reason = "payout_refused"` - `const StatusDetailsV1ReasonCancelRequest StatusDetailsV1Reason = "cancel_request"` - `const StatusDetailsV1ReasonFailedVerification StatusDetailsV1Reason = "failed_verification"` - `const StatusDetailsV1ReasonRequireReview StatusDetailsV1Reason = "require_review"` - `const StatusDetailsV1ReasonBlockedBySystem StatusDetailsV1Reason = "blocked_by_system"` - `const StatusDetailsV1ReasonWatchtowerReview StatusDetailsV1Reason = "watchtower_review"` - `const StatusDetailsV1ReasonValidating StatusDetailsV1Reason = "validating"` - `const StatusDetailsV1ReasonAutoHold StatusDetailsV1Reason = "auto_hold"` - `Source StatusDetailsV1Source` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const StatusDetailsV1SourceWatchtower StatusDetailsV1Source = "watchtower"` - `const StatusDetailsV1SourceBankDecline StatusDetailsV1Source = "bank_decline"` - `const StatusDetailsV1SourceCustomerDispute StatusDetailsV1Source = "customer_dispute"` - `const StatusDetailsV1SourceUserAction StatusDetailsV1Source = "user_action"` - `const StatusDetailsV1SourceSystem StatusDetailsV1Source = "system"` - `Code string` The status code if applicable. - `StatusHistory []PayoutV1DataStatusHistory` History of the status changes for the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the status. - `Reason string` A machine-readable identifier for the specific status, useful for programmatic handling. - `const PayoutV1DataStatusHistoryReasonInsufficientFunds PayoutV1DataStatusHistoryReason = "insufficient_funds"` - `const PayoutV1DataStatusHistoryReasonClosedBankAccount PayoutV1DataStatusHistoryReason = "closed_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidBankAccount PayoutV1DataStatusHistoryReason = "invalid_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidRouting PayoutV1DataStatusHistoryReason = "invalid_routing"` - `const PayoutV1DataStatusHistoryReasonDisputed PayoutV1DataStatusHistoryReason = "disputed"` - `const PayoutV1DataStatusHistoryReasonPaymentStopped PayoutV1DataStatusHistoryReason = "payment_stopped"` - `const PayoutV1DataStatusHistoryReasonOwnerDeceased PayoutV1DataStatusHistoryReason = "owner_deceased"` - `const PayoutV1DataStatusHistoryReasonFrozenBankAccount PayoutV1DataStatusHistoryReason = "frozen_bank_account"` - `const PayoutV1DataStatusHistoryReasonRiskReview PayoutV1DataStatusHistoryReason = "risk_review"` - `const PayoutV1DataStatusHistoryReasonFraudulent PayoutV1DataStatusHistoryReason = "fraudulent"` - `const PayoutV1DataStatusHistoryReasonDuplicateEntry PayoutV1DataStatusHistoryReason = "duplicate_entry"` - `const PayoutV1DataStatusHistoryReasonInvalidPaykey PayoutV1DataStatusHistoryReason = "invalid_paykey"` - `const PayoutV1DataStatusHistoryReasonPaymentBlocked PayoutV1DataStatusHistoryReason = "payment_blocked"` - `const PayoutV1DataStatusHistoryReasonAmountTooLarge PayoutV1DataStatusHistoryReason = "amount_too_large"` - `const PayoutV1DataStatusHistoryReasonTooManyAttempts PayoutV1DataStatusHistoryReason = "too_many_attempts"` - `const PayoutV1DataStatusHistoryReasonInternalSystemError PayoutV1DataStatusHistoryReason = "internal_system_error"` - `const PayoutV1DataStatusHistoryReasonUserRequest PayoutV1DataStatusHistoryReason = "user_request"` - `const PayoutV1DataStatusHistoryReasonOk PayoutV1DataStatusHistoryReason = "ok"` - `const PayoutV1DataStatusHistoryReasonOtherNetworkReturn PayoutV1DataStatusHistoryReason = "other_network_return"` - `const PayoutV1DataStatusHistoryReasonPayoutRefused PayoutV1DataStatusHistoryReason = "payout_refused"` - `const PayoutV1DataStatusHistoryReasonCancelRequest PayoutV1DataStatusHistoryReason = "cancel_request"` - `const PayoutV1DataStatusHistoryReasonFailedVerification PayoutV1DataStatusHistoryReason = "failed_verification"` - `const PayoutV1DataStatusHistoryReasonRequireReview PayoutV1DataStatusHistoryReason = "require_review"` - `const PayoutV1DataStatusHistoryReasonBlockedBySystem PayoutV1DataStatusHistoryReason = "blocked_by_system"` - `const PayoutV1DataStatusHistoryReasonWatchtowerReview PayoutV1DataStatusHistoryReason = "watchtower_review"` - `const PayoutV1DataStatusHistoryReasonValidating PayoutV1DataStatusHistoryReason = "validating"` - `const PayoutV1DataStatusHistoryReasonAutoHold PayoutV1DataStatusHistoryReason = "auto_hold"` - `Source string` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const PayoutV1DataStatusHistorySourceWatchtower PayoutV1DataStatusHistorySource = "watchtower"` - `const PayoutV1DataStatusHistorySourceBankDecline PayoutV1DataStatusHistorySource = "bank_decline"` - `const PayoutV1DataStatusHistorySourceCustomerDispute PayoutV1DataStatusHistorySource = "customer_dispute"` - `const PayoutV1DataStatusHistorySourceUserAction PayoutV1DataStatusHistorySource = "user_action"` - `const PayoutV1DataStatusHistorySourceSystem PayoutV1DataStatusHistorySource = "system"` - `Status string` The current status of the `charge` or `payout`. - `const PayoutV1DataStatusHistoryStatusCreated PayoutV1DataStatusHistoryStatus = "created"` - `const PayoutV1DataStatusHistoryStatusScheduled PayoutV1DataStatusHistoryStatus = "scheduled"` - `const PayoutV1DataStatusHistoryStatusFailed PayoutV1DataStatusHistoryStatus = "failed"` - `const PayoutV1DataStatusHistoryStatusCancelled PayoutV1DataStatusHistoryStatus = "cancelled"` - `const PayoutV1DataStatusHistoryStatusOnHold PayoutV1DataStatusHistoryStatus = "on_hold"` - `const PayoutV1DataStatusHistoryStatusPending PayoutV1DataStatusHistoryStatus = "pending"` - `const PayoutV1DataStatusHistoryStatusPaid PayoutV1DataStatusHistoryStatus = "paid"` - `const PayoutV1DataStatusHistoryStatusReversed PayoutV1DataStatusHistoryStatus = "reversed"` - `const PayoutV1DataStatusHistoryStatusValidating PayoutV1DataStatusHistoryStatus = "validating"` - `Code string` The status code if applicable. - `TraceIDs map[string, string]` Trace Ids. - `CreatedAt Time` The time the payout was created. - `CustomerDetails CustomerDetailsV1` Information about the customer associated with the payout. - `ID string` Unique identifier for the customer - `CustomerType CustomerDetailsV1CustomerType` The type of customer - `const CustomerDetailsV1CustomerTypeIndividual CustomerDetailsV1CustomerType = "individual"` - `const CustomerDetailsV1CustomerTypeBusiness CustomerDetailsV1CustomerType = "business"` - `Email string` The customer's email address - `Name string` The name of the customer - `Phone string` The customer's phone number in E.164 format - `EffectiveAt Time` The actual date on which the payment occurred. For payouts, this is the date the funds were sent from your bank account. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format. - `PaykeyDetails PaykeyDetailsV1` Information about the paykey used for the payout. - `ID string` Unique identifier for the paykey. - `CustomerID string` Unique identifier for the customer associated with the paykey. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Balance int64` The most recent balance of the bank account associated with the paykey in dollars. - `PaymentRail string` The payment rail used for the payout. - `const PayoutV1DataPaymentRailACH PayoutV1DataPaymentRail = "ach"` - `ProcessedAt Time` The time the payout was processed by Straddle and originated to the payment rail. - `RelatedPayments map[string, string]` Related payments. - `const PayoutV1DataRelatedPaymentOriginal PayoutV1DataRelatedPayment = "original"` - `const PayoutV1DataRelatedPaymentResubmit PayoutV1DataRelatedPayment = "resubmit"` - `const PayoutV1DataRelatedPaymentRefund PayoutV1DataRelatedPayment = "refund"` - `UpdatedAt Time` The time the payout was last updated. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType PayoutV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const PayoutV1ResponseTypeObject PayoutV1ResponseType = "object"` - `const PayoutV1ResponseTypeArray PayoutV1ResponseType = "array"` - `const PayoutV1ResponseTypeError PayoutV1ResponseType = "error"` - `const PayoutV1ResponseTypeNone PayoutV1ResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "time" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" "github.com/straddleio/straddle-go/shared" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) payoutV1, err := client.Payouts.New(context.TODO(), straddle.PayoutNewParams{ Amount: 10000, Currency: "currency", Description: straddle.String("Vendor invoice payment"), Device: shared.DeviceInfoV1Param{ IPAddress: "192.168.1.1", }, ExternalID: "external_id", Paykey: "paykey", PaymentDate: time.Now(), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", payoutV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "amount": 10000, "config": { "auto_hold": true, "auto_hold_message": "auto_hold_message", "sandbox_outcome": "standard" }, "currency": "currency", "description": "description", "device": { "ip_address": "192.168.1.1" }, "external_id": "external_id", "funding_ids": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "paykey": "paykey", "payment_date": "2019-12-27", "status": "created", "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "system", "code": null }, "status_history": [ { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "watchtower", "status": "created", "code": null } ], "trace_ids": { "foo": "string" }, "created_at": "2019-12-27T18:11:19.117Z", "customer_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_type": "individual", "email": "ron@swanson.com", "name": "Ron Swanson", "phone": "+1234567890" }, "effective_at": "2019-12-27T18:11:19.117Z", "metadata": { "foo": "string" }, "paykey_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "label": "Bank of America ****1234", "balance": 0 }, "payment_rail": "ach", "processed_at": "2019-12-27T18:11:19.117Z", "related_payments": { "foo": "original" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Hold a payout `client.Payouts.Hold(ctx, id, params) (*PayoutV1, error)` **put** `/v1/payouts/{id}/hold` Hold a payout to prevent it from being processed. The status of the payout must be `created`, `scheduled`, or `on_hold`. ### Parameters - `id string` - `params PayoutHoldParams` - `Reason param.Field[string]` Body param: Details about why the payout status was updated. - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Header param: Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. - `StraddleAccountID param.Field[string]` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `type PayoutV1 struct{…}` - `Data PayoutV1Data` - `ID string` Unique identifier for the payout. - `Amount int64` The amount of the payout in cents. - `Config PayoutV1DataConfig` Configuration for the payout. - `AutoHold bool` Defines whether to automatically place this charge on hold after being created. - `AutoHoldMessage string` The reason the payout is being automatically held on creation. - `SandboxOutcome string` Payment will simulate processing if not Standard. - `const PayoutV1DataConfigSandboxOutcomeStandard PayoutV1DataConfigSandboxOutcome = "standard"` - `const PayoutV1DataConfigSandboxOutcomePaid PayoutV1DataConfigSandboxOutcome = "paid"` - `const PayoutV1DataConfigSandboxOutcomeOnHoldDailyLimit PayoutV1DataConfigSandboxOutcome = "on_hold_daily_limit"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForFraudRisk PayoutV1DataConfigSandboxOutcome = "cancelled_for_fraud_risk"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForBalanceCheck PayoutV1DataConfigSandboxOutcome = "cancelled_for_balance_check"` - `const PayoutV1DataConfigSandboxOutcomeFailedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "failed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeReversedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "reversed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeFailedCustomerDispute PayoutV1DataConfigSandboxOutcome = "failed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeReversedCustomerDispute PayoutV1DataConfigSandboxOutcome = "reversed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeFailedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "failed_closed_bank_account"` - `const PayoutV1DataConfigSandboxOutcomeReversedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "reversed_closed_bank_account"` - `Currency string` The currency of the payout. Only USD is supported. - `Description string` An arbitrary description for the payout. - `Device DeviceInfoV1` Information about the device used when the customer authorized the payout. - `IPAddress string` The IP address of the device used when the customer authorized the charge or payout. Use `0.0.0.0` to represent an offline consent interaction. - `ExternalID string` Unique identifier for the payout in your database. This value must be unique across all payouts. - `FundingIDs []string` Funding Ids - `Paykey string` Value of the `paykey` used for the payout. - `PaymentDate Time` The desired date on which the payment should be occur. For payouts, this means the date you want the funds to be sent from your bank account. - `Status string` The current status of the payout. - `const PayoutV1DataStatusCreated PayoutV1DataStatus = "created"` - `const PayoutV1DataStatusScheduled PayoutV1DataStatus = "scheduled"` - `const PayoutV1DataStatusFailed PayoutV1DataStatus = "failed"` - `const PayoutV1DataStatusCancelled PayoutV1DataStatus = "cancelled"` - `const PayoutV1DataStatusOnHold PayoutV1DataStatus = "on_hold"` - `const PayoutV1DataStatusPending PayoutV1DataStatus = "pending"` - `const PayoutV1DataStatusPaid PayoutV1DataStatus = "paid"` - `const PayoutV1DataStatusReversed PayoutV1DataStatus = "reversed"` - `const PayoutV1DataStatusValidating PayoutV1DataStatus = "validating"` - `StatusDetails StatusDetailsV1` Details about the current status of the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason StatusDetailsV1Reason` A machine-readable identifier for the specific status, useful for programmatic handling. - `const StatusDetailsV1ReasonInsufficientFunds StatusDetailsV1Reason = "insufficient_funds"` - `const StatusDetailsV1ReasonClosedBankAccount StatusDetailsV1Reason = "closed_bank_account"` - `const StatusDetailsV1ReasonInvalidBankAccount StatusDetailsV1Reason = "invalid_bank_account"` - `const StatusDetailsV1ReasonInvalidRouting StatusDetailsV1Reason = "invalid_routing"` - `const StatusDetailsV1ReasonDisputed StatusDetailsV1Reason = "disputed"` - `const StatusDetailsV1ReasonPaymentStopped StatusDetailsV1Reason = "payment_stopped"` - `const StatusDetailsV1ReasonOwnerDeceased StatusDetailsV1Reason = "owner_deceased"` - `const StatusDetailsV1ReasonFrozenBankAccount StatusDetailsV1Reason = "frozen_bank_account"` - `const StatusDetailsV1ReasonRiskReview StatusDetailsV1Reason = "risk_review"` - `const StatusDetailsV1ReasonFraudulent StatusDetailsV1Reason = "fraudulent"` - `const StatusDetailsV1ReasonDuplicateEntry StatusDetailsV1Reason = "duplicate_entry"` - `const StatusDetailsV1ReasonInvalidPaykey StatusDetailsV1Reason = "invalid_paykey"` - `const StatusDetailsV1ReasonPaymentBlocked StatusDetailsV1Reason = "payment_blocked"` - `const StatusDetailsV1ReasonAmountTooLarge StatusDetailsV1Reason = "amount_too_large"` - `const StatusDetailsV1ReasonTooManyAttempts StatusDetailsV1Reason = "too_many_attempts"` - `const StatusDetailsV1ReasonInternalSystemError StatusDetailsV1Reason = "internal_system_error"` - `const StatusDetailsV1ReasonUserRequest StatusDetailsV1Reason = "user_request"` - `const StatusDetailsV1ReasonOk StatusDetailsV1Reason = "ok"` - `const StatusDetailsV1ReasonOtherNetworkReturn StatusDetailsV1Reason = "other_network_return"` - `const StatusDetailsV1ReasonPayoutRefused StatusDetailsV1Reason = "payout_refused"` - `const StatusDetailsV1ReasonCancelRequest StatusDetailsV1Reason = "cancel_request"` - `const StatusDetailsV1ReasonFailedVerification StatusDetailsV1Reason = "failed_verification"` - `const StatusDetailsV1ReasonRequireReview StatusDetailsV1Reason = "require_review"` - `const StatusDetailsV1ReasonBlockedBySystem StatusDetailsV1Reason = "blocked_by_system"` - `const StatusDetailsV1ReasonWatchtowerReview StatusDetailsV1Reason = "watchtower_review"` - `const StatusDetailsV1ReasonValidating StatusDetailsV1Reason = "validating"` - `const StatusDetailsV1ReasonAutoHold StatusDetailsV1Reason = "auto_hold"` - `Source StatusDetailsV1Source` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const StatusDetailsV1SourceWatchtower StatusDetailsV1Source = "watchtower"` - `const StatusDetailsV1SourceBankDecline StatusDetailsV1Source = "bank_decline"` - `const StatusDetailsV1SourceCustomerDispute StatusDetailsV1Source = "customer_dispute"` - `const StatusDetailsV1SourceUserAction StatusDetailsV1Source = "user_action"` - `const StatusDetailsV1SourceSystem StatusDetailsV1Source = "system"` - `Code string` The status code if applicable. - `StatusHistory []PayoutV1DataStatusHistory` History of the status changes for the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the status. - `Reason string` A machine-readable identifier for the specific status, useful for programmatic handling. - `const PayoutV1DataStatusHistoryReasonInsufficientFunds PayoutV1DataStatusHistoryReason = "insufficient_funds"` - `const PayoutV1DataStatusHistoryReasonClosedBankAccount PayoutV1DataStatusHistoryReason = "closed_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidBankAccount PayoutV1DataStatusHistoryReason = "invalid_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidRouting PayoutV1DataStatusHistoryReason = "invalid_routing"` - `const PayoutV1DataStatusHistoryReasonDisputed PayoutV1DataStatusHistoryReason = "disputed"` - `const PayoutV1DataStatusHistoryReasonPaymentStopped PayoutV1DataStatusHistoryReason = "payment_stopped"` - `const PayoutV1DataStatusHistoryReasonOwnerDeceased PayoutV1DataStatusHistoryReason = "owner_deceased"` - `const PayoutV1DataStatusHistoryReasonFrozenBankAccount PayoutV1DataStatusHistoryReason = "frozen_bank_account"` - `const PayoutV1DataStatusHistoryReasonRiskReview PayoutV1DataStatusHistoryReason = "risk_review"` - `const PayoutV1DataStatusHistoryReasonFraudulent PayoutV1DataStatusHistoryReason = "fraudulent"` - `const PayoutV1DataStatusHistoryReasonDuplicateEntry PayoutV1DataStatusHistoryReason = "duplicate_entry"` - `const PayoutV1DataStatusHistoryReasonInvalidPaykey PayoutV1DataStatusHistoryReason = "invalid_paykey"` - `const PayoutV1DataStatusHistoryReasonPaymentBlocked PayoutV1DataStatusHistoryReason = "payment_blocked"` - `const PayoutV1DataStatusHistoryReasonAmountTooLarge PayoutV1DataStatusHistoryReason = "amount_too_large"` - `const PayoutV1DataStatusHistoryReasonTooManyAttempts PayoutV1DataStatusHistoryReason = "too_many_attempts"` - `const PayoutV1DataStatusHistoryReasonInternalSystemError PayoutV1DataStatusHistoryReason = "internal_system_error"` - `const PayoutV1DataStatusHistoryReasonUserRequest PayoutV1DataStatusHistoryReason = "user_request"` - `const PayoutV1DataStatusHistoryReasonOk PayoutV1DataStatusHistoryReason = "ok"` - `const PayoutV1DataStatusHistoryReasonOtherNetworkReturn PayoutV1DataStatusHistoryReason = "other_network_return"` - `const PayoutV1DataStatusHistoryReasonPayoutRefused PayoutV1DataStatusHistoryReason = "payout_refused"` - `const PayoutV1DataStatusHistoryReasonCancelRequest PayoutV1DataStatusHistoryReason = "cancel_request"` - `const PayoutV1DataStatusHistoryReasonFailedVerification PayoutV1DataStatusHistoryReason = "failed_verification"` - `const PayoutV1DataStatusHistoryReasonRequireReview PayoutV1DataStatusHistoryReason = "require_review"` - `const PayoutV1DataStatusHistoryReasonBlockedBySystem PayoutV1DataStatusHistoryReason = "blocked_by_system"` - `const PayoutV1DataStatusHistoryReasonWatchtowerReview PayoutV1DataStatusHistoryReason = "watchtower_review"` - `const PayoutV1DataStatusHistoryReasonValidating PayoutV1DataStatusHistoryReason = "validating"` - `const PayoutV1DataStatusHistoryReasonAutoHold PayoutV1DataStatusHistoryReason = "auto_hold"` - `Source string` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const PayoutV1DataStatusHistorySourceWatchtower PayoutV1DataStatusHistorySource = "watchtower"` - `const PayoutV1DataStatusHistorySourceBankDecline PayoutV1DataStatusHistorySource = "bank_decline"` - `const PayoutV1DataStatusHistorySourceCustomerDispute PayoutV1DataStatusHistorySource = "customer_dispute"` - `const PayoutV1DataStatusHistorySourceUserAction PayoutV1DataStatusHistorySource = "user_action"` - `const PayoutV1DataStatusHistorySourceSystem PayoutV1DataStatusHistorySource = "system"` - `Status string` The current status of the `charge` or `payout`. - `const PayoutV1DataStatusHistoryStatusCreated PayoutV1DataStatusHistoryStatus = "created"` - `const PayoutV1DataStatusHistoryStatusScheduled PayoutV1DataStatusHistoryStatus = "scheduled"` - `const PayoutV1DataStatusHistoryStatusFailed PayoutV1DataStatusHistoryStatus = "failed"` - `const PayoutV1DataStatusHistoryStatusCancelled PayoutV1DataStatusHistoryStatus = "cancelled"` - `const PayoutV1DataStatusHistoryStatusOnHold PayoutV1DataStatusHistoryStatus = "on_hold"` - `const PayoutV1DataStatusHistoryStatusPending PayoutV1DataStatusHistoryStatus = "pending"` - `const PayoutV1DataStatusHistoryStatusPaid PayoutV1DataStatusHistoryStatus = "paid"` - `const PayoutV1DataStatusHistoryStatusReversed PayoutV1DataStatusHistoryStatus = "reversed"` - `const PayoutV1DataStatusHistoryStatusValidating PayoutV1DataStatusHistoryStatus = "validating"` - `Code string` The status code if applicable. - `TraceIDs map[string, string]` Trace Ids. - `CreatedAt Time` The time the payout was created. - `CustomerDetails CustomerDetailsV1` Information about the customer associated with the payout. - `ID string` Unique identifier for the customer - `CustomerType CustomerDetailsV1CustomerType` The type of customer - `const CustomerDetailsV1CustomerTypeIndividual CustomerDetailsV1CustomerType = "individual"` - `const CustomerDetailsV1CustomerTypeBusiness CustomerDetailsV1CustomerType = "business"` - `Email string` The customer's email address - `Name string` The name of the customer - `Phone string` The customer's phone number in E.164 format - `EffectiveAt Time` The actual date on which the payment occurred. For payouts, this is the date the funds were sent from your bank account. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format. - `PaykeyDetails PaykeyDetailsV1` Information about the paykey used for the payout. - `ID string` Unique identifier for the paykey. - `CustomerID string` Unique identifier for the customer associated with the paykey. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Balance int64` The most recent balance of the bank account associated with the paykey in dollars. - `PaymentRail string` The payment rail used for the payout. - `const PayoutV1DataPaymentRailACH PayoutV1DataPaymentRail = "ach"` - `ProcessedAt Time` The time the payout was processed by Straddle and originated to the payment rail. - `RelatedPayments map[string, string]` Related payments. - `const PayoutV1DataRelatedPaymentOriginal PayoutV1DataRelatedPayment = "original"` - `const PayoutV1DataRelatedPaymentResubmit PayoutV1DataRelatedPayment = "resubmit"` - `const PayoutV1DataRelatedPaymentRefund PayoutV1DataRelatedPayment = "refund"` - `UpdatedAt Time` The time the payout was last updated. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType PayoutV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const PayoutV1ResponseTypeObject PayoutV1ResponseType = "object"` - `const PayoutV1ResponseTypeArray PayoutV1ResponseType = "array"` - `const PayoutV1ResponseTypeError PayoutV1ResponseType = "error"` - `const PayoutV1ResponseTypeNone PayoutV1ResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) payoutV1, err := client.Payouts.Hold( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.PayoutHoldParams{ Reason: "reason", }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", payoutV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "amount": 10000, "config": { "auto_hold": true, "auto_hold_message": "auto_hold_message", "sandbox_outcome": "standard" }, "currency": "currency", "description": "description", "device": { "ip_address": "192.168.1.1" }, "external_id": "external_id", "funding_ids": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "paykey": "paykey", "payment_date": "2019-12-27", "status": "created", "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "system", "code": null }, "status_history": [ { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "watchtower", "status": "created", "code": null } ], "trace_ids": { "foo": "string" }, "created_at": "2019-12-27T18:11:19.117Z", "customer_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_type": "individual", "email": "ron@swanson.com", "name": "Ron Swanson", "phone": "+1234567890" }, "effective_at": "2019-12-27T18:11:19.117Z", "metadata": { "foo": "string" }, "paykey_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "label": "Bank of America ****1234", "balance": 0 }, "payment_rail": "ach", "processed_at": "2019-12-27T18:11:19.117Z", "related_payments": { "foo": "original" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Release a payout `client.Payouts.Release(ctx, id, params) (*PayoutV1, error)` **put** `/v1/payouts/{id}/release` Release a payout from a `hold` status to allow it to be rescheduled for processing. ### Parameters - `id string` - `params PayoutReleaseParams` - `Reason param.Field[string]` Body param: Details about why the payout status was updated. - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Header param: Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. - `StraddleAccountID param.Field[string]` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `type PayoutV1 struct{…}` - `Data PayoutV1Data` - `ID string` Unique identifier for the payout. - `Amount int64` The amount of the payout in cents. - `Config PayoutV1DataConfig` Configuration for the payout. - `AutoHold bool` Defines whether to automatically place this charge on hold after being created. - `AutoHoldMessage string` The reason the payout is being automatically held on creation. - `SandboxOutcome string` Payment will simulate processing if not Standard. - `const PayoutV1DataConfigSandboxOutcomeStandard PayoutV1DataConfigSandboxOutcome = "standard"` - `const PayoutV1DataConfigSandboxOutcomePaid PayoutV1DataConfigSandboxOutcome = "paid"` - `const PayoutV1DataConfigSandboxOutcomeOnHoldDailyLimit PayoutV1DataConfigSandboxOutcome = "on_hold_daily_limit"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForFraudRisk PayoutV1DataConfigSandboxOutcome = "cancelled_for_fraud_risk"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForBalanceCheck PayoutV1DataConfigSandboxOutcome = "cancelled_for_balance_check"` - `const PayoutV1DataConfigSandboxOutcomeFailedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "failed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeReversedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "reversed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeFailedCustomerDispute PayoutV1DataConfigSandboxOutcome = "failed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeReversedCustomerDispute PayoutV1DataConfigSandboxOutcome = "reversed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeFailedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "failed_closed_bank_account"` - `const PayoutV1DataConfigSandboxOutcomeReversedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "reversed_closed_bank_account"` - `Currency string` The currency of the payout. Only USD is supported. - `Description string` An arbitrary description for the payout. - `Device DeviceInfoV1` Information about the device used when the customer authorized the payout. - `IPAddress string` The IP address of the device used when the customer authorized the charge or payout. Use `0.0.0.0` to represent an offline consent interaction. - `ExternalID string` Unique identifier for the payout in your database. This value must be unique across all payouts. - `FundingIDs []string` Funding Ids - `Paykey string` Value of the `paykey` used for the payout. - `PaymentDate Time` The desired date on which the payment should be occur. For payouts, this means the date you want the funds to be sent from your bank account. - `Status string` The current status of the payout. - `const PayoutV1DataStatusCreated PayoutV1DataStatus = "created"` - `const PayoutV1DataStatusScheduled PayoutV1DataStatus = "scheduled"` - `const PayoutV1DataStatusFailed PayoutV1DataStatus = "failed"` - `const PayoutV1DataStatusCancelled PayoutV1DataStatus = "cancelled"` - `const PayoutV1DataStatusOnHold PayoutV1DataStatus = "on_hold"` - `const PayoutV1DataStatusPending PayoutV1DataStatus = "pending"` - `const PayoutV1DataStatusPaid PayoutV1DataStatus = "paid"` - `const PayoutV1DataStatusReversed PayoutV1DataStatus = "reversed"` - `const PayoutV1DataStatusValidating PayoutV1DataStatus = "validating"` - `StatusDetails StatusDetailsV1` Details about the current status of the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason StatusDetailsV1Reason` A machine-readable identifier for the specific status, useful for programmatic handling. - `const StatusDetailsV1ReasonInsufficientFunds StatusDetailsV1Reason = "insufficient_funds"` - `const StatusDetailsV1ReasonClosedBankAccount StatusDetailsV1Reason = "closed_bank_account"` - `const StatusDetailsV1ReasonInvalidBankAccount StatusDetailsV1Reason = "invalid_bank_account"` - `const StatusDetailsV1ReasonInvalidRouting StatusDetailsV1Reason = "invalid_routing"` - `const StatusDetailsV1ReasonDisputed StatusDetailsV1Reason = "disputed"` - `const StatusDetailsV1ReasonPaymentStopped StatusDetailsV1Reason = "payment_stopped"` - `const StatusDetailsV1ReasonOwnerDeceased StatusDetailsV1Reason = "owner_deceased"` - `const StatusDetailsV1ReasonFrozenBankAccount StatusDetailsV1Reason = "frozen_bank_account"` - `const StatusDetailsV1ReasonRiskReview StatusDetailsV1Reason = "risk_review"` - `const StatusDetailsV1ReasonFraudulent StatusDetailsV1Reason = "fraudulent"` - `const StatusDetailsV1ReasonDuplicateEntry StatusDetailsV1Reason = "duplicate_entry"` - `const StatusDetailsV1ReasonInvalidPaykey StatusDetailsV1Reason = "invalid_paykey"` - `const StatusDetailsV1ReasonPaymentBlocked StatusDetailsV1Reason = "payment_blocked"` - `const StatusDetailsV1ReasonAmountTooLarge StatusDetailsV1Reason = "amount_too_large"` - `const StatusDetailsV1ReasonTooManyAttempts StatusDetailsV1Reason = "too_many_attempts"` - `const StatusDetailsV1ReasonInternalSystemError StatusDetailsV1Reason = "internal_system_error"` - `const StatusDetailsV1ReasonUserRequest StatusDetailsV1Reason = "user_request"` - `const StatusDetailsV1ReasonOk StatusDetailsV1Reason = "ok"` - `const StatusDetailsV1ReasonOtherNetworkReturn StatusDetailsV1Reason = "other_network_return"` - `const StatusDetailsV1ReasonPayoutRefused StatusDetailsV1Reason = "payout_refused"` - `const StatusDetailsV1ReasonCancelRequest StatusDetailsV1Reason = "cancel_request"` - `const StatusDetailsV1ReasonFailedVerification StatusDetailsV1Reason = "failed_verification"` - `const StatusDetailsV1ReasonRequireReview StatusDetailsV1Reason = "require_review"` - `const StatusDetailsV1ReasonBlockedBySystem StatusDetailsV1Reason = "blocked_by_system"` - `const StatusDetailsV1ReasonWatchtowerReview StatusDetailsV1Reason = "watchtower_review"` - `const StatusDetailsV1ReasonValidating StatusDetailsV1Reason = "validating"` - `const StatusDetailsV1ReasonAutoHold StatusDetailsV1Reason = "auto_hold"` - `Source StatusDetailsV1Source` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const StatusDetailsV1SourceWatchtower StatusDetailsV1Source = "watchtower"` - `const StatusDetailsV1SourceBankDecline StatusDetailsV1Source = "bank_decline"` - `const StatusDetailsV1SourceCustomerDispute StatusDetailsV1Source = "customer_dispute"` - `const StatusDetailsV1SourceUserAction StatusDetailsV1Source = "user_action"` - `const StatusDetailsV1SourceSystem StatusDetailsV1Source = "system"` - `Code string` The status code if applicable. - `StatusHistory []PayoutV1DataStatusHistory` History of the status changes for the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the status. - `Reason string` A machine-readable identifier for the specific status, useful for programmatic handling. - `const PayoutV1DataStatusHistoryReasonInsufficientFunds PayoutV1DataStatusHistoryReason = "insufficient_funds"` - `const PayoutV1DataStatusHistoryReasonClosedBankAccount PayoutV1DataStatusHistoryReason = "closed_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidBankAccount PayoutV1DataStatusHistoryReason = "invalid_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidRouting PayoutV1DataStatusHistoryReason = "invalid_routing"` - `const PayoutV1DataStatusHistoryReasonDisputed PayoutV1DataStatusHistoryReason = "disputed"` - `const PayoutV1DataStatusHistoryReasonPaymentStopped PayoutV1DataStatusHistoryReason = "payment_stopped"` - `const PayoutV1DataStatusHistoryReasonOwnerDeceased PayoutV1DataStatusHistoryReason = "owner_deceased"` - `const PayoutV1DataStatusHistoryReasonFrozenBankAccount PayoutV1DataStatusHistoryReason = "frozen_bank_account"` - `const PayoutV1DataStatusHistoryReasonRiskReview PayoutV1DataStatusHistoryReason = "risk_review"` - `const PayoutV1DataStatusHistoryReasonFraudulent PayoutV1DataStatusHistoryReason = "fraudulent"` - `const PayoutV1DataStatusHistoryReasonDuplicateEntry PayoutV1DataStatusHistoryReason = "duplicate_entry"` - `const PayoutV1DataStatusHistoryReasonInvalidPaykey PayoutV1DataStatusHistoryReason = "invalid_paykey"` - `const PayoutV1DataStatusHistoryReasonPaymentBlocked PayoutV1DataStatusHistoryReason = "payment_blocked"` - `const PayoutV1DataStatusHistoryReasonAmountTooLarge PayoutV1DataStatusHistoryReason = "amount_too_large"` - `const PayoutV1DataStatusHistoryReasonTooManyAttempts PayoutV1DataStatusHistoryReason = "too_many_attempts"` - `const PayoutV1DataStatusHistoryReasonInternalSystemError PayoutV1DataStatusHistoryReason = "internal_system_error"` - `const PayoutV1DataStatusHistoryReasonUserRequest PayoutV1DataStatusHistoryReason = "user_request"` - `const PayoutV1DataStatusHistoryReasonOk PayoutV1DataStatusHistoryReason = "ok"` - `const PayoutV1DataStatusHistoryReasonOtherNetworkReturn PayoutV1DataStatusHistoryReason = "other_network_return"` - `const PayoutV1DataStatusHistoryReasonPayoutRefused PayoutV1DataStatusHistoryReason = "payout_refused"` - `const PayoutV1DataStatusHistoryReasonCancelRequest PayoutV1DataStatusHistoryReason = "cancel_request"` - `const PayoutV1DataStatusHistoryReasonFailedVerification PayoutV1DataStatusHistoryReason = "failed_verification"` - `const PayoutV1DataStatusHistoryReasonRequireReview PayoutV1DataStatusHistoryReason = "require_review"` - `const PayoutV1DataStatusHistoryReasonBlockedBySystem PayoutV1DataStatusHistoryReason = "blocked_by_system"` - `const PayoutV1DataStatusHistoryReasonWatchtowerReview PayoutV1DataStatusHistoryReason = "watchtower_review"` - `const PayoutV1DataStatusHistoryReasonValidating PayoutV1DataStatusHistoryReason = "validating"` - `const PayoutV1DataStatusHistoryReasonAutoHold PayoutV1DataStatusHistoryReason = "auto_hold"` - `Source string` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const PayoutV1DataStatusHistorySourceWatchtower PayoutV1DataStatusHistorySource = "watchtower"` - `const PayoutV1DataStatusHistorySourceBankDecline PayoutV1DataStatusHistorySource = "bank_decline"` - `const PayoutV1DataStatusHistorySourceCustomerDispute PayoutV1DataStatusHistorySource = "customer_dispute"` - `const PayoutV1DataStatusHistorySourceUserAction PayoutV1DataStatusHistorySource = "user_action"` - `const PayoutV1DataStatusHistorySourceSystem PayoutV1DataStatusHistorySource = "system"` - `Status string` The current status of the `charge` or `payout`. - `const PayoutV1DataStatusHistoryStatusCreated PayoutV1DataStatusHistoryStatus = "created"` - `const PayoutV1DataStatusHistoryStatusScheduled PayoutV1DataStatusHistoryStatus = "scheduled"` - `const PayoutV1DataStatusHistoryStatusFailed PayoutV1DataStatusHistoryStatus = "failed"` - `const PayoutV1DataStatusHistoryStatusCancelled PayoutV1DataStatusHistoryStatus = "cancelled"` - `const PayoutV1DataStatusHistoryStatusOnHold PayoutV1DataStatusHistoryStatus = "on_hold"` - `const PayoutV1DataStatusHistoryStatusPending PayoutV1DataStatusHistoryStatus = "pending"` - `const PayoutV1DataStatusHistoryStatusPaid PayoutV1DataStatusHistoryStatus = "paid"` - `const PayoutV1DataStatusHistoryStatusReversed PayoutV1DataStatusHistoryStatus = "reversed"` - `const PayoutV1DataStatusHistoryStatusValidating PayoutV1DataStatusHistoryStatus = "validating"` - `Code string` The status code if applicable. - `TraceIDs map[string, string]` Trace Ids. - `CreatedAt Time` The time the payout was created. - `CustomerDetails CustomerDetailsV1` Information about the customer associated with the payout. - `ID string` Unique identifier for the customer - `CustomerType CustomerDetailsV1CustomerType` The type of customer - `const CustomerDetailsV1CustomerTypeIndividual CustomerDetailsV1CustomerType = "individual"` - `const CustomerDetailsV1CustomerTypeBusiness CustomerDetailsV1CustomerType = "business"` - `Email string` The customer's email address - `Name string` The name of the customer - `Phone string` The customer's phone number in E.164 format - `EffectiveAt Time` The actual date on which the payment occurred. For payouts, this is the date the funds were sent from your bank account. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format. - `PaykeyDetails PaykeyDetailsV1` Information about the paykey used for the payout. - `ID string` Unique identifier for the paykey. - `CustomerID string` Unique identifier for the customer associated with the paykey. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Balance int64` The most recent balance of the bank account associated with the paykey in dollars. - `PaymentRail string` The payment rail used for the payout. - `const PayoutV1DataPaymentRailACH PayoutV1DataPaymentRail = "ach"` - `ProcessedAt Time` The time the payout was processed by Straddle and originated to the payment rail. - `RelatedPayments map[string, string]` Related payments. - `const PayoutV1DataRelatedPaymentOriginal PayoutV1DataRelatedPayment = "original"` - `const PayoutV1DataRelatedPaymentResubmit PayoutV1DataRelatedPayment = "resubmit"` - `const PayoutV1DataRelatedPaymentRefund PayoutV1DataRelatedPayment = "refund"` - `UpdatedAt Time` The time the payout was last updated. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType PayoutV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const PayoutV1ResponseTypeObject PayoutV1ResponseType = "object"` - `const PayoutV1ResponseTypeArray PayoutV1ResponseType = "array"` - `const PayoutV1ResponseTypeError PayoutV1ResponseType = "error"` - `const PayoutV1ResponseTypeNone PayoutV1ResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) payoutV1, err := client.Payouts.Release( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.PayoutReleaseParams{ Reason: "reason", }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", payoutV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "amount": 10000, "config": { "auto_hold": true, "auto_hold_message": "auto_hold_message", "sandbox_outcome": "standard" }, "currency": "currency", "description": "description", "device": { "ip_address": "192.168.1.1" }, "external_id": "external_id", "funding_ids": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "paykey": "paykey", "payment_date": "2019-12-27", "status": "created", "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "system", "code": null }, "status_history": [ { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "watchtower", "status": "created", "code": null } ], "trace_ids": { "foo": "string" }, "created_at": "2019-12-27T18:11:19.117Z", "customer_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_type": "individual", "email": "ron@swanson.com", "name": "Ron Swanson", "phone": "+1234567890" }, "effective_at": "2019-12-27T18:11:19.117Z", "metadata": { "foo": "string" }, "paykey_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "label": "Bank of America ****1234", "balance": 0 }, "payment_rail": "ach", "processed_at": "2019-12-27T18:11:19.117Z", "related_payments": { "foo": "original" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Cancel a payout `client.Payouts.Cancel(ctx, id, params) (*PayoutV1, error)` **put** `/v1/payouts/{id}/cancel` Cancel a payout to prevent it from being processed. The status of the payout must be `created`, `scheduled`, or `on_hold`. ### Parameters - `id string` - `params PayoutCancelParams` - `Reason param.Field[string]` Body param: Details about why the payout status was updated. - `CorrelationID param.Field[string]` Header param: Optional client generated identifier to trace and debug a series of requests. - `IdempotencyKey param.Field[string]` Header param: Optional client generated value to use for idempotent requests. - `RequestID param.Field[string]` Header param: Optional client generated identifier to trace and debug a request. - `StraddleAccountID param.Field[string]` Header param: For use by platforms to specify an account id and set scope of a request. ### Returns - `type PayoutV1 struct{…}` - `Data PayoutV1Data` - `ID string` Unique identifier for the payout. - `Amount int64` The amount of the payout in cents. - `Config PayoutV1DataConfig` Configuration for the payout. - `AutoHold bool` Defines whether to automatically place this charge on hold after being created. - `AutoHoldMessage string` The reason the payout is being automatically held on creation. - `SandboxOutcome string` Payment will simulate processing if not Standard. - `const PayoutV1DataConfigSandboxOutcomeStandard PayoutV1DataConfigSandboxOutcome = "standard"` - `const PayoutV1DataConfigSandboxOutcomePaid PayoutV1DataConfigSandboxOutcome = "paid"` - `const PayoutV1DataConfigSandboxOutcomeOnHoldDailyLimit PayoutV1DataConfigSandboxOutcome = "on_hold_daily_limit"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForFraudRisk PayoutV1DataConfigSandboxOutcome = "cancelled_for_fraud_risk"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForBalanceCheck PayoutV1DataConfigSandboxOutcome = "cancelled_for_balance_check"` - `const PayoutV1DataConfigSandboxOutcomeFailedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "failed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeReversedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "reversed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeFailedCustomerDispute PayoutV1DataConfigSandboxOutcome = "failed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeReversedCustomerDispute PayoutV1DataConfigSandboxOutcome = "reversed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeFailedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "failed_closed_bank_account"` - `const PayoutV1DataConfigSandboxOutcomeReversedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "reversed_closed_bank_account"` - `Currency string` The currency of the payout. Only USD is supported. - `Description string` An arbitrary description for the payout. - `Device DeviceInfoV1` Information about the device used when the customer authorized the payout. - `IPAddress string` The IP address of the device used when the customer authorized the charge or payout. Use `0.0.0.0` to represent an offline consent interaction. - `ExternalID string` Unique identifier for the payout in your database. This value must be unique across all payouts. - `FundingIDs []string` Funding Ids - `Paykey string` Value of the `paykey` used for the payout. - `PaymentDate Time` The desired date on which the payment should be occur. For payouts, this means the date you want the funds to be sent from your bank account. - `Status string` The current status of the payout. - `const PayoutV1DataStatusCreated PayoutV1DataStatus = "created"` - `const PayoutV1DataStatusScheduled PayoutV1DataStatus = "scheduled"` - `const PayoutV1DataStatusFailed PayoutV1DataStatus = "failed"` - `const PayoutV1DataStatusCancelled PayoutV1DataStatus = "cancelled"` - `const PayoutV1DataStatusOnHold PayoutV1DataStatus = "on_hold"` - `const PayoutV1DataStatusPending PayoutV1DataStatus = "pending"` - `const PayoutV1DataStatusPaid PayoutV1DataStatus = "paid"` - `const PayoutV1DataStatusReversed PayoutV1DataStatus = "reversed"` - `const PayoutV1DataStatusValidating PayoutV1DataStatus = "validating"` - `StatusDetails StatusDetailsV1` Details about the current status of the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason StatusDetailsV1Reason` A machine-readable identifier for the specific status, useful for programmatic handling. - `const StatusDetailsV1ReasonInsufficientFunds StatusDetailsV1Reason = "insufficient_funds"` - `const StatusDetailsV1ReasonClosedBankAccount StatusDetailsV1Reason = "closed_bank_account"` - `const StatusDetailsV1ReasonInvalidBankAccount StatusDetailsV1Reason = "invalid_bank_account"` - `const StatusDetailsV1ReasonInvalidRouting StatusDetailsV1Reason = "invalid_routing"` - `const StatusDetailsV1ReasonDisputed StatusDetailsV1Reason = "disputed"` - `const StatusDetailsV1ReasonPaymentStopped StatusDetailsV1Reason = "payment_stopped"` - `const StatusDetailsV1ReasonOwnerDeceased StatusDetailsV1Reason = "owner_deceased"` - `const StatusDetailsV1ReasonFrozenBankAccount StatusDetailsV1Reason = "frozen_bank_account"` - `const StatusDetailsV1ReasonRiskReview StatusDetailsV1Reason = "risk_review"` - `const StatusDetailsV1ReasonFraudulent StatusDetailsV1Reason = "fraudulent"` - `const StatusDetailsV1ReasonDuplicateEntry StatusDetailsV1Reason = "duplicate_entry"` - `const StatusDetailsV1ReasonInvalidPaykey StatusDetailsV1Reason = "invalid_paykey"` - `const StatusDetailsV1ReasonPaymentBlocked StatusDetailsV1Reason = "payment_blocked"` - `const StatusDetailsV1ReasonAmountTooLarge StatusDetailsV1Reason = "amount_too_large"` - `const StatusDetailsV1ReasonTooManyAttempts StatusDetailsV1Reason = "too_many_attempts"` - `const StatusDetailsV1ReasonInternalSystemError StatusDetailsV1Reason = "internal_system_error"` - `const StatusDetailsV1ReasonUserRequest StatusDetailsV1Reason = "user_request"` - `const StatusDetailsV1ReasonOk StatusDetailsV1Reason = "ok"` - `const StatusDetailsV1ReasonOtherNetworkReturn StatusDetailsV1Reason = "other_network_return"` - `const StatusDetailsV1ReasonPayoutRefused StatusDetailsV1Reason = "payout_refused"` - `const StatusDetailsV1ReasonCancelRequest StatusDetailsV1Reason = "cancel_request"` - `const StatusDetailsV1ReasonFailedVerification StatusDetailsV1Reason = "failed_verification"` - `const StatusDetailsV1ReasonRequireReview StatusDetailsV1Reason = "require_review"` - `const StatusDetailsV1ReasonBlockedBySystem StatusDetailsV1Reason = "blocked_by_system"` - `const StatusDetailsV1ReasonWatchtowerReview StatusDetailsV1Reason = "watchtower_review"` - `const StatusDetailsV1ReasonValidating StatusDetailsV1Reason = "validating"` - `const StatusDetailsV1ReasonAutoHold StatusDetailsV1Reason = "auto_hold"` - `Source StatusDetailsV1Source` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const StatusDetailsV1SourceWatchtower StatusDetailsV1Source = "watchtower"` - `const StatusDetailsV1SourceBankDecline StatusDetailsV1Source = "bank_decline"` - `const StatusDetailsV1SourceCustomerDispute StatusDetailsV1Source = "customer_dispute"` - `const StatusDetailsV1SourceUserAction StatusDetailsV1Source = "user_action"` - `const StatusDetailsV1SourceSystem StatusDetailsV1Source = "system"` - `Code string` The status code if applicable. - `StatusHistory []PayoutV1DataStatusHistory` History of the status changes for the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the status. - `Reason string` A machine-readable identifier for the specific status, useful for programmatic handling. - `const PayoutV1DataStatusHistoryReasonInsufficientFunds PayoutV1DataStatusHistoryReason = "insufficient_funds"` - `const PayoutV1DataStatusHistoryReasonClosedBankAccount PayoutV1DataStatusHistoryReason = "closed_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidBankAccount PayoutV1DataStatusHistoryReason = "invalid_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidRouting PayoutV1DataStatusHistoryReason = "invalid_routing"` - `const PayoutV1DataStatusHistoryReasonDisputed PayoutV1DataStatusHistoryReason = "disputed"` - `const PayoutV1DataStatusHistoryReasonPaymentStopped PayoutV1DataStatusHistoryReason = "payment_stopped"` - `const PayoutV1DataStatusHistoryReasonOwnerDeceased PayoutV1DataStatusHistoryReason = "owner_deceased"` - `const PayoutV1DataStatusHistoryReasonFrozenBankAccount PayoutV1DataStatusHistoryReason = "frozen_bank_account"` - `const PayoutV1DataStatusHistoryReasonRiskReview PayoutV1DataStatusHistoryReason = "risk_review"` - `const PayoutV1DataStatusHistoryReasonFraudulent PayoutV1DataStatusHistoryReason = "fraudulent"` - `const PayoutV1DataStatusHistoryReasonDuplicateEntry PayoutV1DataStatusHistoryReason = "duplicate_entry"` - `const PayoutV1DataStatusHistoryReasonInvalidPaykey PayoutV1DataStatusHistoryReason = "invalid_paykey"` - `const PayoutV1DataStatusHistoryReasonPaymentBlocked PayoutV1DataStatusHistoryReason = "payment_blocked"` - `const PayoutV1DataStatusHistoryReasonAmountTooLarge PayoutV1DataStatusHistoryReason = "amount_too_large"` - `const PayoutV1DataStatusHistoryReasonTooManyAttempts PayoutV1DataStatusHistoryReason = "too_many_attempts"` - `const PayoutV1DataStatusHistoryReasonInternalSystemError PayoutV1DataStatusHistoryReason = "internal_system_error"` - `const PayoutV1DataStatusHistoryReasonUserRequest PayoutV1DataStatusHistoryReason = "user_request"` - `const PayoutV1DataStatusHistoryReasonOk PayoutV1DataStatusHistoryReason = "ok"` - `const PayoutV1DataStatusHistoryReasonOtherNetworkReturn PayoutV1DataStatusHistoryReason = "other_network_return"` - `const PayoutV1DataStatusHistoryReasonPayoutRefused PayoutV1DataStatusHistoryReason = "payout_refused"` - `const PayoutV1DataStatusHistoryReasonCancelRequest PayoutV1DataStatusHistoryReason = "cancel_request"` - `const PayoutV1DataStatusHistoryReasonFailedVerification PayoutV1DataStatusHistoryReason = "failed_verification"` - `const PayoutV1DataStatusHistoryReasonRequireReview PayoutV1DataStatusHistoryReason = "require_review"` - `const PayoutV1DataStatusHistoryReasonBlockedBySystem PayoutV1DataStatusHistoryReason = "blocked_by_system"` - `const PayoutV1DataStatusHistoryReasonWatchtowerReview PayoutV1DataStatusHistoryReason = "watchtower_review"` - `const PayoutV1DataStatusHistoryReasonValidating PayoutV1DataStatusHistoryReason = "validating"` - `const PayoutV1DataStatusHistoryReasonAutoHold PayoutV1DataStatusHistoryReason = "auto_hold"` - `Source string` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const PayoutV1DataStatusHistorySourceWatchtower PayoutV1DataStatusHistorySource = "watchtower"` - `const PayoutV1DataStatusHistorySourceBankDecline PayoutV1DataStatusHistorySource = "bank_decline"` - `const PayoutV1DataStatusHistorySourceCustomerDispute PayoutV1DataStatusHistorySource = "customer_dispute"` - `const PayoutV1DataStatusHistorySourceUserAction PayoutV1DataStatusHistorySource = "user_action"` - `const PayoutV1DataStatusHistorySourceSystem PayoutV1DataStatusHistorySource = "system"` - `Status string` The current status of the `charge` or `payout`. - `const PayoutV1DataStatusHistoryStatusCreated PayoutV1DataStatusHistoryStatus = "created"` - `const PayoutV1DataStatusHistoryStatusScheduled PayoutV1DataStatusHistoryStatus = "scheduled"` - `const PayoutV1DataStatusHistoryStatusFailed PayoutV1DataStatusHistoryStatus = "failed"` - `const PayoutV1DataStatusHistoryStatusCancelled PayoutV1DataStatusHistoryStatus = "cancelled"` - `const PayoutV1DataStatusHistoryStatusOnHold PayoutV1DataStatusHistoryStatus = "on_hold"` - `const PayoutV1DataStatusHistoryStatusPending PayoutV1DataStatusHistoryStatus = "pending"` - `const PayoutV1DataStatusHistoryStatusPaid PayoutV1DataStatusHistoryStatus = "paid"` - `const PayoutV1DataStatusHistoryStatusReversed PayoutV1DataStatusHistoryStatus = "reversed"` - `const PayoutV1DataStatusHistoryStatusValidating PayoutV1DataStatusHistoryStatus = "validating"` - `Code string` The status code if applicable. - `TraceIDs map[string, string]` Trace Ids. - `CreatedAt Time` The time the payout was created. - `CustomerDetails CustomerDetailsV1` Information about the customer associated with the payout. - `ID string` Unique identifier for the customer - `CustomerType CustomerDetailsV1CustomerType` The type of customer - `const CustomerDetailsV1CustomerTypeIndividual CustomerDetailsV1CustomerType = "individual"` - `const CustomerDetailsV1CustomerTypeBusiness CustomerDetailsV1CustomerType = "business"` - `Email string` The customer's email address - `Name string` The name of the customer - `Phone string` The customer's phone number in E.164 format - `EffectiveAt Time` The actual date on which the payment occurred. For payouts, this is the date the funds were sent from your bank account. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format. - `PaykeyDetails PaykeyDetailsV1` Information about the paykey used for the payout. - `ID string` Unique identifier for the paykey. - `CustomerID string` Unique identifier for the customer associated with the paykey. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Balance int64` The most recent balance of the bank account associated with the paykey in dollars. - `PaymentRail string` The payment rail used for the payout. - `const PayoutV1DataPaymentRailACH PayoutV1DataPaymentRail = "ach"` - `ProcessedAt Time` The time the payout was processed by Straddle and originated to the payment rail. - `RelatedPayments map[string, string]` Related payments. - `const PayoutV1DataRelatedPaymentOriginal PayoutV1DataRelatedPayment = "original"` - `const PayoutV1DataRelatedPaymentResubmit PayoutV1DataRelatedPayment = "resubmit"` - `const PayoutV1DataRelatedPaymentRefund PayoutV1DataRelatedPayment = "refund"` - `UpdatedAt Time` The time the payout was last updated. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType PayoutV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const PayoutV1ResponseTypeObject PayoutV1ResponseType = "object"` - `const PayoutV1ResponseTypeArray PayoutV1ResponseType = "array"` - `const PayoutV1ResponseTypeError PayoutV1ResponseType = "error"` - `const PayoutV1ResponseTypeNone PayoutV1ResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) payoutV1, err := client.Payouts.Cancel( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.PayoutCancelParams{ Reason: "reason", }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", payoutV1.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "amount": 10000, "config": { "auto_hold": true, "auto_hold_message": "auto_hold_message", "sandbox_outcome": "standard" }, "currency": "currency", "description": "description", "device": { "ip_address": "192.168.1.1" }, "external_id": "external_id", "funding_ids": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "paykey": "paykey", "payment_date": "2019-12-27", "status": "created", "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "system", "code": null }, "status_history": [ { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "watchtower", "status": "created", "code": null } ], "trace_ids": { "foo": "string" }, "created_at": "2019-12-27T18:11:19.117Z", "customer_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_type": "individual", "email": "ron@swanson.com", "name": "Ron Swanson", "phone": "+1234567890" }, "effective_at": "2019-12-27T18:11:19.117Z", "metadata": { "foo": "string" }, "paykey_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "label": "Bank of America ****1234", "balance": 0 }, "payment_rail": "ach", "processed_at": "2019-12-27T18:11:19.117Z", "related_payments": { "foo": "original" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Get a payout by id. `client.Payouts.Unmask(ctx, id, query) (*PayoutUnmaskResponse, error)` **get** `/v1/payouts/{id}/unmask` Get a payout by id. ### Parameters - `id string` - `query PayoutUnmaskParams` - `CorrelationID param.Field[string]` Optional client generated identifier to trace and debug a series of requests. - `RequestID param.Field[string]` Optional client generated identifier to trace and debug a request. - `StraddleAccountID param.Field[string]` For use by platforms to specify an account id and set scope of a request. ### Returns - `type PayoutUnmaskResponse struct{…}` - `Data PayoutUnmaskResponseData` - `ID string` Id. - `Amount int64` Amount. - `Config PayoutUnmaskResponseDataConfig` - `AutoHold bool` Defines whether to automatically place this charge on hold after being created. - `AutoHoldMessage string` The reason the payout is being automatically held on creation. - `SandboxOutcome string` Payment will simulate processing if not Standard. - `const PayoutUnmaskResponseDataConfigSandboxOutcomeStandard PayoutUnmaskResponseDataConfigSandboxOutcome = "standard"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomePaid PayoutUnmaskResponseDataConfigSandboxOutcome = "paid"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomeOnHoldDailyLimit PayoutUnmaskResponseDataConfigSandboxOutcome = "on_hold_daily_limit"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomeCancelledForFraudRisk PayoutUnmaskResponseDataConfigSandboxOutcome = "cancelled_for_fraud_risk"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomeCancelledForBalanceCheck PayoutUnmaskResponseDataConfigSandboxOutcome = "cancelled_for_balance_check"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomeFailedInsufficientFunds PayoutUnmaskResponseDataConfigSandboxOutcome = "failed_insufficient_funds"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomeReversedInsufficientFunds PayoutUnmaskResponseDataConfigSandboxOutcome = "reversed_insufficient_funds"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomeFailedCustomerDispute PayoutUnmaskResponseDataConfigSandboxOutcome = "failed_customer_dispute"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomeReversedCustomerDispute PayoutUnmaskResponseDataConfigSandboxOutcome = "reversed_customer_dispute"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomeFailedClosedBankAccount PayoutUnmaskResponseDataConfigSandboxOutcome = "failed_closed_bank_account"` - `const PayoutUnmaskResponseDataConfigSandboxOutcomeReversedClosedBankAccount PayoutUnmaskResponseDataConfigSandboxOutcome = "reversed_closed_bank_account"` - `Currency string` Currency. - `Description string` Description. - `Device PayoutUnmaskResponseDataDevice` - `IPAddress string` Ip address. - `ExternalID string` External id. - `FundingIDs []string` Funding Ids - `Paykey string` Paykey. - `PaymentDate Time` Payment date. - `Status string` The current status of the `charge` or `payout`. - `const PayoutUnmaskResponseDataStatusCreated PayoutUnmaskResponseDataStatus = "created"` - `const PayoutUnmaskResponseDataStatusScheduled PayoutUnmaskResponseDataStatus = "scheduled"` - `const PayoutUnmaskResponseDataStatusFailed PayoutUnmaskResponseDataStatus = "failed"` - `const PayoutUnmaskResponseDataStatusCancelled PayoutUnmaskResponseDataStatus = "cancelled"` - `const PayoutUnmaskResponseDataStatusOnHold PayoutUnmaskResponseDataStatus = "on_hold"` - `const PayoutUnmaskResponseDataStatusPending PayoutUnmaskResponseDataStatus = "pending"` - `const PayoutUnmaskResponseDataStatusPaid PayoutUnmaskResponseDataStatus = "paid"` - `const PayoutUnmaskResponseDataStatusReversed PayoutUnmaskResponseDataStatus = "reversed"` - `const PayoutUnmaskResponseDataStatusValidating PayoutUnmaskResponseDataStatus = "validating"` - `StatusDetails StatusDetailsV1` - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason StatusDetailsV1Reason` A machine-readable identifier for the specific status, useful for programmatic handling. - `const StatusDetailsV1ReasonInsufficientFunds StatusDetailsV1Reason = "insufficient_funds"` - `const StatusDetailsV1ReasonClosedBankAccount StatusDetailsV1Reason = "closed_bank_account"` - `const StatusDetailsV1ReasonInvalidBankAccount StatusDetailsV1Reason = "invalid_bank_account"` - `const StatusDetailsV1ReasonInvalidRouting StatusDetailsV1Reason = "invalid_routing"` - `const StatusDetailsV1ReasonDisputed StatusDetailsV1Reason = "disputed"` - `const StatusDetailsV1ReasonPaymentStopped StatusDetailsV1Reason = "payment_stopped"` - `const StatusDetailsV1ReasonOwnerDeceased StatusDetailsV1Reason = "owner_deceased"` - `const StatusDetailsV1ReasonFrozenBankAccount StatusDetailsV1Reason = "frozen_bank_account"` - `const StatusDetailsV1ReasonRiskReview StatusDetailsV1Reason = "risk_review"` - `const StatusDetailsV1ReasonFraudulent StatusDetailsV1Reason = "fraudulent"` - `const StatusDetailsV1ReasonDuplicateEntry StatusDetailsV1Reason = "duplicate_entry"` - `const StatusDetailsV1ReasonInvalidPaykey StatusDetailsV1Reason = "invalid_paykey"` - `const StatusDetailsV1ReasonPaymentBlocked StatusDetailsV1Reason = "payment_blocked"` - `const StatusDetailsV1ReasonAmountTooLarge StatusDetailsV1Reason = "amount_too_large"` - `const StatusDetailsV1ReasonTooManyAttempts StatusDetailsV1Reason = "too_many_attempts"` - `const StatusDetailsV1ReasonInternalSystemError StatusDetailsV1Reason = "internal_system_error"` - `const StatusDetailsV1ReasonUserRequest StatusDetailsV1Reason = "user_request"` - `const StatusDetailsV1ReasonOk StatusDetailsV1Reason = "ok"` - `const StatusDetailsV1ReasonOtherNetworkReturn StatusDetailsV1Reason = "other_network_return"` - `const StatusDetailsV1ReasonPayoutRefused StatusDetailsV1Reason = "payout_refused"` - `const StatusDetailsV1ReasonCancelRequest StatusDetailsV1Reason = "cancel_request"` - `const StatusDetailsV1ReasonFailedVerification StatusDetailsV1Reason = "failed_verification"` - `const StatusDetailsV1ReasonRequireReview StatusDetailsV1Reason = "require_review"` - `const StatusDetailsV1ReasonBlockedBySystem StatusDetailsV1Reason = "blocked_by_system"` - `const StatusDetailsV1ReasonWatchtowerReview StatusDetailsV1Reason = "watchtower_review"` - `const StatusDetailsV1ReasonValidating StatusDetailsV1Reason = "validating"` - `const StatusDetailsV1ReasonAutoHold StatusDetailsV1Reason = "auto_hold"` - `Source StatusDetailsV1Source` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const StatusDetailsV1SourceWatchtower StatusDetailsV1Source = "watchtower"` - `const StatusDetailsV1SourceBankDecline StatusDetailsV1Source = "bank_decline"` - `const StatusDetailsV1SourceCustomerDispute StatusDetailsV1Source = "customer_dispute"` - `const StatusDetailsV1SourceUserAction StatusDetailsV1Source = "user_action"` - `const StatusDetailsV1SourceSystem StatusDetailsV1Source = "system"` - `Code string` The status code if applicable. - `StatusHistory []PayoutUnmaskResponseDataStatusHistory` Status history. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the status. - `Reason string` A machine-readable identifier for the specific status, useful for programmatic handling. - `const PayoutUnmaskResponseDataStatusHistoryReasonInsufficientFunds PayoutUnmaskResponseDataStatusHistoryReason = "insufficient_funds"` - `const PayoutUnmaskResponseDataStatusHistoryReasonClosedBankAccount PayoutUnmaskResponseDataStatusHistoryReason = "closed_bank_account"` - `const PayoutUnmaskResponseDataStatusHistoryReasonInvalidBankAccount PayoutUnmaskResponseDataStatusHistoryReason = "invalid_bank_account"` - `const PayoutUnmaskResponseDataStatusHistoryReasonInvalidRouting PayoutUnmaskResponseDataStatusHistoryReason = "invalid_routing"` - `const PayoutUnmaskResponseDataStatusHistoryReasonDisputed PayoutUnmaskResponseDataStatusHistoryReason = "disputed"` - `const PayoutUnmaskResponseDataStatusHistoryReasonPaymentStopped PayoutUnmaskResponseDataStatusHistoryReason = "payment_stopped"` - `const PayoutUnmaskResponseDataStatusHistoryReasonOwnerDeceased PayoutUnmaskResponseDataStatusHistoryReason = "owner_deceased"` - `const PayoutUnmaskResponseDataStatusHistoryReasonFrozenBankAccount PayoutUnmaskResponseDataStatusHistoryReason = "frozen_bank_account"` - `const PayoutUnmaskResponseDataStatusHistoryReasonRiskReview PayoutUnmaskResponseDataStatusHistoryReason = "risk_review"` - `const PayoutUnmaskResponseDataStatusHistoryReasonFraudulent PayoutUnmaskResponseDataStatusHistoryReason = "fraudulent"` - `const PayoutUnmaskResponseDataStatusHistoryReasonDuplicateEntry PayoutUnmaskResponseDataStatusHistoryReason = "duplicate_entry"` - `const PayoutUnmaskResponseDataStatusHistoryReasonInvalidPaykey PayoutUnmaskResponseDataStatusHistoryReason = "invalid_paykey"` - `const PayoutUnmaskResponseDataStatusHistoryReasonPaymentBlocked PayoutUnmaskResponseDataStatusHistoryReason = "payment_blocked"` - `const PayoutUnmaskResponseDataStatusHistoryReasonAmountTooLarge PayoutUnmaskResponseDataStatusHistoryReason = "amount_too_large"` - `const PayoutUnmaskResponseDataStatusHistoryReasonTooManyAttempts PayoutUnmaskResponseDataStatusHistoryReason = "too_many_attempts"` - `const PayoutUnmaskResponseDataStatusHistoryReasonInternalSystemError PayoutUnmaskResponseDataStatusHistoryReason = "internal_system_error"` - `const PayoutUnmaskResponseDataStatusHistoryReasonUserRequest PayoutUnmaskResponseDataStatusHistoryReason = "user_request"` - `const PayoutUnmaskResponseDataStatusHistoryReasonOk PayoutUnmaskResponseDataStatusHistoryReason = "ok"` - `const PayoutUnmaskResponseDataStatusHistoryReasonOtherNetworkReturn PayoutUnmaskResponseDataStatusHistoryReason = "other_network_return"` - `const PayoutUnmaskResponseDataStatusHistoryReasonPayoutRefused PayoutUnmaskResponseDataStatusHistoryReason = "payout_refused"` - `const PayoutUnmaskResponseDataStatusHistoryReasonCancelRequest PayoutUnmaskResponseDataStatusHistoryReason = "cancel_request"` - `const PayoutUnmaskResponseDataStatusHistoryReasonFailedVerification PayoutUnmaskResponseDataStatusHistoryReason = "failed_verification"` - `const PayoutUnmaskResponseDataStatusHistoryReasonRequireReview PayoutUnmaskResponseDataStatusHistoryReason = "require_review"` - `const PayoutUnmaskResponseDataStatusHistoryReasonBlockedBySystem PayoutUnmaskResponseDataStatusHistoryReason = "blocked_by_system"` - `const PayoutUnmaskResponseDataStatusHistoryReasonWatchtowerReview PayoutUnmaskResponseDataStatusHistoryReason = "watchtower_review"` - `const PayoutUnmaskResponseDataStatusHistoryReasonValidating PayoutUnmaskResponseDataStatusHistoryReason = "validating"` - `const PayoutUnmaskResponseDataStatusHistoryReasonAutoHold PayoutUnmaskResponseDataStatusHistoryReason = "auto_hold"` - `Source string` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const PayoutUnmaskResponseDataStatusHistorySourceWatchtower PayoutUnmaskResponseDataStatusHistorySource = "watchtower"` - `const PayoutUnmaskResponseDataStatusHistorySourceBankDecline PayoutUnmaskResponseDataStatusHistorySource = "bank_decline"` - `const PayoutUnmaskResponseDataStatusHistorySourceCustomerDispute PayoutUnmaskResponseDataStatusHistorySource = "customer_dispute"` - `const PayoutUnmaskResponseDataStatusHistorySourceUserAction PayoutUnmaskResponseDataStatusHistorySource = "user_action"` - `const PayoutUnmaskResponseDataStatusHistorySourceSystem PayoutUnmaskResponseDataStatusHistorySource = "system"` - `Status string` The current status of the `charge` or `payout`. - `const PayoutUnmaskResponseDataStatusHistoryStatusCreated PayoutUnmaskResponseDataStatusHistoryStatus = "created"` - `const PayoutUnmaskResponseDataStatusHistoryStatusScheduled PayoutUnmaskResponseDataStatusHistoryStatus = "scheduled"` - `const PayoutUnmaskResponseDataStatusHistoryStatusFailed PayoutUnmaskResponseDataStatusHistoryStatus = "failed"` - `const PayoutUnmaskResponseDataStatusHistoryStatusCancelled PayoutUnmaskResponseDataStatusHistoryStatus = "cancelled"` - `const PayoutUnmaskResponseDataStatusHistoryStatusOnHold PayoutUnmaskResponseDataStatusHistoryStatus = "on_hold"` - `const PayoutUnmaskResponseDataStatusHistoryStatusPending PayoutUnmaskResponseDataStatusHistoryStatus = "pending"` - `const PayoutUnmaskResponseDataStatusHistoryStatusPaid PayoutUnmaskResponseDataStatusHistoryStatus = "paid"` - `const PayoutUnmaskResponseDataStatusHistoryStatusReversed PayoutUnmaskResponseDataStatusHistoryStatus = "reversed"` - `const PayoutUnmaskResponseDataStatusHistoryStatusValidating PayoutUnmaskResponseDataStatusHistoryStatus = "validating"` - `Code string` The status code if applicable. - `TraceIDs map[string, string]` Trace Ids. - `CreatedAt Time` Created at. - `CustomerDetails CustomerDetailsV1` Information about the customer associated with the charge or payout. - `ID string` Unique identifier for the customer - `CustomerType CustomerDetailsV1CustomerType` The type of customer - `const CustomerDetailsV1CustomerTypeIndividual CustomerDetailsV1CustomerType = "individual"` - `const CustomerDetailsV1CustomerTypeBusiness CustomerDetailsV1CustomerType = "business"` - `Email string` The customer's email address - `Name string` The name of the customer - `Phone string` The customer's phone number in E.164 format - `EffectiveAt Time` Effective at. - `Metadata map[string, string]` Metadata. - `PaykeyDetails PaykeyDetailsV1` - `ID string` Unique identifier for the paykey. - `CustomerID string` Unique identifier for the customer associated with the paykey. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Balance int64` The most recent balance of the bank account associated with the paykey in dollars. - `PaymentRail string` The payment rail used for the charge or payout. - `const PayoutUnmaskResponseDataPaymentRailACH PayoutUnmaskResponseDataPaymentRail = "ach"` - `ProcessedAt Time` Processed at. - `RelatedPayments map[string, string]` Related payments. - `const PayoutUnmaskResponseDataRelatedPaymentOriginal PayoutUnmaskResponseDataRelatedPayment = "original"` - `const PayoutUnmaskResponseDataRelatedPaymentResubmit PayoutUnmaskResponseDataRelatedPayment = "resubmit"` - `const PayoutUnmaskResponseDataRelatedPaymentRefund PayoutUnmaskResponseDataRelatedPayment = "refund"` - `UpdatedAt Time` Updated at. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType PayoutUnmaskResponseResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const PayoutUnmaskResponseResponseTypeObject PayoutUnmaskResponseResponseType = "object"` - `const PayoutUnmaskResponseResponseTypeArray PayoutUnmaskResponseResponseType = "array"` - `const PayoutUnmaskResponseResponseTypeError PayoutUnmaskResponseResponseType = "error"` - `const PayoutUnmaskResponseResponseTypeNone PayoutUnmaskResponseResponseType = "none"` ### Example ```go package main import ( "context" "fmt" "github.com/straddleio/straddle-go" "github.com/straddleio/straddle-go/option" ) func main() { client := straddle.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.Payouts.Unmask( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", straddle.PayoutUnmaskParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "amount": 0, "config": { "auto_hold": true, "auto_hold_message": "auto_hold_message", "sandbox_outcome": "standard" }, "currency": "currency", "description": "description", "device": { "ip_address": "ip_address" }, "external_id": "external_id", "funding_ids": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "paykey": "paykey", "payment_date": "2019-12-27", "status": "created", "status_details": { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "system", "code": null }, "status_history": [ { "changed_at": "2019-12-27T18:11:19.117Z", "message": "Payment successfully created and awaiting validation.", "reason": "insufficient_funds", "source": "watchtower", "status": "created", "code": null } ], "trace_ids": { "foo": "string" }, "created_at": "2019-12-27T18:11:19.117Z", "customer_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_type": "individual", "email": "ron@swanson.com", "name": "Ron Swanson", "phone": "+1234567890" }, "effective_at": "2019-12-27T18:11:19.117Z", "metadata": { "foo": "string" }, "paykey_details": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "label": "Bank of America ****1234", "balance": 0 }, "payment_rail": "ach", "processed_at": "2019-12-27T18:11:19.117Z", "related_payments": { "foo": "original" }, "updated_at": "2019-12-27T18:11:19.117Z" }, "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z" }, "response_type": "object" } ``` ## Domain Types ### Payout V1 - `type PayoutV1 struct{…}` - `Data PayoutV1Data` - `ID string` Unique identifier for the payout. - `Amount int64` The amount of the payout in cents. - `Config PayoutV1DataConfig` Configuration for the payout. - `AutoHold bool` Defines whether to automatically place this charge on hold after being created. - `AutoHoldMessage string` The reason the payout is being automatically held on creation. - `SandboxOutcome string` Payment will simulate processing if not Standard. - `const PayoutV1DataConfigSandboxOutcomeStandard PayoutV1DataConfigSandboxOutcome = "standard"` - `const PayoutV1DataConfigSandboxOutcomePaid PayoutV1DataConfigSandboxOutcome = "paid"` - `const PayoutV1DataConfigSandboxOutcomeOnHoldDailyLimit PayoutV1DataConfigSandboxOutcome = "on_hold_daily_limit"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForFraudRisk PayoutV1DataConfigSandboxOutcome = "cancelled_for_fraud_risk"` - `const PayoutV1DataConfigSandboxOutcomeCancelledForBalanceCheck PayoutV1DataConfigSandboxOutcome = "cancelled_for_balance_check"` - `const PayoutV1DataConfigSandboxOutcomeFailedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "failed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeReversedInsufficientFunds PayoutV1DataConfigSandboxOutcome = "reversed_insufficient_funds"` - `const PayoutV1DataConfigSandboxOutcomeFailedCustomerDispute PayoutV1DataConfigSandboxOutcome = "failed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeReversedCustomerDispute PayoutV1DataConfigSandboxOutcome = "reversed_customer_dispute"` - `const PayoutV1DataConfigSandboxOutcomeFailedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "failed_closed_bank_account"` - `const PayoutV1DataConfigSandboxOutcomeReversedClosedBankAccount PayoutV1DataConfigSandboxOutcome = "reversed_closed_bank_account"` - `Currency string` The currency of the payout. Only USD is supported. - `Description string` An arbitrary description for the payout. - `Device DeviceInfoV1` Information about the device used when the customer authorized the payout. - `IPAddress string` The IP address of the device used when the customer authorized the charge or payout. Use `0.0.0.0` to represent an offline consent interaction. - `ExternalID string` Unique identifier for the payout in your database. This value must be unique across all payouts. - `FundingIDs []string` Funding Ids - `Paykey string` Value of the `paykey` used for the payout. - `PaymentDate Time` The desired date on which the payment should be occur. For payouts, this means the date you want the funds to be sent from your bank account. - `Status string` The current status of the payout. - `const PayoutV1DataStatusCreated PayoutV1DataStatus = "created"` - `const PayoutV1DataStatusScheduled PayoutV1DataStatus = "scheduled"` - `const PayoutV1DataStatusFailed PayoutV1DataStatus = "failed"` - `const PayoutV1DataStatusCancelled PayoutV1DataStatus = "cancelled"` - `const PayoutV1DataStatusOnHold PayoutV1DataStatus = "on_hold"` - `const PayoutV1DataStatusPending PayoutV1DataStatus = "pending"` - `const PayoutV1DataStatusPaid PayoutV1DataStatus = "paid"` - `const PayoutV1DataStatusReversed PayoutV1DataStatus = "reversed"` - `const PayoutV1DataStatusValidating PayoutV1DataStatus = "validating"` - `StatusDetails StatusDetailsV1` Details about the current status of the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the current status. - `Reason StatusDetailsV1Reason` A machine-readable identifier for the specific status, useful for programmatic handling. - `const StatusDetailsV1ReasonInsufficientFunds StatusDetailsV1Reason = "insufficient_funds"` - `const StatusDetailsV1ReasonClosedBankAccount StatusDetailsV1Reason = "closed_bank_account"` - `const StatusDetailsV1ReasonInvalidBankAccount StatusDetailsV1Reason = "invalid_bank_account"` - `const StatusDetailsV1ReasonInvalidRouting StatusDetailsV1Reason = "invalid_routing"` - `const StatusDetailsV1ReasonDisputed StatusDetailsV1Reason = "disputed"` - `const StatusDetailsV1ReasonPaymentStopped StatusDetailsV1Reason = "payment_stopped"` - `const StatusDetailsV1ReasonOwnerDeceased StatusDetailsV1Reason = "owner_deceased"` - `const StatusDetailsV1ReasonFrozenBankAccount StatusDetailsV1Reason = "frozen_bank_account"` - `const StatusDetailsV1ReasonRiskReview StatusDetailsV1Reason = "risk_review"` - `const StatusDetailsV1ReasonFraudulent StatusDetailsV1Reason = "fraudulent"` - `const StatusDetailsV1ReasonDuplicateEntry StatusDetailsV1Reason = "duplicate_entry"` - `const StatusDetailsV1ReasonInvalidPaykey StatusDetailsV1Reason = "invalid_paykey"` - `const StatusDetailsV1ReasonPaymentBlocked StatusDetailsV1Reason = "payment_blocked"` - `const StatusDetailsV1ReasonAmountTooLarge StatusDetailsV1Reason = "amount_too_large"` - `const StatusDetailsV1ReasonTooManyAttempts StatusDetailsV1Reason = "too_many_attempts"` - `const StatusDetailsV1ReasonInternalSystemError StatusDetailsV1Reason = "internal_system_error"` - `const StatusDetailsV1ReasonUserRequest StatusDetailsV1Reason = "user_request"` - `const StatusDetailsV1ReasonOk StatusDetailsV1Reason = "ok"` - `const StatusDetailsV1ReasonOtherNetworkReturn StatusDetailsV1Reason = "other_network_return"` - `const StatusDetailsV1ReasonPayoutRefused StatusDetailsV1Reason = "payout_refused"` - `const StatusDetailsV1ReasonCancelRequest StatusDetailsV1Reason = "cancel_request"` - `const StatusDetailsV1ReasonFailedVerification StatusDetailsV1Reason = "failed_verification"` - `const StatusDetailsV1ReasonRequireReview StatusDetailsV1Reason = "require_review"` - `const StatusDetailsV1ReasonBlockedBySystem StatusDetailsV1Reason = "blocked_by_system"` - `const StatusDetailsV1ReasonWatchtowerReview StatusDetailsV1Reason = "watchtower_review"` - `const StatusDetailsV1ReasonValidating StatusDetailsV1Reason = "validating"` - `const StatusDetailsV1ReasonAutoHold StatusDetailsV1Reason = "auto_hold"` - `Source StatusDetailsV1Source` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const StatusDetailsV1SourceWatchtower StatusDetailsV1Source = "watchtower"` - `const StatusDetailsV1SourceBankDecline StatusDetailsV1Source = "bank_decline"` - `const StatusDetailsV1SourceCustomerDispute StatusDetailsV1Source = "customer_dispute"` - `const StatusDetailsV1SourceUserAction StatusDetailsV1Source = "user_action"` - `const StatusDetailsV1SourceSystem StatusDetailsV1Source = "system"` - `Code string` The status code if applicable. - `StatusHistory []PayoutV1DataStatusHistory` History of the status changes for the payout. - `ChangedAt Time` The time the status change occurred. - `Message string` A human-readable description of the status. - `Reason string` A machine-readable identifier for the specific status, useful for programmatic handling. - `const PayoutV1DataStatusHistoryReasonInsufficientFunds PayoutV1DataStatusHistoryReason = "insufficient_funds"` - `const PayoutV1DataStatusHistoryReasonClosedBankAccount PayoutV1DataStatusHistoryReason = "closed_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidBankAccount PayoutV1DataStatusHistoryReason = "invalid_bank_account"` - `const PayoutV1DataStatusHistoryReasonInvalidRouting PayoutV1DataStatusHistoryReason = "invalid_routing"` - `const PayoutV1DataStatusHistoryReasonDisputed PayoutV1DataStatusHistoryReason = "disputed"` - `const PayoutV1DataStatusHistoryReasonPaymentStopped PayoutV1DataStatusHistoryReason = "payment_stopped"` - `const PayoutV1DataStatusHistoryReasonOwnerDeceased PayoutV1DataStatusHistoryReason = "owner_deceased"` - `const PayoutV1DataStatusHistoryReasonFrozenBankAccount PayoutV1DataStatusHistoryReason = "frozen_bank_account"` - `const PayoutV1DataStatusHistoryReasonRiskReview PayoutV1DataStatusHistoryReason = "risk_review"` - `const PayoutV1DataStatusHistoryReasonFraudulent PayoutV1DataStatusHistoryReason = "fraudulent"` - `const PayoutV1DataStatusHistoryReasonDuplicateEntry PayoutV1DataStatusHistoryReason = "duplicate_entry"` - `const PayoutV1DataStatusHistoryReasonInvalidPaykey PayoutV1DataStatusHistoryReason = "invalid_paykey"` - `const PayoutV1DataStatusHistoryReasonPaymentBlocked PayoutV1DataStatusHistoryReason = "payment_blocked"` - `const PayoutV1DataStatusHistoryReasonAmountTooLarge PayoutV1DataStatusHistoryReason = "amount_too_large"` - `const PayoutV1DataStatusHistoryReasonTooManyAttempts PayoutV1DataStatusHistoryReason = "too_many_attempts"` - `const PayoutV1DataStatusHistoryReasonInternalSystemError PayoutV1DataStatusHistoryReason = "internal_system_error"` - `const PayoutV1DataStatusHistoryReasonUserRequest PayoutV1DataStatusHistoryReason = "user_request"` - `const PayoutV1DataStatusHistoryReasonOk PayoutV1DataStatusHistoryReason = "ok"` - `const PayoutV1DataStatusHistoryReasonOtherNetworkReturn PayoutV1DataStatusHistoryReason = "other_network_return"` - `const PayoutV1DataStatusHistoryReasonPayoutRefused PayoutV1DataStatusHistoryReason = "payout_refused"` - `const PayoutV1DataStatusHistoryReasonCancelRequest PayoutV1DataStatusHistoryReason = "cancel_request"` - `const PayoutV1DataStatusHistoryReasonFailedVerification PayoutV1DataStatusHistoryReason = "failed_verification"` - `const PayoutV1DataStatusHistoryReasonRequireReview PayoutV1DataStatusHistoryReason = "require_review"` - `const PayoutV1DataStatusHistoryReasonBlockedBySystem PayoutV1DataStatusHistoryReason = "blocked_by_system"` - `const PayoutV1DataStatusHistoryReasonWatchtowerReview PayoutV1DataStatusHistoryReason = "watchtower_review"` - `const PayoutV1DataStatusHistoryReasonValidating PayoutV1DataStatusHistoryReason = "validating"` - `const PayoutV1DataStatusHistoryReasonAutoHold PayoutV1DataStatusHistoryReason = "auto_hold"` - `Source string` Identifies the origin of the status change (e.g., `bank_decline`, `watchtower`). This helps in tracking the cause of status updates. - `const PayoutV1DataStatusHistorySourceWatchtower PayoutV1DataStatusHistorySource = "watchtower"` - `const PayoutV1DataStatusHistorySourceBankDecline PayoutV1DataStatusHistorySource = "bank_decline"` - `const PayoutV1DataStatusHistorySourceCustomerDispute PayoutV1DataStatusHistorySource = "customer_dispute"` - `const PayoutV1DataStatusHistorySourceUserAction PayoutV1DataStatusHistorySource = "user_action"` - `const PayoutV1DataStatusHistorySourceSystem PayoutV1DataStatusHistorySource = "system"` - `Status string` The current status of the `charge` or `payout`. - `const PayoutV1DataStatusHistoryStatusCreated PayoutV1DataStatusHistoryStatus = "created"` - `const PayoutV1DataStatusHistoryStatusScheduled PayoutV1DataStatusHistoryStatus = "scheduled"` - `const PayoutV1DataStatusHistoryStatusFailed PayoutV1DataStatusHistoryStatus = "failed"` - `const PayoutV1DataStatusHistoryStatusCancelled PayoutV1DataStatusHistoryStatus = "cancelled"` - `const PayoutV1DataStatusHistoryStatusOnHold PayoutV1DataStatusHistoryStatus = "on_hold"` - `const PayoutV1DataStatusHistoryStatusPending PayoutV1DataStatusHistoryStatus = "pending"` - `const PayoutV1DataStatusHistoryStatusPaid PayoutV1DataStatusHistoryStatus = "paid"` - `const PayoutV1DataStatusHistoryStatusReversed PayoutV1DataStatusHistoryStatus = "reversed"` - `const PayoutV1DataStatusHistoryStatusValidating PayoutV1DataStatusHistoryStatus = "validating"` - `Code string` The status code if applicable. - `TraceIDs map[string, string]` Trace Ids. - `CreatedAt Time` The time the payout was created. - `CustomerDetails CustomerDetailsV1` Information about the customer associated with the payout. - `ID string` Unique identifier for the customer - `CustomerType CustomerDetailsV1CustomerType` The type of customer - `const CustomerDetailsV1CustomerTypeIndividual CustomerDetailsV1CustomerType = "individual"` - `const CustomerDetailsV1CustomerTypeBusiness CustomerDetailsV1CustomerType = "business"` - `Email string` The customer's email address - `Name string` The name of the customer - `Phone string` The customer's phone number in E.164 format - `EffectiveAt Time` The actual date on which the payment occurred. For payouts, this is the date the funds were sent from your bank account. - `Metadata map[string, string]` Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format. - `PaykeyDetails PaykeyDetailsV1` Information about the paykey used for the payout. - `ID string` Unique identifier for the paykey. - `CustomerID string` Unique identifier for the customer associated with the paykey. - `Label string` Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI - `Balance int64` The most recent balance of the bank account associated with the paykey in dollars. - `PaymentRail string` The payment rail used for the payout. - `const PayoutV1DataPaymentRailACH PayoutV1DataPaymentRail = "ach"` - `ProcessedAt Time` The time the payout was processed by Straddle and originated to the payment rail. - `RelatedPayments map[string, string]` Related payments. - `const PayoutV1DataRelatedPaymentOriginal PayoutV1DataRelatedPayment = "original"` - `const PayoutV1DataRelatedPaymentResubmit PayoutV1DataRelatedPayment = "resubmit"` - `const PayoutV1DataRelatedPaymentRefund PayoutV1DataRelatedPayment = "refund"` - `UpdatedAt Time` The time the payout was last updated. - `Meta ResponseMetadata` Metadata about the API request, including an identifier and timestamp. - `APIRequestID string` Unique identifier for this API request, useful for troubleshooting. - `APIRequestTimestamp Time` Timestamp for this API request, useful for troubleshooting. - `ResponseType PayoutV1ResponseType` Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned. - `const PayoutV1ResponseTypeObject PayoutV1ResponseType = "object"` - `const PayoutV1ResponseTypeArray PayoutV1ResponseType = "array"` - `const PayoutV1ResponseTypeError PayoutV1ResponseType = "error"` - `const PayoutV1ResponseTypeNone PayoutV1ResponseType = "none"`