Skip to content
Get started

Unmask a paykey

client.Paykeys.Unmasked(ctx, id, query) (*PaykeyUnmaskedV1, error)
GET/v1/paykeys/{id}/unmasked

Retrieves the unmasked details of an existing paykey. Supply the unique paykey id and Straddle will return the corresponding paykey record, including the unmasked bank account details. This endpoint needs to be enabled by Straddle for your account and should only be used when absolutely necessary.

ParametersExpand Collapse
id string
query PaykeyUnmaskedParams
CorrelationID param.Field[string]optional

Optional client generated identifier to trace and debug a series of requests.

RequestID param.Field[string]optional

Optional client generated identifier to trace and debug a request.

StraddleAccountID param.Field[string]optional

For use by platforms to specify an account id and set scope of a request.

formatuuid
ReturnsExpand Collapse
type PaykeyUnmaskedV1 struct{…}
Data PaykeyUnmaskedV1Data
ID string

Unique identifier for the paykey.

formatuuid
Config PaykeyUnmaskedV1DataConfig
ProcessingMethod stringoptional
One of the following:
const PaykeyUnmaskedV1DataConfigProcessingMethodInline PaykeyUnmaskedV1DataConfigProcessingMethod = "inline"
const PaykeyUnmaskedV1DataConfigProcessingMethodBackground PaykeyUnmaskedV1DataConfigProcessingMethod = "background"
const PaykeyUnmaskedV1DataConfigProcessingMethodSkip PaykeyUnmaskedV1DataConfigProcessingMethod = "skip"
SandboxOutcome stringoptional
One of the following:
const PaykeyUnmaskedV1DataConfigSandboxOutcomeStandard PaykeyUnmaskedV1DataConfigSandboxOutcome = "standard"
const PaykeyUnmaskedV1DataConfigSandboxOutcomeActive PaykeyUnmaskedV1DataConfigSandboxOutcome = "active"
const PaykeyUnmaskedV1DataConfigSandboxOutcomeRejected PaykeyUnmaskedV1DataConfigSandboxOutcome = "rejected"
const PaykeyUnmaskedV1DataConfigSandboxOutcomeReview PaykeyUnmaskedV1DataConfigSandboxOutcome = "review"
CreatedAt Time

Timestamp of when the paykey was created.

formatdate-time
Label string

Human-readable label used to represent this paykey in a UI.

Paykey string

The tokenized paykey value. This value is used to create payments and should be stored securely.

Source string
One of the following:
const PaykeyUnmaskedV1DataSourceBankAccount PaykeyUnmaskedV1DataSource = "bank_account"
const PaykeyUnmaskedV1DataSourceStraddle PaykeyUnmaskedV1DataSource = "straddle"
const PaykeyUnmaskedV1DataSourceMx PaykeyUnmaskedV1DataSource = "mx"
const PaykeyUnmaskedV1DataSourcePlaid PaykeyUnmaskedV1DataSource = "plaid"
const PaykeyUnmaskedV1DataSourceTan PaykeyUnmaskedV1DataSource = "tan"
const PaykeyUnmaskedV1DataSourceQuiltt PaykeyUnmaskedV1DataSource = "quiltt"
Status string
One of the following:
const PaykeyUnmaskedV1DataStatusPending PaykeyUnmaskedV1DataStatus = "pending"
const PaykeyUnmaskedV1DataStatusActive PaykeyUnmaskedV1DataStatus = "active"
const PaykeyUnmaskedV1DataStatusInactive PaykeyUnmaskedV1DataStatus = "inactive"
const PaykeyUnmaskedV1DataStatusRejected PaykeyUnmaskedV1DataStatus = "rejected"
const PaykeyUnmaskedV1DataStatusReview PaykeyUnmaskedV1DataStatus = "review"
const PaykeyUnmaskedV1DataStatusBlocked PaykeyUnmaskedV1DataStatus = "blocked"
UpdatedAt Time

Timestamp of the most recent update to the paykey.

formatdate-time
Balance PaykeyUnmaskedV1DataBalanceoptional
Status string
One of the following:
const PaykeyUnmaskedV1DataBalanceStatusPending PaykeyUnmaskedV1DataBalanceStatus = "pending"
const PaykeyUnmaskedV1DataBalanceStatusCompleted PaykeyUnmaskedV1DataBalanceStatus = "completed"
const PaykeyUnmaskedV1DataBalanceStatusFailed PaykeyUnmaskedV1DataBalanceStatus = "failed"
AccountBalance int64optional

Account Balance when last retrieved

formatint32
UpdatedAt Timeoptional

Last time account balance was updated.

formatdate-time
BankData PaykeyUnmaskedV1DataBankDataoptional
AccountNumber string

The bank account number

AccountType string
One of the following:
const PaykeyUnmaskedV1DataBankDataAccountTypeChecking PaykeyUnmaskedV1DataBankDataAccountType = "checking"
const PaykeyUnmaskedV1DataBankDataAccountTypeSavings PaykeyUnmaskedV1DataBankDataAccountType = "savings"
RoutingNumber string

The routing number of the bank account.

minLength9
maxLength9
CustomerID stringoptional

Unique identifier of the related customer object.

formatuuid
ExpiresAt Timeoptional

Expiration date and time of the paykey, if applicable.

formatdate-time
ExternalID stringoptional

Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems.

InstitutionName stringoptional

Name of the financial institution.

Metadata map[string, string]optional

Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format.

StatusDetails PaykeyUnmaskedV1DataStatusDetailsoptional
ChangedAt Time

The time the status change occurred.

formatdate-time
Message string

A human-readable description of the current status.

Reason string
One of the following:
const PaykeyUnmaskedV1DataStatusDetailsReasonInsufficientFunds PaykeyUnmaskedV1DataStatusDetailsReason = "insufficient_funds"
const PaykeyUnmaskedV1DataStatusDetailsReasonClosedBankAccount PaykeyUnmaskedV1DataStatusDetailsReason = "closed_bank_account"
const PaykeyUnmaskedV1DataStatusDetailsReasonInvalidBankAccount PaykeyUnmaskedV1DataStatusDetailsReason = "invalid_bank_account"
const PaykeyUnmaskedV1DataStatusDetailsReasonInvalidRouting PaykeyUnmaskedV1DataStatusDetailsReason = "invalid_routing"
const PaykeyUnmaskedV1DataStatusDetailsReasonDisputed PaykeyUnmaskedV1DataStatusDetailsReason = "disputed"
const PaykeyUnmaskedV1DataStatusDetailsReasonPaymentStopped PaykeyUnmaskedV1DataStatusDetailsReason = "payment_stopped"
const PaykeyUnmaskedV1DataStatusDetailsReasonOwnerDeceased PaykeyUnmaskedV1DataStatusDetailsReason = "owner_deceased"
const PaykeyUnmaskedV1DataStatusDetailsReasonFrozenBankAccount PaykeyUnmaskedV1DataStatusDetailsReason = "frozen_bank_account"
const PaykeyUnmaskedV1DataStatusDetailsReasonRiskReview PaykeyUnmaskedV1DataStatusDetailsReason = "risk_review"
const PaykeyUnmaskedV1DataStatusDetailsReasonFraudulent PaykeyUnmaskedV1DataStatusDetailsReason = "fraudulent"
const PaykeyUnmaskedV1DataStatusDetailsReasonDuplicateEntry PaykeyUnmaskedV1DataStatusDetailsReason = "duplicate_entry"
const PaykeyUnmaskedV1DataStatusDetailsReasonInvalidPaykey PaykeyUnmaskedV1DataStatusDetailsReason = "invalid_paykey"
const PaykeyUnmaskedV1DataStatusDetailsReasonPaymentBlocked PaykeyUnmaskedV1DataStatusDetailsReason = "payment_blocked"
const PaykeyUnmaskedV1DataStatusDetailsReasonAmountTooLarge PaykeyUnmaskedV1DataStatusDetailsReason = "amount_too_large"
const PaykeyUnmaskedV1DataStatusDetailsReasonTooManyAttempts PaykeyUnmaskedV1DataStatusDetailsReason = "too_many_attempts"
const PaykeyUnmaskedV1DataStatusDetailsReasonInternalSystemError PaykeyUnmaskedV1DataStatusDetailsReason = "internal_system_error"
const PaykeyUnmaskedV1DataStatusDetailsReasonUserRequest PaykeyUnmaskedV1DataStatusDetailsReason = "user_request"
const PaykeyUnmaskedV1DataStatusDetailsReasonOk PaykeyUnmaskedV1DataStatusDetailsReason = "ok"
const PaykeyUnmaskedV1DataStatusDetailsReasonOtherNetworkReturn PaykeyUnmaskedV1DataStatusDetailsReason = "other_network_return"
const PaykeyUnmaskedV1DataStatusDetailsReasonPayoutRefused PaykeyUnmaskedV1DataStatusDetailsReason = "payout_refused"
const PaykeyUnmaskedV1DataStatusDetailsReasonCancelRequest PaykeyUnmaskedV1DataStatusDetailsReason = "cancel_request"
const PaykeyUnmaskedV1DataStatusDetailsReasonFailedVerification PaykeyUnmaskedV1DataStatusDetailsReason = "failed_verification"
const PaykeyUnmaskedV1DataStatusDetailsReasonRequireReview PaykeyUnmaskedV1DataStatusDetailsReason = "require_review"
const PaykeyUnmaskedV1DataStatusDetailsReasonBlockedBySystem PaykeyUnmaskedV1DataStatusDetailsReason = "blocked_by_system"
const PaykeyUnmaskedV1DataStatusDetailsReasonWatchtowerReview PaykeyUnmaskedV1DataStatusDetailsReason = "watchtower_review"
const PaykeyUnmaskedV1DataStatusDetailsReasonValidating PaykeyUnmaskedV1DataStatusDetailsReason = "validating"
const PaykeyUnmaskedV1DataStatusDetailsReasonAutoHold PaykeyUnmaskedV1DataStatusDetailsReason = "auto_hold"
Source string
One of the following:
const PaykeyUnmaskedV1DataStatusDetailsSourceWatchtower PaykeyUnmaskedV1DataStatusDetailsSource = "watchtower"
const PaykeyUnmaskedV1DataStatusDetailsSourceBankDecline PaykeyUnmaskedV1DataStatusDetailsSource = "bank_decline"
const PaykeyUnmaskedV1DataStatusDetailsSourceCustomerDispute PaykeyUnmaskedV1DataStatusDetailsSource = "customer_dispute"
const PaykeyUnmaskedV1DataStatusDetailsSourceUserAction PaykeyUnmaskedV1DataStatusDetailsSource = "user_action"
const PaykeyUnmaskedV1DataStatusDetailsSourceSystem PaykeyUnmaskedV1DataStatusDetailsSource = "system"
Code stringoptional

The status code if applicable.

Metadata about the API request, including an identifier and timestamp.

APIRequestID string

Unique identifier for this API request, useful for troubleshooting.

formatuuid
APIRequestTimestamp Time

Timestamp for this API request, useful for troubleshooting.

formatdate-time
ResponseType PaykeyUnmaskedV1ResponseType

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.
One of the following:
const PaykeyUnmaskedV1ResponseTypeObject PaykeyUnmaskedV1ResponseType = "object"
const PaykeyUnmaskedV1ResponseTypeArray PaykeyUnmaskedV1ResponseType = "array"
const PaykeyUnmaskedV1ResponseTypeError PaykeyUnmaskedV1ResponseType = "error"
const PaykeyUnmaskedV1ResponseTypeNone PaykeyUnmaskedV1ResponseType = "none"

Unmask a paykey

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"),
  )
  paykeyUnmaskedV1, err := client.Paykeys.Unmasked(
    context.TODO(),
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    straddle.PaykeyUnmaskedParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", paykeyUnmaskedV1.Data)
}
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "config": {
      "processing_method": "inline",
      "sandbox_outcome": "standard"
    },
    "created_at": "2019-12-27T18:11:19.117Z",
    "label": "label",
    "paykey": "paykey",
    "source": "bank_account",
    "status": "pending",
    "updated_at": "2019-12-27T18:11:19.117Z",
    "balance": {
      "status": "pending",
      "account_balance": 0,
      "updated_at": "2019-12-27T18:11:19.117Z"
    },
    "bank_data": {
      "account_number": "123456789",
      "account_type": "checking",
      "routing_number": "021000021"
    },
    "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "expires_at": "2019-12-27T18:11:19.117Z",
    "external_id": "external_id",
    "institution_name": "Bank of America",
    "metadata": {
      "foo": "string"
    },
    "status_details": {
      "changed_at": "2019-12-27T18:11:19.117Z",
      "message": "Bank account sucesfully validated",
      "reason": "insufficient_funds",
      "source": "watchtower",
      "code": "code"
    }
  },
  "meta": {
    "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "api_request_timestamp": "2019-12-27T18:11:19.117Z"
  },
  "response_type": "object"
}
Returns Examples
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "config": {
      "processing_method": "inline",
      "sandbox_outcome": "standard"
    },
    "created_at": "2019-12-27T18:11:19.117Z",
    "label": "label",
    "paykey": "paykey",
    "source": "bank_account",
    "status": "pending",
    "updated_at": "2019-12-27T18:11:19.117Z",
    "balance": {
      "status": "pending",
      "account_balance": 0,
      "updated_at": "2019-12-27T18:11:19.117Z"
    },
    "bank_data": {
      "account_number": "123456789",
      "account_type": "checking",
      "routing_number": "021000021"
    },
    "customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "expires_at": "2019-12-27T18:11:19.117Z",
    "external_id": "external_id",
    "institution_name": "Bank of America",
    "metadata": {
      "foo": "string"
    },
    "status_details": {
      "changed_at": "2019-12-27T18:11:19.117Z",
      "message": "Bank account sucesfully validated",
      "reason": "insufficient_funds",
      "source": "watchtower",
      "code": "code"
    }
  },
  "meta": {
    "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "api_request_timestamp": "2019-12-27T18:11:19.117Z"
  },
  "response_type": "object"
}