{ "openapi": "3.0.0", "info": { "contact": { "name": "Niubiz", "url": "http://www.niubiz.com.pe" }, "description": "Api encargada de la operatividad via comercio electronico", "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "termsOfService": "http://www.niubiz.com.pe", "title": "API Create transaction Yape", "version": "v2", "x-jentic-source-url": "https://api.swaggerhub.com/apis/VisaNetPeru/api-yape/v2/swagger.json" }, "servers": [ { "url": "https://apitestenv.vnforapps.com/api.ecommerce/v2" } ], "paths": { "/token/transaction/yape": { "post": { "responses": { "200": { "content": { "application/json; charset=utf-8": { "schema": { "$ref": "#/components/schemas/TransactionToken" } } }, "description": "successful operation" }, "401": { "description": "Unauthorized" }, "500": { "description": "Request is not valid" } }, "security": [ { "accessToken": [] } ], "tags": [ "Create Transaction Yape" ], "description": "RESTful API to create transaction token yape", "operationId": "createTransactionTokenYape", "requestBody": { "content": { "application/json; charset=utf-8": { "schema": { "$ref": "#/components/schemas/TransactionTokenRequest" } } }, "description": "Transaction token request", "required": true }, "summary": "Create Transaction Token Yape" } } }, "components": { "schemas": { "BillingAddress": { "description": "Datos de facturación", "properties": { "city": { "example": "Lima", "type": "string" }, "country": { "example": "Peru", "type": "string" } }, "type": "object" }, "Card": { "description": "Informacion de la tarejta", "properties": { "cardNumber": { "description": "Numero de tarjeta encriptado con publicKey", "example": "g12Iwe/SPrZ7y1Eer9JI+iXmEDv1grOCjonZ4zMs64xbnpWqveosnTDnuNk82azKto47DW1jDx5Ipa4ddw0Eebz6aRaDMeq+cxDReXJ5Z9nAiq6+ruAg5xnzAuLAmmV5OxZOg0hIXitTxkB3yFSH2cTdXLtVu79s4MIAW2F/DdwhW+fEpbjTf0WnOPG7hnBcMaJnEvz3fIB5GW9gHi2FTR6ghWY5lmm+q94h0ZXyPQ5CAvLsijE24J+KehkH9HW88GxzE/YedT6Vi8Bxtc28YtH3fH4BisZsZJZLgjd3ypDn32KGEbszv0y0nm+Z5AfQ5z4W+r7MgxugO7zI9Rf10w==", "type": "string" }, "cvv2": { "description": "CVV2", "example": "329", "type": "string" }, "encrypted": { "description": "Flag que indica si la tarjeta esta encryptada", "type": "boolean" }, "expirationMonth": { "description": "Mes de expiracion", "example": 12, "format": "int32", "type": "integer" }, "expirationYear": { "description": "Expiration year", "example": 2029, "format": "int32", "type": "integer" }, "tokenId": { "description": "Identificador de tarjeta tokenizada, opcional y reemplaza los datos de la tarjeta", "example": "7000100000002553", "type": "string" } }, "type": "object" }, "CardHolder": { "description": "Informacion del tarjethabiente", "properties": { "city": { "description": "Ciudad", "example": "Lima", "type": "string" }, "country": { "description": "País", "example": "Peru", "type": "string" }, "documentNumber": { "description": "Numero de documento", "example": "E065199", "type": "string" }, "documentType": { "description": "Tipo de documento", "enum": [ "DNI", "CE", "PAS" ], "example": "DNI", "type": "string" }, "email": { "description": "Correo electronico", "example": "info@quiputech.com", "type": "string" }, "firstName": { "description": "Nombre", "example": "Pedro", "type": "string" }, "lastName": { "description": "Apellido", "example": "Galdamez", "type": "string" }, "phoneNumber": { "description": "Telefono", "example": "+51 1 2223333", "type": "string" } }, "type": "object" }, "Order": { "description": "Datos de la orden", "properties": { "billingAddress": { "$ref": "#/components/schemas/BillingAddress" } }, "type": "object" }, "TransactionToken": { "description": "Respuesta de creacion de token para autorizacion", "properties": { "expiration": { "description": "Fecha de expiracion del token de transaccion", "format": "int64", "type": "integer" }, "mpi": { "description": "Flag si pasó por MPI", "type": "boolean" }, "redirectToVbV": { "description": "Flag si pasó por VbV", "type": "boolean" }, "tokenId": { "description": "Identificador unico de la transaccion", "type": "string" } }, "required": [ "expiration", "tokenId" ], "type": "object" }, "TransactionTokenRequest": { "description": "Request de creacion de token para autorizacion", "properties": { "card": { "$ref": "#/components/schemas/Card" }, "channel": { "description": "Canal desde donde se origino la transaccion", "enum": [ "yape" ], "example": "yape", "type": "string" }, "customer": { "$ref": "#/components/schemas/CardHolder" }, "merchantId": { "description": "Identificador unico del comercio", "type": "string" }, "order": { "$ref": "#/components/schemas/Order" }, "userBlockId": { "type": "string" } }, "required": [ "card", "channel", "merchantId", "order" ], "type": "object" } }, "securitySchemes": { "accessToken": { "description": "Access token obtained from api.security", "in": "header", "name": "Authorization", "type": "apiKey" } } }, "tags": [ { "name": "Create Transaction Yape" } ] }