Tokenización de redes externas
Acepte pagos con tarjeta de forma segura mediante tokens de red proporcionados por solicitantes de tokens externos en nombre de terceros.
Puedes usar Rapyd para aceptar pagos con tarjeta con un token de red de terceros. Fichas son cadenas alfanuméricas que se pueden usar en lugar de un PAN (número de cuenta principal) para las transacciones con tarjeta. Tokens de red son un tipo específico de token de tarjeta emitido por un red de tarjetas como Visa o Mastercard.
Un tercero que solicite el token en nombre de un tercero puede solicitar a Visa o Mastercard que emita un token de red. El solicitante de un token está integrado con los servicios de token de Visa y Mastercard. Los comerciantes que trabajan con el solicitante del token utilizan los tokens de red
Los tokens de red se utilizan para hacer que las transacciones con tarjeta sean más seguras. El PAN (número de cuenta principal) de una tarjeta de crédito es un número de 16 a 19 dígitos que se utiliza para identificar la tarjeta. El token de red actúa como marcador de posición para proteger la información confidencial durante las transacciones. Un token de red está vinculado a una tarjeta, un comerciante y un proveedor de tokens específicos, lo que proporciona una mayor seguridad. Por ejemplo, se emitirán dos tokens de red diferentes para una tarjeta que haya sido tokenizada por dos comerciantes diferentes
Los tokens de red tienen dos elementos: la cadena de token y el tavv (valor de verificación de autenticación del token). El tavv es un criptograma generado por la red de tarjetas y actúa como una medida de seguridad adicional. El comerciante obtiene nuevos criptogramas tavv del proveedor del token (un tercero que solicita el token)
Puedes usar la API Rapyd Collect para iniciar un pago con tarjeta mediante un token de red de terceros. La tokenización de la red proporciona una forma más segura de procesar los pagos con tarjeta y ayuda a prevenir
Usted es un socio o integrador que trabaja con varios adquirentes. Está buscando servicios de adquisición de tarjetas a través de Rapyd. Contratas a un tercero que solicita el token en nombre de un tercero. Registras a tus comerciantes con el proveedor del token
Envías tus solicitudes de tokenización al proveedor de tokens externo para obtener la información de la tarjeta que tienes archivada. Recibes un token de red a cambio y lo guardas para el pago con tarjeta. Durante el pago, solicitas un criptograma tavv al solicitante del token. A continuación, puede enviar el pago con tarjeta a cualquier adquirente.

El cliente completa el pago con tarjeta al finalizar la compra en tu sitio web y acepta guardar la información de su tarjeta.
La información de la tarjeta se envía al proveedor externo del token, quien solicita un token para la tarjeta a la red de tarjetas correspondiente.
Solicitas a Rapyd que procese el pago con tarjeta con un token de red y un criptograma de token.
Rapyd procesa el pago y te envía la respuesta y el webhook.
Muestras tu página de éxito de compra al cliente.
Certificación PCI
Solo clientes con PCI-DSS La certificación puede gestionar la información de identificación personal de las tarjetas. Este método está disponible para los comerciantes que hayan firmado un acuerdo especial con Rapyd
Decide los tipos de pago con tarjeta que aceptarás en el país elegido. Listar los métodos de pago por país con los siguientes parámetros:
ES y ISK se utilizan para el país y la moneda en los códigos de muestra que aparecen a continuación. is_visa_card es el tipo de método de pago.
Descripción de los parámetros de consulta
Parámetro de consulta | Descripción |
|---|---|
país | Entrar ES como código de país. |
moneda | Entrar ISK como código de divisa. |
Solicitud de lista de métodos de pago por país
Solicitud
// Request URL: GET https://sandboxapi.rapyd.net/v1/payment_methods/country?country=IS¤cy=ISK // Message body absent
Lista de métodos de pago por país Respuesta
Respuesta
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "c53a2e6b-74f6-42ba-a0a3-21724346a36c" }, "data": [ { "type": "is_iban", "name": "tEST---is_iban", "category": "bank_transfer", "image": "https://iconslib.rapyd.net/checkout/is_iban.png", "country": "IS", "payment_flow_type": "card", "currencies": [ "ISK" ], "status": 1, "is_cancelable": false, "payment_options": [ { "name": "capture", "type": "boolean", "regex": "", "description": "Determines when the payment is processed for capture", "is_required": false, "is_updatable": false }, { "name": "complete_payment_url", "type": "string", "regex": "", "description": "URL where the customer is redirected for final steps in completing the operation.", "is_required": true, "is_updatable": false }, { "name": "error_payment_url", "type": "string", "regex": "", "description": "URL where the customer is redirected in case of an error in the operation.", "is_required": true, "is_updatable": false }, { "name": "statement_descriptor", "type": "string", "regex": "^.{1,13}$", "description": "A text description suitable for a customer's payment statement.", "is_required": false }, { "name": "description", "type": "string", "regex": "^([a-zA-Z]){1,254}$", "description": "Description of the product or service", "is_required": true, "is_updatable": false } ], "is_expirable": true, "is_online": true, "is_refundable": true, "minimum_expiration_seconds": 600, "maximum_expiration_seconds": 604800, "virtual_payment_method_type": null, "is_virtual": false, "multiple_overage_allowed": false, "amount_range_per_currency": [ { "currency": "ISK", "maximum_amount": null, "minimum_amount": null } ], "is_tokenizable": false, "supported_digital_wallet_providers": [], "is_restricted": false, "supports_subscription": false }, { "type": "is_kwp_card", "name": "KWP", "category": "card", "image": "https://iconslib.rapyd.net/checkout/is_kwp_card.png", "country": "is", "payment_flow_type": "", "currencies": [ "ISK" ], "status": 1, "is_cancelable": true, "payment_options": [ { "name": "description", "type": "string", "regex": "", "description": "the description field must be filled in.", "is_required": true, "is_updatable": false }, { "name": "complete_payment_url", "type": "string", "regex": "", "description": "the complete_payment_url field must be filled in.", "is_required": true, "is_updatable": false }, { "name": "error_payment_url", "type": "string", "regex": "", "description": "the error_payment_url field must be filled in.", "is_required": true, "is_updatable": false } ], "is_expirable": false, "is_online": true, "is_refundable": true, "minimum_expiration_seconds": 0, "maximum_expiration_seconds": 0, "virtual_payment_method_type": null, "is_virtual": false, "multiple_overage_allowed": false, "amount_range_per_currency": [ { "currency": "ISK", "maximum_amount": null, "minimum_amount": null } ], "is_tokenizable": false, "supported_digital_wallet_providers": [ "apple_pay" ], "is_restricted": false, "supports_subscription": false }, { "type": "is_mastercard_card", "name": "Mastercard", "category": "card", "image": "https://iconslib.rapyd.net/checkout/is_mastercard_card.png", "country": "is", "payment_flow_type": "", "currencies": [ "ISK" ], "status": 1, "is_cancelable": true, "payment_options": [ { "name": "capture", "type": "boolean", "regex": "", "description": "Determines when the payment is processed for capture.", "is_required": false, "is_updatable": false }, { "name": "complete_payment_url", "type": "string", "regex": "", "description": "the complete_payment_url field must be filled in.", "is_required": true, "is_updatable": false }, { "name": "error_payment_url", "type": "string", "regex": "", "description": "the error_payment_url field must be filled in.", "is_required": true, "is_updatable": false }, { "name": "customer", "type": "string", "regex": "", "description": "ID of a customer object, a string starting with ‘cus_‘. The customer object must contain the fields listed as required, and can contain additional fields listed here.If the customer object does not exist yet, use ‘Create Customer‘", "is_required": false, "is_updatable": false }, { "name": "initiation_type", "type": "string", "regex": "(customer_present|installment|moto|recurring|unscheduled)", "description": "This indicates how the transaction was initiated", "is_required": false, "is_updatable": false } ], "is_expirable": false, "is_online": true, "is_refundable": true, "minimum_expiration_seconds": 0, "maximum_expiration_seconds": 0, "virtual_payment_method_type": null, "is_virtual": false, "multiple_overage_allowed": false, "amount_range_per_currency": [ { "currency": "ISK", "maximum_amount": null, "minimum_amount": null } ], "is_tokenizable": false, "supported_digital_wallet_providers": [ "apple_pay" ], "is_restricted": false, "supports_subscription": false }, { "type": "is_visa_card", "name": "Visa", "category": "card", "image": "https://iconslib.rapyd.nethttps://qaiconslib.rapyd.net/https://qaiconslib.rapyd.net/checkout/is_visa_card.png", "country": "IS", "payment_flow_type": "", "currencies": [ "ISK" ], "status": 1, "is_cancelable": true, "payment_options": [ { "name": "description", "type": "string", "regex": "", "description": "the description field must be filled in.", "is_required": false, "is_updatable": false }, { "name": "capture", "type": "boolean", "regex": "", "description": "Determines when the payment is processed for capture.", "is_required": false, "is_updatable": false }, { "name": "complete_payment_url", "type": "string", "regex": "", "description": "the complete_payment_url field must be filled in.", "is_required": true, "is_updatable": false }, { "name": "error_payment_url", "type": "string", "regex": "", "description": "the error_payment_url field must be filled in.", "is_required": true, "is_updatable": false }, { "name": "customer", "type": "string", "regex": "", "description": "ID of a customer object, a string starting with ‘cus_‘. The customer object must contain the fields listed as required, and can contain additional fields listed here.If the customer object does not exist yet, use ‘Create Customer‘", "is_required": true, "is_updatable": false }, { "name": "ewallet", "type": "string", "regex": "^ewallet_[a-f0-9]{32}$", "conditions": [ { "operator": "$eq", "description": "If the value of the field type is true, ewallet is mandatory field", "element_name": "payment.payment_method_options.aft", "threshold_value": "true" } ], "description": "ID of the wallet that the money is paid into. String starting with ewallet_.", "is_required": false, "is_updatable": false }, { "name": "initiation_type", "type": "string", "regex": "(customer_present|installment|moto|recurring|unscheduled)", "description": "This indicates how the transaction was initiated", "is_required": false, "is_updatable": false } ], "is_expirable": false, "is_online": false, "is_refundable": true, "minimum_expiration_seconds": 0, "maximum_expiration_seconds": 0, "virtual_payment_method_type": null, "is_virtual": false, "multiple_overage_allowed": false, "amount_range_per_currency": [ { "currency": "ISK", "maximum_amount": null, "minimum_amount": null } ], "is_tokenizable": false, "supported_digital_wallet_providers": [ "apple_pay" ], "is_restricted": false, "supports_subscription": false } ] }
Usa el Campos obligatorios para obtener el método de pago con el siguiente parámetro:
El datos La sección de esta respuesta muestra que el tipo de método de pago que utilizará es una tarjeta Valitor.
Descripción de los parámetros de ruta
Parámetro de ruta | Descripción |
|---|---|
tipo | Entrar is_visa_card como tipo de método de pago. |
Obtener el método de pago Campos obligatorios Solicitud
Solicita un conjunto de campos obligatorios para una tarjeta.
Solicitud
// Request URL: GET https://sandboxapi.rapyd.net/v1/payment_methods/required_fields/is_visa_card // Message body absent
Obtener el método de pago Campos obligatorios Respuesta
La siguiente respuesta muestra que, para obtener una tarjeta Valitor, el cliente debe rellenar:
nombrenúmeromes_caducidadaño_caducidadCVV
Respuesta
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "1afab4a9-2c9e-449b-a36b-a6d4231a1bb9" }, "data": { "type": "is_visa_card", "fields": [ { "name": "token", "type": "string", "regex": "", "is_required": false, "instructions": "" }, { "name": "name", "type": "string", "regex": "", "is_required": true, "instructions": "card holder name" }, { "name": "number", "type": "string", "regex": "", "is_required": true, "instructions": "card number" }, { "name": "expiration_month", "type": "string", "regex": "", "is_required": true, "instructions": "expiration month as string, 01-12" }, { "name": "expiration_year", "type": "string", "regex": "", "is_required": true, "instructions": "expiration year in to digits as string, 18-99" }, { "name": "cvv", "type": "string", "regex": "", "is_required": true, "instructions": "card cvv" }, { "name": "merchant_custom_token", "type": "string", "regex": "", "is_required": false, "instructions": "merchant custom token" }, { "name": "recurrence_type", "type": "string", "regex": "(recurring|installment|unscheduled)", "description": "This indicates the purpose of the token. should be aligned with the subsequent payments using the token.", "is_required": false, "is_updatable": false }, { "name": "network_reference_id", "type": "string", "regex": "", "description": "Network Reference Id", "is_required": false }, { "name": "number_type", "type": "string", "regex": "(fpan|tpan)", "description": "Determining if number is funding PAN or token PAN", "is_required": false } ], "payment_method_options": [ { "name": "3d_required", "type": "boolean", "regex": "", "description": "Allows the client to determine whether the customer is required to complete 3DS authentication for the transaction", "is_required": false, "is_updatable": false }, { "name": "is_korta", "type": "boolean", "regex": "", "description": "", "is_required": false, "is_updatable": false }, { "name": "merchant_ref", "type": "string", "regex": "", "description": "", "is_required": false, "is_updatable": false }, { "name": "3d_version", "type": "String", "regex": "(1.0.2|2.1.0|2.2.0)", "description": "3D Secure version of the transaction.", "is_required": false, "is_updatable": false }, { "name": "cavv", "type": "String", "regex": "", "description": "Cardholder Authentication Verification Value represented as a 20-byte value that is base64 encoded.", "is_required": false, "is_updatable": false }, { "name": "eci", "type": "String", "regex": "(01|02|05|06|07|08)", "description": "Electronic Commerce Indicator (ECI) from MPI Plugin(3-D Secure 1.0) or 3DS Server(3-D Secure 2.0).", "is_required": false, "is_updatable": false }, { "name": "xid", "type": "String", "regex": "", "description": "3D Secure XID, Base64 encoded.Required for VISA 1.0", "is_required": false, "is_updatable": false }, { "name": "ds_trans_id", "type": "String", "regex": "", "description": "The Directory Server (DS) Transaction ID. Required Mastercard 2.0.", "is_required": false, "is_updatable": false }, { "name": "special_features", "type": "string", "regex": "^(crypto)$", "description": "Additional information about the payment. Possible values: crypto - The payment involves cryptocurrency. ", "is_required": false }, { "name": "is_valitor", "type": "boolean", "regex": "", "description": "", "is_required": false, "is_updatable": false }, { "name": "tavv", "type": "String", "regex": "", "description": "Token Authentication Verification Value represented as a 20-byte value that is base64 encoded.", "is_required": false, "is_updatable": false } ], "payment_options": [ { "name": "description", "type": "string", "regex": "", "description": "the description field must be filled in.", "is_required": false, "is_updatable": false }, { "name": "capture", "type": "boolean", "regex": "", "description": "Determines when the payment is processed for capture.", "is_required": false, "is_updatable": false }, { "name": "complete_payment_url", "type": "string", "regex": "", "description": "the complete_payment_url field must be filled in.", "is_required": true, "is_updatable": false }, { "name": "error_payment_url", "type": "string", "regex": "", "description": "the error_payment_url field must be filled in.", "is_required": true, "is_updatable": false }, { "name": "is_korta", "type": "boolean", "regex": "", "description": "", "is_required": false, "is_updatable": false }, { "name": "customer", "type": "string", "regex": "", "description": "ID of a customer object, a string starting with cus_. The customer object must contain the fields listed as required, and can contain additional fields listed here.If the customer object does not exist yet, use Create Customer", "is_required": true, "is_updatable": false } ], "minimum_expiration_seconds": 60, "maximum_expiration_seconds": 604800 } }
Ver Crear pago para obtener información más detallada sobre los campos y objetos utilizados en la solicitud.
Descripción de los parámetros corporales
Parámetro corporal | Descripción |
|---|---|
cantidad | Introduce 250 como importe del pago. |
moneda | Entrar USD como código de divisa. |
capturar | Entrar verdadero como el valor. Esto le indica a Rapyd que cobrará el pago de inmediato. Si es «falsa», se retendrá la tarjeta y no se capturarán los fondos hasta que se actualice el estado |
Campos de objetos
Incluya el método_pago objeto y opciones_método_pago objeto en el cuerpo de la solicitud.
Objeto | Campo | Descripción |
|---|---|---|
método_pago | tipo | Entrar is_visa_card como el tipo |
método_pago | nombre | Entrar Prueba de tarjeta Visa como nombre |
método_pago | número | Entrar 5186151969991591 como número de tarjeta |
método_pago | mes_caducidad | Entrar 12 como mes de caducidad |
método_pago | año_caducidad | Entrar 30 como año de caducidad |
método_pago | cvv | Entrar 123 |
método_pago | tipo_número | Indica si el número el campo contiene un identificador de tarjeta o un número de tarjeta normal. Dos valores posibles:
Entrar TPAN como valor cuando se usa un token de red para el pago. |
opciones_método_de_pago | tavv | Entrar AIWQ5CHAxx1UAD09xOMCAAADFA==
|
Crear solicitud de pago
Solicitud
// Request URL: POST https://sandboxapi.rapyd.net/v1/payments // Message body: { "amount": 250, "currency": "USD", "capture": true, "description": "visa demo 3", "initiation_type": "customer_present", "payment_method": { "type": "is_visa_card", "fields": { "name": "Visa Card Test", "number": "5186151969991591", "expiration_month": "12", "expiration_year": "30", "number_type": "TPAN" } }, "payment_method_options": { "cavv": "kBMcQDw42rjEKBDCA/WQw5eBlMGf", "eci": "02", "ds_trans_id": "8a567e19-8580-49bd-a5e5-2d6bc1924602", "tavv": "AIwq5CHaXxluAD09xomcAAADFA==" }, "complete_payment_url": "https://www.rapyd.net", "error_payment_url": "https://www.docs.rapyd.net" }
Crear respuesta de pago
Respuesta
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "a3ff86a3-f045-4806-9e32-8c3c99c2c820" }, "data": { "id": "payment_1d022d3ff321baf483525253072d3943", "amount": 250, "original_amount": 250, "is_partial": false, "currency_code": "USD", "country_code": "IS", "status": "CLO", "description": "visa demo 3", "merchant_reference_id": "", "customer_token": "cus_b3c1bd3012ea414219fd95243c0803b0", "payment_method": "card_fb413caa11dd94e3bcffb0dff24f6290", "payment_method_data": { "id": "card_fb413caa11dd94e3bcffb0dff24f6290", "type": "is_visa_card", "category": "card", "metadata": null, "image": "", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable", "name": "Visa Card Test", "last4": "1591", "acs_check": "unchecked", "cvv_check": "unchecked", "bin_details": { "type": null, "brand": null, "level": null, "issuer": null, "country": null, "bin_number": "518615" }, "number_type": "TPAN", "expiration_year": "30", "expiration_month": "12", "fingerprint_token": "ocfp_180e9479ba47ac71fb88dcf719e88234", "network_reference_id": "ABC8791471120" }, "auth_code": "794487", "expiration": 1701085308, "captured": true, "refunded": false, "refunded_amount": 0, "receipt_email": "", "redirect_url": "", "complete_payment_url": "https://www.rapyd.net", "error_payment_url": "https://www.docs.rapyd.net", "receipt_number": "", "flow_type": "", "address": null, "statement_descriptor": "ARMONICCI", "transaction_id": "", "created_at": 1700480507, "metadata": {}, "failure_code": "", "failure_message": "", "paid": true, "paid_at": 1700480519, "dispute": null, "refunds": null, "order": null, "outcome": null, "visual_codes": {}, "textual_codes": {}, "instructions": {}, "ewallet_id": "ewallet_cada587d3a817b42fca2c6ba63ac1d1b", "ewallets": [ { "ewallet_id": "ewallet_cada587d3a817b42fca2c6ba63ac1d1b", "amount": 250, "percent": 100, "refunded_amount": 0 } ], "payment_method_options": { "eci": "02", "cavv": "kBMcQDw42rjEKBDCA/WQw5eBlMGf", "ds_trans_id": "8a567e19-8580-49bd-a5e5-2d6bc1924602" }, "payment_method_type": "is_visa_card", "payment_method_type_category": "card", "fx_rate": 1, "merchant_requested_currency": null, "merchant_requested_amount": null, "fixed_side": "", "payment_fees": null, "invoice": "", "escrow": null, "group_payment": "", "cancel_reason": null, "initiation_type": "customer_present", "mid": "mid_63e991ad4ba1a1508ffa8df196c0b8e3", "next_action": "not_applicable", "error_code": "", "remitter_information": {}, "save_payment_method": true } }
La respuesta muestra que Rapyd procesó correctamente el pago en función del importe, la moneda y el método de pago.
El pago se ha realizado correctamente ya que estado es CLO (cerrado).
Ahora puedes notificar a tu cliente que la compra se ha completado.