POST
/
payments
/
{id}
/
capture
curl --request POST \
--url https://api.sandbox.primer.io/payments/{id}/capture \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"amount": 42
}'
{
  "id": "kHdEw9EG",
  "date": "2021-02-21T15:36:16.367687",
  "dateUpdated": "2021-02-21T15:36:17.133701",
  "status": "SETTLED",
  "orderId": "order-abc",
  "customerId": "customer-123",
  "currencyCode": "EUR",
  "amount": 42,
  "cardTokenType": "CARD_PAN",
  "paymentMethod": {
    "paymentType": "SUBSCRIPTION",
    "paymentMethodToken": "heNwnqaeRiqvY1UcslfQc3wxNjEzOTIxNjc4",
    "isVaulted": true,
    "authorizationType": "FINAL",
    "descriptor": "Purchase: Socks",
    "analyticsId": "VtkMDAxZW5isH0HsbbNxZ3lo",
    "paymentMethodType": "PAYMENT_CARD",
    "paymentMethodData": {
      "first6Digits": "411111",
      "last4Digits": "1111",
      "expirationMonth": "12",
      "expirationYear": "2030",
      "cardholderName": "John Biggins",
      "network": "Visa",
      "isNetworkTokenized": false,
      "binData": {
        "network": "VISA",
        "regionalRestriction": "UNKNOWN",
        "accountNumberType": "UNKNOWN",
        "accountFundingType": "UNKNOWN",
        "prepaidReloadableIndicator": "NOT_APPLICABLE",
        "productUsageType": "UNKNOWN",
        "productCode": "VISA",
        "productName": "VISA"
      }
    }
  },
  "processor": {
    "name": "STRIPE",
    "processorMerchantId": "acct_stripe_1234",
    "amountCaptured": 42,
    "amountRefunded": 0
  },
  "transactions": [
    {
      "type": "SALE",
      "processorStatus": "SETTLED",
      "processorName": "STRIPE",
      "processorMerchantId": "acct_stripe_1234",
      "processorTransactionId": "54c4eb5b3ef8a",
      "cardTokenType": "CARD_PAN"
    }
  ],
  "customer": {
    "email": "customer123@gmail.com"
  },
  "metadata": {
    "productId": 123,
    "merchantId": "a13bsd62s"
  },
  "riskData": {
    "fraudChecks": {
      "source": "FRAUD_PROVIDER",
      "preAuthorizationResult": "THREE_DS",
      "postAuthorizationResult": "ACCEPT"
    },
    "cvvCheck": {
      "source": "PROCESSOR",
      "result": "MATCHED"
    },
    "avsCheck": {
      "source": "PROCESSOR",
      "result": {
        "streetAddress": "NOT_MATCHED",
        "postalCode": "NOT_VERIFIED"
      }
    }
  }
}

Authorizations

X-API-KEY
string
header
required

Headers

X-Idempotency-Key
string

Optional key to make the request idempotent. Enables a safe retry of a request without risking the user being charged or refunded multiple times. The idempotency key must be generated by the client and needs to be unique for every new request.

Path Parameters

id
string
required

ID of the payment to capture.

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.