PayPal

Authorize or Capture a payment for a PayPal Order.

Changed on
post/paypal/orders/{orderId}/payments

Request

  • Base URL
    https://sandbox.comcarde.com/v1
  • URL
    https://sandbox.comcarde.com/v1/paypal/orders/{orderId}/payments
  • Auth
    HTTP bearer

Path parameters

orderIdstring required

The unique identifier for the Order.

This can be sourced from the orderId field in the response we sent to you when creating the Order.

Request body

intent'authorize' | 'capture'

By default payments are captured immediately, but you can you can choose to split the authorization and the capture of the payment.

  • authorize - if you intend to capture separately using POST /payments/{paymentId}/capture
  • capture - If you intend to capture immediately

Response

OK

codestring

Response Code signifying the outcome of the request.

messagestring

A description of the outcome of the request.

idstring

The ID of this request. If you can include these when querying the outcome of individual requests, we can track down the root cause faster.

paymentIdstring

The ID of this payment.

orderIdstring

The ID of the order.

statusstring

The status of the order.

amountinteger

Amount in a currency to be used for the transaction. In the lowest denomination of the currency of the payment. This means that 1234 in GBP represents £12.34.

Example response

{
  "code": "1000",
  "id": "463ac35c9f6413ad48485a3953bb6124",
  "paymentId": "57f7f444-29ce-4230-8c7f-1c1fd85c8bc9",
  "orderId": "987654321",
  "status": "CAPTURED",
  "amount": 1234,
  "psp": {
    "name": "Checkout.com",
    "transactionId": "6418da68-0b3d-4409-ab14-1ceb752b0b1f",
    "switchAccountId": "switch-account-123",
    "provisionedUserId": "Vx0H4pdAtPCz",
    "additionalInfo": {
      "customerFirstName": "John",
      "customerLastName": "Smith",
      "customerDateOfBirth": "2000-01-01",
      "customerIpAddress": "123.100.100.200",
      "customerId": "de5d7b4a-9410-40e1-85fd-8ceee23c9fd0",
      "paysafecardCustomerId": "151743187547"
    },
    "rawPspResponses": [
      {
        "httpStatusCode": 200,
        "pspName": "Checkout.com",
        "headers": {
          "content-type": [
            "application/json"
          ]
        }
      }
    ]
  },
  "account": {
    "accountId": "customer@email.com"
  }
}

Changes

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      the /////// response's property format changed from ipv4 to no format for status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added subschema #2 to the response body allOf list for the response status

    • info

      added subschema #2 to the response body allOf list for the response status

    • info

      added the optional property ////////// to the response with the status

    • info

      the response property /////// became required for the status

    • info

      the response property /////// became required for the status

    • info

      the response property /////// became required for the status

    • info

      the response property /////// became required for the status

    • info

      the response property /////// became required for the status

    • info

      the /////// response's property pattern was changed from ^$|^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$ to ^$|^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|::(ffff(:0{1,4})?:)?((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))$ for the status