4.1 KiB
4.1 KiB
Create Payment Link Request
Structure
CreatePaymentLinkRequest
Fields
Name | Type | Tags | Description | Getter | Setter |
---|---|---|---|---|---|
idempotencyKey |
?string |
Optional | A unique string that identifies this CreatePaymentLinkRequest request.If you do not provide a unique string (or provide an empty string as the value), the endpoint treats each request as independent. For more information, see Idempotency. Constraints: Maximum Length: 192 |
getIdempotencyKey(): ?string | setIdempotencyKey(?string idempotencyKey): void |
description |
?string |
Optional | A description of the payment link. You provide this optional description that is useful in your application context. It is not used anywhere. Constraints: Maximum Length: 4096 |
getDescription(): ?string | setDescription(?string description): void |
quickPay |
?QuickPay |
Optional | Describes an ad hoc item and price to generate a quick pay checkout link. For more information, see Quick Pay Checkout. |
getQuickPay(): ?QuickPay | setQuickPay(?QuickPay quickPay): void |
order |
?Order |
Optional | Contains all information related to a single order to process with Square, including line items that specify the products to purchase. Order objects alsoinclude information about any associated tenders, refunds, and returns. All Connect V2 Transactions have all been converted to Orders including all associated itemization data. |
getOrder(): ?Order | setOrder(?Order order): void |
checkoutOptions |
?CheckoutOptions |
Optional | - | getCheckoutOptions(): ?CheckoutOptions | setCheckoutOptions(?CheckoutOptions checkoutOptions): void |
prePopulatedData |
?PrePopulatedData |
Optional | Describes buyer data to prepopulate in the payment form. For more information, see Optional Checkout Configurations. |
getPrePopulatedData(): ?PrePopulatedData | setPrePopulatedData(?PrePopulatedData prePopulatedData): void |
paymentNote |
?string |
Optional | A note for the payment. After processing the payment, Square adds this note to the resulting Payment .Constraints: Maximum Length: 500 |
getPaymentNote(): ?string | setPaymentNote(?string paymentNote): void |
Example (as JSON)
{
"idempotency_key": "cd9e25dc-d9f2-4430-aedb-61605070e95f",
"quick_pay": {
"location_id": "A9Y43N9ABXZBP",
"name": "Auto Detailing",
"price_money": {
"amount": 10000,
"currency": "USD"
}
},
"description": "description6",
"order": {
"id": "id6",
"location_id": "location_id0",
"reference_id": "reference_id4",
"source": {
"name": "name4"
},
"customer_id": "customer_id4",
"line_items": [
{
"uid": "uid8",
"name": "name8",
"quantity": "quantity4",
"quantity_unit": {
"measurement_unit": {
"custom_unit": {
"name": "name2",
"abbreviation": "abbreviation4"
},
"area_unit": "IMPERIAL_ACRE",
"length_unit": "IMPERIAL_INCH",
"volume_unit": "METRIC_LITER",
"weight_unit": "IMPERIAL_WEIGHT_OUNCE"
},
"precision": 54,
"catalog_object_id": "catalog_object_id0",
"catalog_version": 12
},
"note": "note4",
"catalog_object_id": "catalog_object_id2"
}
]
},
"checkout_options": {
"allow_tipping": false,
"custom_fields": [
{
"title": "title8"
},
{
"title": "title8"
}
],
"subscription_plan_id": "subscription_plan_id8",
"redirect_url": "redirect_url2",
"merchant_support_email": "merchant_support_email8"
}
}