Skip to content

Commit

Permalink
feat: PPABV-59 add new api for ecommerce helpdesk (#2610)
Browse files Browse the repository at this point in the history
feat: add new api for ecommerce helpdesk
  • Loading branch information
infantesimone authored Nov 27, 2024
1 parent 62d40ea commit a83c765
Showing 1 changed file with 214 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,70 @@
}
}
}
},
"/ecommerce/searchNpgOperations": {
"post": {
"tags": [
"eCommerce"
],
"summary": "Search npg operations by TransactionId",
"description": "GET with body payload - no resources created",
"requestBody": {
"$ref": "#/components/requestBodies/SearchNpgOperationsRequest"
},
"responses": {
"200": {
"description": "Transaction status found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SearchNpgOperationsResponse"
}
}
}
},
"400": {
"description": "Formally invalid input",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
},
"404": {
"description": "Transaction not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
},
"422": {
"description": "Unsupported version",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
}
}
}
}
},
"components": {
Expand Down Expand Up @@ -1553,6 +1617,145 @@
"username",
"status"
]
},
"SearchNpgOperationsRequest": {
"type": "object",
"description": "",
"properties": {
"idTransaction": {
"description": "Uniquely identify a transaction",
"type": "string",
"minLength": 32,
"maxLength": 32,
"example": "3fa85f6457174562b3fc2c963f66afa6"
}
},
"required": [
"idTransaction"
]
},
"SearchNpgOperationsResponse": {
"type": "object",
"description": "",
"properties": {
"operations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Operation"
}
}
}
},
"Operation": {
"type": "object",
"properties": {
"additionalData": {
"type": "object",
"properties": {
"authorizationCode": {
"type": "string",
"description": "A string representing the authorization code for the transaction."
},
"rrn": {
"type": "string",
"description": "A string representing the retrieval reference number (RRN) for the transaction."
}
},
"additionalProperties": false,
"description": "Object containing additional fields specific to the chosen payment method",
"example": {
"authorizationCode": "647189",
"rrn": "BWtmt0ykQma3PElZ_k25vg"
}
},
"operationAmount": {
"type": "string",
"description": "Operation amount in the payment currency",
"example": "3545"
},
"operationCurrency": {
"type": "string",
"description": "Payment currency",
"example": "EUR"
},
"operationId": {
"type": "string",
"example": "3470744"
},
"operationResult": {
"$ref": "#/components/schemas/OperationResult"
},
"operationTime": {
"type": "string",
"description": "Operation time in ISO 8601 format",
"example": "2022-09-01T01:20:00.000Z"
},
"operationType": {
"$ref": "#/components/schemas/OperationType"
},
"orderId": {
"maxLength": 27,
"type": "string",
"description": "Merchant order id, unique in the merchant domain",
"example": "btid2384983"
},
"paymentCircuit": {
"$ref": "#/components/schemas/PaymentCircuit"
},
"paymentEndToEndId": {
"maxLength": 35,
"type": "string",
"description": "It is defined by the circuit to uniquely identify the transaction. Required for circuid reconciliation purposes.",
"example": "e723hedsdew"
},
"paymentMethod": {
"$ref": "#/components/schemas/PaymentMethod"
}
}
},
"OperationResult": {
"type": "string",
"description": "Transaction output:\n* AUTHORIZED - Payment authorized\n* EXECUTED - Payment confirmed, verification successfully executed\n* DECLINED - Declined by the Issuer during the authorization phase\n* DENIED_BY_RISK - Negative outcome of the transaction risk analysis\n* THREEDS_VALIDATED - 3DS authentication OK or 3DS skipped (non-secure payment) \n* THREEDS_FAILED - cancellation or authentication failure during 3DS\n* PENDING - Payment ongoing. Follow up notifications are expected\n* CANCELED - Canceled by the cardholder\n* VOIDED - Online reversal of the full authorized amount\n* REFUNDED - Full or partial amount refunded\n* FAILED - Payment failed due to technical reasons\n",
"example": "AUTHORIZED",
"enum": [
"AUTHORIZED",
"EXECUTED",
"DECLINED",
"DENIED_BY_RISK",
"THREEDS_VALIDATED",
"THREEDS_FAILED",
"PENDING",
"CANCELED",
"VOIDED",
"REFUNDED",
"FAILED"
]
},
"OperationType": {
"type": "string",
"description": "It indicates the purpose of the request:\n* AUTHORIZATION - any authorization with explicit capture\n* CAPTURE - a captured authorization or an implicit captured payment\n* VOID - reversal of an authorization\n* REFUND - refund of a captured amount\n* CANCEL - the rollback of an capture, refund. \n",
"example": "CAPTURE",
"enum": [
"AUTHORIZATION",
"CAPTURE",
"VOID",
"REFUND",
"CANCEL"
]
},
"PaymentMethod": {
"type": "string",
"description": "* CARD - Any card circuit\n* APM - Alternative payment method\n",
"example": "CARD",
"enum": [
"CARD",
"APM"
]
},
"PaymentCircuit": {
"type": "string",
"description": "one of the payment circuit values returned by the GET payment_methods web service. The list may include (but not limited to) VISA, MC, AMEX, DINERS, GOOGLE_PAY, APPLE_PAY, PAYPAL, BANCONTACT, BANCOMAT_PAY, MYBANK, PIS, AMAZON_PAY, ALIPAY.\"\n",
"example": "VISA"
}
},
"requestBodies": {
Expand Down Expand Up @@ -1825,7 +2028,17 @@
}
}
}
},
"SearchNpgOperationsRequest": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SearchNpgOperationsRequest"
}
}
}
}
}
}
}
}

0 comments on commit a83c765

Please sign in to comment.