Skip to content

Latest commit

 

History

History
67 lines (58 loc) · 9.43 KB

payment.md

File metadata and controls

67 lines (58 loc) · 9.43 KB

Payment

Represents a payment processed by the Square API.

Structure

Payment

Fields

Name Type Tags Description
id string Optional A unique ID for the payment.
Constraints: Maximum Length: 192
created_at string Optional The timestamp of when the payment was created, in RFC 3339 format.
Constraints: Maximum Length: 32
updated_at string Optional The timestamp of when the payment was last updated, in RFC 3339 format.
Constraints: Maximum Length: 32
amount_money Money Optional Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
tip_money Money Optional Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
total_money Money Optional Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
app_fee_money Money Optional Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
approved_money Money Optional Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
processing_fee List of Processing Fee Optional The processing fees and fee adjustments assessed by Square for this payment.
refunded_money Money Optional Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
status string Optional Indicates whether the payment is APPROVED, PENDING, COMPLETED, CANCELED, or FAILED.
Constraints: Maximum Length: 50
delay_duration string Optional The duration of time after the payment's creation when Square automatically applies the
delay_action to the payment. This automatic delay_action applies only to payments that
do not reach a terminal state (COMPLETED, CANCELED, or FAILED) before the delay_duration
time period.

This field is specified as a time duration, in RFC 3339 format.

Notes:
This feature is only supported for card payments.

Default:

- Card-present payments: "PT36H" (36 hours) from the creation time.
- Card-not-present payments: "P7D" (7 days) from the creation time.
delay_action string Optional The action to be applied to the payment when the delay_duration has elapsed. This field
is read-only.

Current values include CANCEL.
delayed_until string Optional The read-only timestamp of when the delay_action is automatically applied,
in RFC 3339 format.

Note that this field is calculated by summing the payment's delay_duration and created_at
fields. The created_at field is generated by Square and might not exactly match the
time on your local machine.
source_type string Optional The source type for this payment.

Current values include CARD, BANK_ACCOUNT, CASH, or EXTERNAL.
Constraints: Maximum Length: 50
card_details Card Payment Details Optional Reflects the current status of a card payment. Contains only non-confidential information.
cash_details Cash Payment Details Optional Stores details about a cash payment. Contains only non-confidential information. For more information, see
Take Cash Payments.
bank_account_details Bank Account Payment Details Optional Additional details about BANK_ACCOUNT type payments.
external_details External Payment Details Optional Stores details about an external payment. Contains only non-confidential information.
For more information, see
Take External Payments.
location_id string Optional The ID of the location associated with the payment.
Constraints: Maximum Length: 50
order_id string Optional The ID of the order associated with the payment.
Constraints: Maximum Length: 192
reference_id string Optional An optional ID that associates the payment with an entity in
another system.
Constraints: Maximum Length: 40
customer_id string Optional The Customer ID of the customer associated with the payment.
Constraints: Maximum Length: 191
employee_id string Optional An optional ID of the employee associated with taking the payment.
Constraints: Maximum Length: 192
refund_ids List of string Optional A list of refund_ids identifying refunds for the payment.
risk_evaluation Risk Evaluation Optional Represents fraud risk information for the associated payment.

When you take a payment through Square's Payments API (using the CreatePayment
endpoint), Square evaluates it and assigns a risk level to the payment. Sellers
can use this information to determine the course of action (for example,
provide the goods/services or refund the payment).
buyer_email_address string Optional The buyer's email address.
Constraints: Maximum Length: 255
billing_address Address Optional Represents a physical address.
shipping_address Address Optional Represents a physical address.
note string Optional An optional note to include when creating a payment.
Constraints: Maximum Length: 500
statement_description_identifier string Optional Additional payment information that gets added to the customer's card statement
as part of the statement description.

Note that the statement_description_identifier might get truncated on the statement description
to fit the required information including the Square identifier (SQ *) and the name of the
seller taking the payment.
capabilities List of string Optional Actions that can be performed on this payment:

- EDIT_AMOUNT_UP - The payment amount can be edited up.
- EDIT_AMOUNT_DOWN - The payment amount can be edited down.
- EDIT_TIP_AMOUNT_UP - The tip amount can be edited up.
- EDIT_TIP_AMOUNT_DOWN - The tip amount can be edited down.
receipt_number string Optional The payment's receipt number.
The field is missing if a payment is canceled.
Constraints: Maximum Length: 4
receipt_url string Optional The URL for the payment's receipt.
The field is only populated for COMPLETED payments.
Constraints: Maximum Length: 255
version_token string Optional Used for optimistic concurrency. This opaque token identifies a specific version of the
Payment object.

Example (as JSON)

{
  "id": "id0",
  "created_at": "created_at2",
  "updated_at": "updated_at4",
  "amount_money": {
    "amount": 186,
    "currency": "NGN"
  },
  "tip_money": {
    "amount": 190,
    "currency": "CHE"
  }
}