PUT /v2/payments/{payment_id}
Updates a payment with the APPROVED status.
You can update the amount_money
and tip_money
using this endpoint.
Servers
- https://connect.squareup.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
payment_id |
String | Yes |
The ID of the payment to update. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
payment |
Object | No |
Represents a payment processed by the Square API. |
payment.total_money |
Object | No |
Represents an amount of money. |
payment.total_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.total_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.delayed_until |
String | No |
The read-only timestamp of when the Note that this field is calculated by summing the payment's |
payment.approved_money |
Object | No |
Represents an amount of money. |
payment.approved_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.approved_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.delay_duration |
String | No |
The duration of time after the payment's creation when Square automatically applies the
This field is specified as a time duration, in RFC 3339 format. Notes: This feature is only supported for card payments. Default:
|
payment.bank_account_details |
Object | No |
Additional details about BANK_ACCOUNT type payments. |
payment.bank_account_details.statement_description |
String | No |
The statement description as sent to the bank. |
payment.bank_account_details.account_ownership_type |
String | No |
The ownership type of the bank account performing the transfer.
The type can be |
payment.bank_account_details.bank_name |
String | No |
The name of the bank associated with the bank account. |
payment.bank_account_details.errors[] |
Array | No |
Information about errors encountered during the request. |
payment.bank_account_details.errors[].category |
String | Yes |
The high-level category for the error. |
payment.bank_account_details.errors[].field |
String | No |
The name of the field provided in the original request (if any) that the error pertains to. |
payment.bank_account_details.errors[].code |
String | Yes |
The specific code of the error. |
payment.bank_account_details.errors[].detail |
String | No |
A human-readable description of the error for debugging purposes. |
payment.bank_account_details.fingerprint |
String | No |
Uniquely identifies the bank account for this seller and can be used to determine if payments are from the same bank account. |
payment.bank_account_details.transfer_type |
String | No |
The type of the bank transfer. The type can be |
payment.bank_account_details.ach_details |
Object | No |
ACH-specific details about |
payment.bank_account_details.ach_details.account_number_suffix |
String | No |
The last few digits of the bank account number. |
payment.bank_account_details.ach_details.routing_number |
String | No |
The routing number for the bank account. |
payment.bank_account_details.ach_details.account_type |
String | No |
The type of the bank account performing the transfer. The account type can be |
payment.bank_account_details.country |
String | No |
The two-letter ISO code representing the country the bank account is located in. |
payment.reference_id |
String | No |
An optional ID that associates the payment with an entity in another system. |
payment.updated_at |
String | No |
The timestamp of when the payment was last updated, in RFC 3339 format. |
payment.external_details |
Object | No |
Stores details about an external payment. Contains only non-confidential information. For more information, see Take External Payments. |
payment.external_details.source |
String | Yes |
A description of the external payment source. For example, "Food Delivery Service". |
payment.external_details.source_id |
String | No |
An ID to associate the payment to its originating source. |
payment.external_details.source_fee_money |
Object | No |
Represents an amount of money. |
payment.external_details.source_fee_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.external_details.source_fee_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.external_details.type |
String | Yes |
The type of external payment the seller received. It can be one of the following:
|
payment.id |
String | No |
A unique ID for the payment. |
payment.note |
String | No |
An optional note to include when creating a payment. |
payment.buyer_email_address |
String | No |
The buyer's email address. |
payment.billing_address |
Object | No |
Represents a postal address in a country. The address format is based
on an open-source library from Google. For more information,
see AddressValidationMetadata.
This format has dedicated fields for four address components: postal code,
locality (city), administrative district (state, prefecture, or province), and
sublocality (town or village). These components have dedicated fields in the
For the remaining address components, the Note that, in the current implementation, all other When it comes to localization, the seller's language preferences (see Language preferences) are ignored for addresses. Even though Square products (such as Square Point of Sale and the Seller Dashboard) mostly use a seller's language preference in communication, when it comes to addresses, they will use English for a US address, Japanese for an address in Japan, and so on. |
payment.billing_address.address_line_3 |
String | No |
The third line of the address, if any. |
payment.billing_address.first_name |
String | No |
Optional first name when it's representing recipient. |
payment.billing_address.postal_code |
String | No |
The address's postal code. |
payment.billing_address.organization |
String | No |
Optional organization name when it's representing recipient. |
payment.billing_address.address_line_2 |
String | No |
The second line of the address, if any. |
payment.billing_address.address_line_1 |
String | No |
The first line of the address. Fields that start with |
payment.billing_address.administrative_district_level_3 |
String | No |
A civil entity within the address's |
payment.billing_address.sublocality_2 |
String | No |
A civil region within the address's |
payment.billing_address.administrative_district_level_2 |
String | No |
A civil entity within the address's |
payment.billing_address.locality |
String | No |
The city or town of the address. |
payment.billing_address.sublocality |
String | No |
A civil region within the address's |
payment.billing_address.last_name |
String | No |
Optional last name when it's representing recipient. |
payment.billing_address.administrative_district_level_1 |
String | No |
A civil entity within the address's country. In the US, this is the state. |
payment.billing_address.sublocality_3 |
String | No |
A civil region within the address's |
payment.billing_address.country |
String | No |
The address's country, in ISO 3166-1-alpha-2 format. |
payment.shipping_address |
Object | No |
Represents a postal address in a country. The address format is based
on an open-source library from Google. For more information,
see AddressValidationMetadata.
This format has dedicated fields for four address components: postal code,
locality (city), administrative district (state, prefecture, or province), and
sublocality (town or village). These components have dedicated fields in the
For the remaining address components, the Note that, in the current implementation, all other When it comes to localization, the seller's language preferences (see Language preferences) are ignored for addresses. Even though Square products (such as Square Point of Sale and the Seller Dashboard) mostly use a seller's language preference in communication, when it comes to addresses, they will use English for a US address, Japanese for an address in Japan, and so on. |
payment.shipping_address.address_line_3 |
String | No |
The third line of the address, if any. |
payment.shipping_address.first_name |
String | No |
Optional first name when it's representing recipient. |
payment.shipping_address.postal_code |
String | No |
The address's postal code. |
payment.shipping_address.organization |
String | No |
Optional organization name when it's representing recipient. |
payment.shipping_address.address_line_2 |
String | No |
The second line of the address, if any. |
payment.shipping_address.address_line_1 |
String | No |
The first line of the address. Fields that start with |
payment.shipping_address.administrative_district_level_3 |
String | No |
A civil entity within the address's |
payment.shipping_address.sublocality_2 |
String | No |
A civil region within the address's |
payment.shipping_address.administrative_district_level_2 |
String | No |
A civil entity within the address's |
payment.shipping_address.locality |
String | No |
The city or town of the address. |
payment.shipping_address.sublocality |
String | No |
A civil region within the address's |
payment.shipping_address.last_name |
String | No |
Optional last name when it's representing recipient. |
payment.shipping_address.administrative_district_level_1 |
String | No |
A civil entity within the address's country. In the US, this is the state. |
payment.shipping_address.sublocality_3 |
String | No |
A civil region within the address's |
payment.shipping_address.country |
String | No |
The address's country, in ISO 3166-1-alpha-2 format. |
payment.version_token |
String | No |
Used for optimistic concurrency. This opaque token identifies a specific version of the
|
payment.cash_details |
Object | No |
Stores details about a cash payment. Contains only non-confidential information. For more information, see Take Cash Payments. |
payment.cash_details.change_back_money |
Object | No |
Represents an amount of money. |
payment.cash_details.change_back_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.cash_details.change_back_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.cash_details.buyer_supplied_money |
Object | Yes |
Represents an amount of money. |
payment.cash_details.buyer_supplied_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.cash_details.buyer_supplied_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.receipt_number |
String | No |
The payment's receipt number. The field is missing if a payment is canceled. |
payment.receipt_url |
String | No |
The URL for the payment's receipt. The field is only populated for COMPLETED payments. |
payment.source_type |
String | No |
The source type for this payment. Current values include |
payment.status |
String | No |
Indicates whether the payment is APPROVED, PENDING, COMPLETED, CANCELED, or FAILED. |
payment.refund_ids[] |
Array | No |
A list of |
payment.refunded_money |
Object | No |
Represents an amount of money. |
payment.refunded_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.refunded_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.customer_id |
String | No |
The Customer ID of the customer associated with the payment. |
payment.delay_action |
String | No |
The action to be applied to the payment when the Current values include |
payment.location_id |
String | No |
The ID of the location associated with the payment. |
payment.risk_evaluation |
Object | No |
Represents fraud risk information for the associated payment. When you take a payment through Square's Payments API (using the |
payment.risk_evaluation.created_at |
String | No |
The timestamp when payment risk was evaluated, in RFC 3339 format. |
payment.risk_evaluation.risk_level |
String | No |
The risk level associated with the payment |
payment.app_fee_money |
Object | No |
Represents an amount of money. |
payment.app_fee_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.app_fee_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.order_id |
String | No |
The ID of the order associated with the payment. |
payment.tip_money |
Object | No |
Represents an amount of money. |
payment.tip_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.tip_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.employee_id |
String | No |
An optional ID of the employee associated with taking the payment. |
payment.card_details |
Object | No |
Reflects the current status of a card payment. Contains only non-confidential information. |
payment.card_details.auth_result_code |
String | No |
The status code returned by the card issuer that describes the payment's authorization status. |
payment.card_details.verification_results |
String | No |
For EMV payments, the results of the cardholder verification. The result can be
|
payment.card_details.application_name |
String | No |
For EMV payments, the human-readable name of the EMV application used for the payment. |
payment.card_details.verification_method |
String | No |
For EMV payments, the method used to verify the cardholder's identity. The method can be
|
payment.card_details.status |
String | No |
The card payment's current state. The state can be AUTHORIZED, CAPTURED, VOIDED, or FAILED. |
payment.card_details.avs_status |
String | No |
The status code returned from the Address Verification System (AVS) check. The code can be
|
payment.card_details.card |
Object | No |
Represents the payment details of a card to be used for payments. These details are determined by the payment token generated by Web Payments SDK. |
payment.card_details.card.exp_year |
Integer | No |
The four-digit year of the card's expiration date. |
payment.card_details.card.cardholder_name |
String | No |
The name of the cardholder. |
payment.card_details.card.exp_month |
Integer | No |
The expiration month of the associated card as an integer between 1 and 12. |
payment.card_details.card.fingerprint |
String | No |
Not currently set. Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application. |
payment.card_details.card.card_brand |
String | No |
The card's brand. |
payment.card_details.card.prepaid_type |
String | No |
Indicates whether the Card is prepaid or not. The Card object includes this field only in response to Payments API calls. |
payment.card_details.card.reference_id |
String | No |
An optional user-defined reference ID that associates this card with another entity in an external system. For example, a customer ID from an external customer management system. |
payment.card_details.card.id |
String | No |
Unique ID for this card. Generated by Square. |
payment.card_details.card.customer_id |
String | No |
The ID of a customer created using the Customers API to be associated with the card. |
payment.card_details.card.last_4 |
String | No |
The last 4 digits of the card number. |
payment.card_details.card.version |
Integer | No |
Current version number of the card. Increments with each card update. Requests to update an existing Card object will be rejected unless the version in the request matches the current version for the Card. |
payment.card_details.card.enabled |
Boolean | No |
Indicates whether or not a card can be used for payments. |
payment.card_details.card.card_type |
String | No |
The type of the card. The Card object includes this field only in response to Payments API calls. |
payment.card_details.card.bin |
String | No |
The first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API returns this field. |
payment.card_details.card.billing_address |
Object | No |
Represents a postal address in a country. The address format is based
on an open-source library from Google. For more information,
see AddressValidationMetadata.
This format has dedicated fields for four address components: postal code,
locality (city), administrative district (state, prefecture, or province), and
sublocality (town or village). These components have dedicated fields in the
For the remaining address components, the Note that, in the current implementation, all other When it comes to localization, the seller's language preferences (see Language preferences) are ignored for addresses. Even though Square products (such as Square Point of Sale and the Seller Dashboard) mostly use a seller's language preference in communication, when it comes to addresses, they will use English for a US address, Japanese for an address in Japan, and so on. |
payment.card_details.card.billing_address.address_line_3 |
String | No |
The third line of the address, if any. |
payment.card_details.card.billing_address.first_name |
String | No |
Optional first name when it's representing recipient. |
payment.card_details.card.billing_address.postal_code |
String | No |
The address's postal code. |
payment.card_details.card.billing_address.organization |
String | No |
Optional organization name when it's representing recipient. |
payment.card_details.card.billing_address.address_line_2 |
String | No |
The second line of the address, if any. |
payment.card_details.card.billing_address.address_line_1 |
String | No |
The first line of the address. Fields that start with |
payment.card_details.card.billing_address.administrative_district_level_3 |
String | No |
A civil entity within the address's |
payment.card_details.card.billing_address.sublocality_2 |
String | No |
A civil region within the address's |
payment.card_details.card.billing_address.administrative_district_level_2 |
String | No |
A civil entity within the address's |
payment.card_details.card.billing_address.locality |
String | No |
The city or town of the address. |
payment.card_details.card.billing_address.sublocality |
String | No |
A civil region within the address's |
payment.card_details.card.billing_address.last_name |
String | No |
Optional last name when it's representing recipient. |
payment.card_details.card.billing_address.administrative_district_level_1 |
String | No |
A civil entity within the address's country. In the US, this is the state. |
payment.card_details.card.billing_address.sublocality_3 |
String | No |
A civil region within the address's |
payment.card_details.card.billing_address.country |
String | No |
The address's country, in ISO 3166-1-alpha-2 format. |
payment.card_details.application_identifier |
String | No |
For EMV payments, the application ID identifies the EMV application used for the payment. |
payment.card_details.refund_requires_card_presence |
Boolean | No |
Whether the card must be physically present for the payment to
be refunded. If set to |
payment.card_details.card_payment_timeline |
Object | No |
The timeline for card payments. |
payment.card_details.card_payment_timeline.captured_at |
String | No |
The timestamp when the payment was captured, in RFC 3339 format. |
payment.card_details.card_payment_timeline.authorized_at |
String | No |
The timestamp when the payment was authorized, in RFC 3339 format. |
payment.card_details.card_payment_timeline.voided_at |
String | No |
The timestamp when the payment was voided, in RFC 3339 format. |
payment.card_details.statement_description |
String | No |
The statement description sent to the card networks. Note: The actual statement description varies and is likely to be truncated and appended with additional information on a per issuer basis. |
payment.card_details.errors[] |
Array | No |
Information about errors encountered during the request. |
payment.card_details.errors[].category |
String | Yes |
The high-level category for the error. |
payment.card_details.errors[].field |
String | No |
The name of the field provided in the original request (if any) that the error pertains to. |
payment.card_details.errors[].code |
String | Yes |
The specific code of the error. |
payment.card_details.errors[].detail |
String | No |
A human-readable description of the error for debugging purposes. |
payment.card_details.cvv_status |
String | No |
The status code returned from the Card Verification Value (CVV) check. The code can be
|
payment.card_details.application_cryptogram |
String | No |
For EMV payments, the cryptogram generated for the payment. |
payment.card_details.entry_method |
String | No |
The method used to enter the card's details for the payment. The method can be
|
payment.card_details.device_details |
Object | No |
Details about the device that took the payment. |
payment.card_details.device_details.device_installation_id |
String | No |
The Square-issued installation ID for the device. |
payment.card_details.device_details.device_id |
String | No |
The Square-issued ID of the device. |
payment.card_details.device_details.device_name |
String | No |
The name of the device set by the seller. |
payment.created_at |
String | No |
The timestamp of when the payment was created, in RFC 3339 format. |
payment.processing_fee[] |
Array | No |
The processing fees and fee adjustments assessed by Square for this payment. |
payment.processing_fee[].type |
String | No |
The type of fee assessed or adjusted. The fee type can be |
payment.processing_fee[].effective_at |
String | No |
The timestamp of when the fee takes effect, in RFC 3339 format. |
payment.processing_fee[].amount_money |
Object | No |
Represents an amount of money. |
payment.processing_fee[].amount_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.processing_fee[].amount_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.amount_money |
Object | No |
Represents an amount of money. |
payment.amount_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
payment.amount_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
payment.capabilities[] |
Array | No |
Actions that can be performed on this payment:
|
payment.statement_description_identifier |
String | No |
Additional payment information that gets added to the customer's card statement as part of the statement description. Note that the |
payment.wallet_details |
Object | No |
Additional details about |
payment.wallet_details.status |
String | No |
The status of the |
idempotency_key |
String | Yes |
A unique string that identifies this The maximum is 45 characters. For more information, see Idempotency. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.