Charges
Charges represent attempts to debit money from a customer's bank account using a Paykey. Each charge includes automatic balance verification, real-time fraud screening, and multi-rail optimization and detailed status tracking throughout the payment lifecycle. Use charges to accept bank payments with confidence knowing every transaction is protected.
Release a charge
Get a charge by id.
ModelsExpand Collapse
type ChargeV1 struct{…}
Data ChargeV1Data
Config ChargeV1DataConfig
Configuration options for the charge.
AutoHold booloptional
Defines whether to automatically place this charge on hold after being created.
SandboxOutcome stringoptional
Payment will simulate processing if not Standard.
ConsentType string
The channel or mechanism through which the payment was authorized. Use internet for payments made online or through a mobile app and signed for signed agreements where there is a consent form or contract. Use signed for PDF signatures.
Device DeviceInfoV1
ExternalID string
Unique identifier for the charge in your database. This value must be unique across all charges.
PaymentDate Time
The desired date on which the payment should be occur. For charges, this means the date you want the customer to be debited on.
StatusDetails StatusDetailsV1
Additional details about the current status of the charge.
Reason StatusDetailsV1Reason
A machine-readable identifier for the specific status, useful for programmatic handling.
StatusHistory []ChargeV1DataStatusHistory
Status history.
Reason string
A machine-readable identifier for the specific status, useful for programmatic handling.
Source string
EffectiveAt Timeoptional
Timestamp of when the charge was effective in the customer's bank account, otherwise known as the date on which the customer is debited.
Metadata map[string, string]optional
Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the charge in a structured format.
ProcessedAt Timeoptional
Timestamp of when the charge was processed by Straddle and originated to the payment rail.
Meta ResponseMetadata
ResponseType ChargeV1ResponseType
Indicates the structure of the returned content.
- "object" means the
datafield contains a single JSON object. - "array" means the
datafield contains an array of objects. - "error" means the
datafield contains an error object with details of the issue. - "none" means no data is returned.