You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何修改Square Connect API及iOS POS收据中的Custom Amount文本?

How to Replace "Custom Amount" on Square POS Receipts (iOS)

Hey there! I’ve worked with Square’s Point of Sale API for iOS before, so let’s get that receipt text changed for you.

The "Custom Amount" text you’re seeing is the default label for custom amount transactions. To replace it with your own text, you just need to use a specific property when building your SCCAPIRequest object:

Step-by-Step Fix

When initializing your transaction request, add the customAmountDescription parameter and set it to your desired text. This will directly replace the default "Custom Amount" on the receipt.

Here’s a Swift example to show you how it works:

import SquarePointOfSaleSDK

// Build your custom amount request
let posRequest = SCCAPIRequest(
    locationID: "YOUR_LOCATION_ID", // Replace with your actual location ID
    callbackURL: URL(string: "your-app-scheme://square-pos-callback")!, // Your app's callback scheme
    amount: 1500, // Amount in cents (e.g., $15.00)
    currencyCode: "USD",
    transactionNotes: "Your existing transaction note here", // Your existing note works as before
    customerID: nil,
    supportedTenderTypes: .all,
    customAmountDescription: "Your Custom Label", // This replaces "Custom Amount"
    skipReceipt: false
)

// Send the request to Square POS
SCCAPIConnection.perform(posRequest) { result in
    // Handle the result here
}

And if you’re using Objective-C, here’s the equivalent:

#import <SquarePointOfSaleSDK/SquarePointOfSaleSDK.h>

SCCAPIRequest *request = [[SCCAPIRequest alloc] initWithLocationID:@"YOUR_LOCATION_ID"
                                                       callbackURL:[NSURL URLWithString:@"your-app-scheme://square-pos-callback"]
                                                             amount:@1500
                                                      currencyCode:@"USD"
                                                  transactionNotes:@"Your existing transaction note here"
                                                        customerID:nil
                                             supportedTenderTypes:SCCAPIRequestTenderTypeAll
                                      customAmountDescription:@"Your Custom Label"
                                                     skipReceipt:NO];

[SCCAPIConnection performRequest:request completionHandler:^(SCCAPIResponse * _Nullable response, NSError * _Nullable error) {
    // Handle response/error
}];

Key Notes

  • Make sure you’re using the latest version of the Square Point of Sale SDK for iOS to ensure this property is available.
  • The customAmountDescription targets specifically that label on the receipt—your existing transactionNotes will still appear in the receipt’s notes section as it did before.

That should do it! After adding this parameter, your receipt will show your custom text instead of "Custom Amount".

内容的提问来源于stack exchange,提问作者venkat

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 09:00:20