Stripe Payment Confirmation and Generate Receipt for Un-paid Invoice API
Stripe Payment Confirmation and Generate Receipt for Un-paid Invoice API EndpointStripe Payment Confirmation and Generate Receipt for Un-paid Invoice
This endpoint validates a successful payment intent ID from the Stripe payment gateway and initiates the creation of a receipt voucher for the requested un-paid invoice. The API returns the receipt ID upon successful completion of the payment log and receipt voucher generation process.
POST
/v1/payment/transaction/stripe/invoice/{invoiceId}/success
Request Content Type
application/json
Response Content Type
application/json
Request Header
-
Authorization: X-API-Key string required
X-API-Key is a string of letters and numbers used to authenticate and control access to the API. It can be generated in the StoRegister management application. -
Authorization: X-Token string required
X-Token represents the user session token. It is a string of characters that uniquely identifies the user's session.
URL Query Parameters:
-
invoiceId unique-identifier required
invoiceId refers to the ID of the unpaid invoice.
Request Body:
-
token string required
token - The payment intent ID received from the Stripe UI integration after a successful card payment.
Response Payload:
-
succeeded boolean
Indicates whether the Stripe payment confirmation and receipt generation process was successful. It is a boolean value wheretrue
denotes success, andfalse
indicates failure. -
status string
Describes the status of the Stripe payment confirmation and receipt generation process. It is a string providing additional information about the status. -
data unique-identifier | null
Upon success, this property contains the unique identifier representing the receipt ID associated with the completed Stripe payment confirmation and receipt generation process for the unpaid invoice. If the operation is not successful, the value isnull
. -
errors array
Holds error information if applicable. It is an array containing error details in case there are issues with the Stripe payment confirmation and receipt generation process.
Request Header
Authorization: X-API-Key --api-key-- Authorization: X-Token --user-session-token--
API Request
{
"token": "pi_XXX"
}
API Response
{
"data": "65353E22-C3A6-4600-9DE4-9813D5ECC6B4",
"succeeded": true,
"status": "SUCCESS",
"errors": null
}
Error Codes
-
INVALID_PARAM_INVOICE_INFO_ID
INVALID_PARAM_INVOICE_INFO_ID refers to invoice ID. -
INVALID_PARAM_STRIPE_TOKEN
INVALID_PARAM_STRIPE_TOKEN refers to invalid response stripe token from Stripe Payment Gateway. -
INVALID_PARAM_PAYMENT_GATEWAY_MASTER_INFO
INVALID_PARAM_PAYMENT_GATEWAY_MASTER_INFO refers to payment gateway master ID OR invalid payment gateway. -
INVALID_PARAM_PAYMENT_GATEWAY_INFO_ID
INVALID_PARAM_PAYMENT_GATEWAY_INFO_ID refers to payment gateway ID OR invalid payment gateway. -
PAYMENT_GATEWAY_DETAILS_FAILED
PAYMENT_GATEWAY_DETAILS_FAILED refers to invalid payment gateway details. -
STRIPE_PAYMENT_FAILED
STRIPE_PAYMENT_FAILED refers to Unable to retrieve payment details from Stripe Payment Gateway. -
INVALID_PARAM_RCEIPT_INPUT
INVALID_PARAM_RCEIPT_INPUT refers to unmatched receipt input object. -
INVALID_INVOICE_DETAILS
INVALID_INVOICE_DETAILS refers to unable to retreive invoice details object. -
INVALID_RENTAL_INFO_DETAILS
INVALID_RENTAL_INFO_DETAILS refers to unmatched rental details object. -
INVALID_PARAM_PAYMENT_METHOD_RESPONSE
INVALID_PARAM_PAYMENT_METHOD_RESPONSE refers to Unable to retreive payment method details from Stripe Payment Gateway. -
INVALID_PARAM_PAYMENT_OBJECT
INVALID_PARAM_PAYMENT_OBJECT refers to unable to retrive lyra payment object. -
PAYMENT_PROCESS_FAILED
PAYMENT_PROCESS_FAILED refers to payment process failed. -
RECEIPT_CREATION_FAILIED
RECEIPT_CREATION_FAILIED refers to receipt creation failed in Tenant Transaction process. -
NO_RECORDS_FOUND
NO_RECORDS_FOUND means there is no relevant information found. -
FAILED
FAILED refers to an unsuccessful API call. -
SOMETHING_WENT_WRONG
SOMETHING_WENT_WRONG refers to technical glitch. Please contact administrator.