Skip to content
Payment Requests

Confirm Pre Auth Payment Request

POST/api/payment-requests/{paymentRequestId}/confirm

This endpoint allows you to make a confirmation against a Pre Auth Payment Request.

An idempotencyKey is a identifier from your system used for guaranteeing at least once delivery of your request. If our endpoint does not respond, you must retry until you get back a 200 or 403. If we recive 2 requests with the same idempotencyKey, we won't process the second and return the first response.

Path parameters

  • paymentRequestIdrequired string
    The Payment Request id.

Request body

  • idempotencyKeyrequired string
    This is an identifier from your system to enforce uniqueness.
  • invoiceRefrequired string
    A reference to an invoice for this Payment Request. Must be less than or equal to 128 characters.
  • lineItemsrequired array of objects
    The Line Items being confirmed.
    • classificationoptional object
      Product Classification.
      • codeoptional string
        The classification code.
      • nameoptional string
        The classification title.
      • propsoptional object
        The product classification properties. Classification properties allow optional additional product characterizing attrubutes to be supplied. In the case of GS1 product classifications this corresponds to the GPC brick attributes.
      • typeoptional enum
        The classification type. See GS1 Global Product Classification. When GS1 is used as the product classification type then the product code should be the GPC product brick identifier.
    • discountoptional bignumber
      Discount amount in cents (tax exclusive). A discount that applies to multiple Line Items may be represented as a separate Line Item with a negative amount.
    • metadataoptional object
      A set of up to 20 key-value string pairs for storing additional structured information about the line item. Keys may be up to 40 characters; values up to 500 characters.
    • namerequired string
      The product description.
    • pricerequired bignumber
      The total price in cents for the line item (eg. price = product price * qty - discounts + tax). Either price or unitPrice is required; if both are supplied, price takes priority.
    • productIdoptional string
      Manufacturer's product identifier (eg GTIN/EAN).
    • qtyrequired bignumber
      The product quantity (eg. item count, weight, volume etc).
    • restrictedoptional boolean
      Disallow payment with a “restricted” Asset Type.
    • skuoptional string
      The product (stock keeping unit) code. Required for Token redemptions.
    • taxoptional bignumber
      Tax rate (percentage).
    • unitMeasureoptional string
      A free-text label describing the unit of qty (eg. kg, L, seat). Display only, maximum 20 characters.
    • unitPriceoptional string
      The price of a single unit of qty, in cents. Used to compute price when price is not supplied.
  • valueoptional monetary
    The canonical value of the confirmation. Must be less than 100000000 and positive.

Responses

Request
curl -X POST https://service.centrapay.com/api/payment-requests/MhocUmpxxmgdHjr7DgKoKw/confirm \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '{
"idempotencyKey": "e8df06e2-13a5-48b4-b670-3fd6d815fe0a",
"invoiceRef": "2022-08-03T16:56:50-06:00",
"lineItems": [
{
"name": "Coffee Grounds",
"price": "4195",
"qty": "1",
"sku": "GH1234",
"tax": "15.00"
},
{
"classification": {
"code": "10001874",
"name": "CROCKERY",
"props": {
"20001479": "30008960"
},
"type": "GS1"
},
"discount": "199",
"name": "Centrapay Cafe Mug",
"price": "1995",
"productId": "19412345123459",
"qty": "25",
"restricted": true,
"sku": "SB456",
"tax": "15.00"
}
],
"value": {
"amount": "6190",
"currency": "NZD"
}
}'