Complete Payment with PIN

Complete Card Collection with PIN

This endpoint completes a card collection payment using the card PIN. It requires the payment_ref and auth_token returned by the Initiate Card Collection endpoint.

Request

POST {{base_url}}/api/v1/collection/ledgerblock/card/complete-pin

Authentication

LedgerBlock uses Bearer Token authentication. Include your API key in the Authorization header.

ParameterValueType
Authorization{{api_key}}Bearer Token

Headers

HeaderRequiredDescriptionExample
Content-TypeYesSpecifies that the request body is JSON.application/json
x-merchant-refYesUnique reference identifying the merchant.{{vault:x-merchant-ref}}

Request Body

ParameterRequiredDescriptionExample
payment_refYesUnique LedgerBlock reference for the initiated card payment.DUMMY-PAYMENT-REF-001
auth_tokenYesAuthorization token returned when the card payment was initiated.{{auth_token}}
complete_pay_methodYesAuthentication method used to complete the payment. For this endpoint, use PIN.PIN
valueYesCard PIN used to authenticate the payment.1234

Example Request

{
  "payment_ref": "DUMMY-PAYMENT-REF-001",
  "auth_token": "{{auth_token}}",
  "complete_pay_method": "PIN",
  "value": "1234"
}

Example Response

{
  "status": "success",
  "message": "Card charged successfully",
  "data": {
    "auth_reference": "DUMMY-CARD-AUTH-001",
    "auth_type_required": "",
    "payment_status": "SUCCESSFUL",
    "redirect_url": ""
  }
}

Response Parameters

FieldDescription
statusIndicates whether the request was successful.
messageDescribes the result of the card payment.
data.auth_referenceReference generated for the card authorization.
data.auth_type_requiredIndicates whether another authentication method is required. An empty value means no additional method is indicated in the response.
data.payment_statusCurrent status of the payment. SUCCESSFUL indicates that the card was charged successfully.
data.redirect_urlURL for redirecting the customer, where applicable. It may be empty.

Notes

  • Use the payment_ref and auth_token from the card initiation response.
  • Set complete_pay_method to PIN.
  • Submit the PIN as a string in the value field.
  • A successful response with payment_status: SUCCESSFUL indicates that the card payment completed successfully.

Did this page help you?