generate_pin_data
async
¶
generate_pin_data(
generation_key_identifier: KeyArnOrKeyAliasType,
encryption_key_identifier: KeyArnOrKeyAliasType,
generation_attributes: PinGenerationAttributes,
pin_block_format: PinBlockFormatForPinData,
*,
config_overrides: Optional[AsyncPaymentCryptographyDataClientConfig] = None,
pin_data_length: Optional[IntegerRangeBetween4And12] = None,
primary_account_number: Optional[PrimaryAccountNumberType] = None,
encryption_wrapped_key: Optional[WrappedKey] = None,
) -> GeneratePinDataOutput
Generates pin-related data such as PIN, PIN Verification Value (PVV), PIN Block, and PIN Offset during new card issuance or reissuance. For more information, see Generate PIN data in the Amazon Web Services Payment Cryptography User Guide.
PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation generates PIN, PVV, or PIN Offset and then encrypts it using Pin Encryption Key (PEK) to create an EncryptedPinBlock for transmission from Amazon Web Services Payment Cryptography. This operation uses a separate Pin Verification Key (PVK) for VISA PVV generation.
Using ECDH key exchange, you can receive cardholder selectable PINs into Amazon Web Services Payment Cryptography. The ECDH derived key protects the incoming PIN block. You can also use it for reveal PIN, wherein the generated PIN block is protected by the ECDH derived key before transmission from Amazon Web Services Payment Cryptography. For more information on establishing ECDH derived keys, see the Generating keys in the Amazon Web Services Payment Cryptography User Guide.
For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide.
Cross-account use: This operation supports cross-account use when the key has a resource-based policy that grants access. For more information, see Resource-based policies.
Related operations:
Parameters:
-
generation_key_identifier(KeyArnOrKeyAliasType) –The
keyARNof the PEK that Amazon Web Services Payment Cryptography uses for pin data generation. -
encryption_key_identifier(KeyArnOrKeyAliasType) –The
keyARNof the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block. For ECDH, it is thekeyARNof the asymmetric ECC key. -
generation_attributes(PinGenerationAttributes) –The attributes and values to use for PIN, PVV, or PIN Offset generation.
-
pin_data_length(Optional[IntegerRangeBetween4And12], default:None) –The length of PIN under generation.
-
primary_account_number(Optional[PrimaryAccountNumberType], default:None) –The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
-
pin_block_format(PinBlockFormatForPinData) –The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports
ISO_Format_0,ISO_Format_3andISO_Format_4.The
ISO_Format_0PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.The
ISO_Format_3PIN block format is the same asISO_Format_0except that the fill digits are random values from 10 to 15.The
ISO_Format_4PIN block format is the only one supporting AES encryption.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServerException–The request processing has failed because of an unknown error, exception, or failure.
-
ResourceNotFoundException–The request was denied due to an invalid resource error.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The request was denied due to an invalid request error.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_payment_cryptography_data/_services/async_payment_cryptography_data.py
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 | |