You are viewing an old version of the API
Complete payment

Completes (captures) a payment

By default, payments are set to complete immediately after they are created. If you set autocomplete to false when creating a payment, you can complete (capture) the payment using this endpoint. For more information, see Delayed Payments.

Required permissions PAYMENTS_WRITE

Path Parameters

Name Description
payment_id
string

Required

Unique ID identifying the payment to be completed.

Response Fields

Name Description
errors
Error [ ]

Information on errors encountered during the request

payment
Payment

The successfully completed Payment.

Examples

You are viewing an old version of the API
POST /v2/payments/{payment_id}/complete
cURL
  • cURL
  • Ruby
  • Python
curl https://connect.squareup.com/v2/payments/{payment_id}/complete \
  -X POST \
  -H 'Square-Version: 2019-11-20' \
  -H 'Authorization: Bearer ACCESS_TOKEN'
Response JSON
{
  "payment": {
    "id": "EdMl5lwmBxd3ZvsvinkAT5LtvaB",
    "created_at": "2019-07-10T13:39:55.317Z",
    "updated_at": "2019-07-10T13:40:05.982Z",
    "amount_money": {
      "amount": 200,
      "currency": "USD"
    },
    "app_fee_money": {
      "amount": 10,
      "currency": "USD"
    },
    "total_money": {
      "amount": 200,
      "currency": "USD"
    },
    "status": "COMPLETED",
    "source_type": "CARD",
    "card_details": {
      "status": "CAPTURED",
      "card": {
        "card_brand": "VISA",
        "last_4": "2796",
        "exp_month": 7,
        "exp_year": 2026,
        "fingerprint": "sq-1-TpmjbNBMFdibiIjpQI5LiRgNUBC7u1689i0TgHjnlyHEWYB7tnn-K4QbW4ttvtaqXw"
      },
      "entry_method": "ON_FILE",
      "cvv_status": "CVV_ACCEPTED",
      "avs_status": "AVS_ACCEPTED",
      "auth_result_code": "MhIjEN"
    },
    "location_id": "XK3DBG77NJBFX",
    "order_id": "iJbzEHMhcwydeLbN3Apg5ZAjGi4F",
    "reference_id": "123456",
    "note": "Brief description",
    "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8"
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?