Payments
CreatePayment
Creates a payment using the provided source. You can use this endpoint
to charge a card (credit/debit card or
Square gift card) or record a payment that the seller received outside of Square
(cash payment from a buyer or a payment that an external entity
processed on behalf of the seller).
The endpoint creates a Payment object and returns it in the response.
post/v2/payments
Request body
Example request
{
"request_body": {
"amount_money": {
"amount": 200,
"currency": "USD"
},
"app_fee_money": {
"amount": 10,
"currency": "USD"
},
"autocomplete": true,
"customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8",
"idempotency_key": "4935a656-a929-4792-b97c-8848be85c27c",
"location_id": "XK3DBG77NJBFX",
"note": "Brief description",
"reference_id": "123456",
"source_id": "ccof:uIbfJXhXETSP197M3GB"
}
}Response
Success
Example response
{
"payment": {
"amount_money": {
"amount": 200,
"currency": "USD"
},
"app_fee_money": {
"amount": 10,
"currency": "USD"
},
"approved_money": {
"amount": 200,
"currency": "USD"
},
"card_details": {
"auth_result_code": "nsAyY2",
"avs_status": "AVS_ACCEPTED",
"card": {
"bin": "411111",
"card_brand": "VISA",
"card_type": "DEBIT",
"exp_month": 7,
"exp_year": 2026,
"fingerprint": "sq-1-TpmjbNBMFdibiIjpQI5LiRgNUBC7u1689i0TgHjnlyHEWYB7tnn-K4QbW4ttvtaqXw",
"last_4": "1111",
"prepaid_type": "PREPAID"
},
"card_payment_timeline": {
"authorized_at": "2019-07-10T13:23:49.234Z",
"captured_at": "2019-07-10T13:23:49.446Z"
},
"cvv_status": "CVV_ACCEPTED",
"entry_method": "ON_FILE",
"statement_description": "SQ *MY MERCHANT",
"status": "CAPTURED"
},
"created_at": "2019-07-10T13:23:49.154Z",
"customer_id": "RDX9Z4XTIZR7MRZJUXNY9HUK6I",
"id": "GQTFp1ZlXdpoW4o6eGiZhbjosiDFf",
"location_id": "XTI0H92143A39",
"note": "Brief description",
"order_id": "m2Hr8Hk8A3CTyQQ1k4ynExg92tO3",
"receipt_number": "GQTF",
"receipt_url": "https://squareup.com/receipt/preview/GQTFp1ZlXdpoW4o6eGiZhbjosiDFf",
"reference_id": "123456",
"source_type": "CARD",
"status": "COMPLETED",
"total_money": {
"amount": 200,
"currency": "USD"
},
"updated_at": "2019-07-10T13:23:49.446Z",
"version_token": "H8Vnk5Z11SKcueuRti79jGpszSEsSVdhKRrSKCOzILG6o"
}
}