Skip to main content

Parspal Approve Payment API

POST /parspalApprovePayment

Description

This API endpoint allows users to approve a payment through Parspal by providing the payment ID and receipt number. The endpoint finalizes the payment process and validates the transaction.

Request Body

The request utilizes GraphQL to perform the parspalApprovePayment mutation.

Mutation:

mutation parspalApprovePayment ($payment_id: String, $receipt_number: String) {
parspalApprovePayment (payment_id: $payment_id, receipt_number: $receipt_number)
}

Variables:

{
"payment_id": "<Payment_ID>",
"receipt_number": "<Receipt_Number>"
}
  • payment_id (String): The unique ID of the payment transaction generated during the payment creation process.
  • receipt_number (String): The receipt number provided upon payment completion.

Response:

  • Success (200 OK):

    • If the payment approval is successful, the response will not return additional data, indicating that the transaction has been approved and processed.
  • Error (4XX/5XX):

    • If there is an issue with the payment approval, the response will include an appropriate error message and status code.

Note:

Ensure that both the payment_id and receipt_number correspond to a valid Parspal transaction. This API should be used to finalize and approve payments processed through Parspal within the platform.