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.
| Parameter | Value | Type |
|---|---|---|
| Authorization | {{api_key}} | Bearer Token |
Headers
| Header | Required | Description | Example |
|---|---|---|---|
Content-Type | Yes | Specifies that the request body is JSON. | application/json |
x-merchant-ref | Yes | Unique reference identifying the merchant. | {{vault:x-merchant-ref}} |
Request Body
| Parameter | Required | Description | Example |
|---|---|---|---|
payment_ref | Yes | Unique LedgerBlock reference for the initiated card payment. | DUMMY-PAYMENT-REF-001 |
auth_token | Yes | Authorization token returned when the card payment was initiated. | {{auth_token}} |
complete_pay_method | Yes | Authentication method used to complete the payment. For this endpoint, use PIN. | PIN |
value | Yes | Card 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
| Field | Description |
|---|---|
status | Indicates whether the request was successful. |
message | Describes the result of the card payment. |
data.auth_reference | Reference generated for the card authorization. |
data.auth_type_required | Indicates whether another authentication method is required. An empty value means no additional method is indicated in the response. |
data.payment_status | Current status of the payment. SUCCESSFUL indicates that the card was charged successfully. |
data.redirect_url | URL for redirecting the customer, where applicable. It may be empty. |
Notes
- Use the
payment_refandauth_tokenfrom the card initiation response. - Set
complete_pay_methodtoPIN. - Submit the PIN as a string in the
valuefield. - A successful response with
payment_status: SUCCESSFULindicates that the card payment completed successfully.
Updated about 1 month ago
Did this page help you?
