cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify device fingerprint id in Cybersource REST API?

I'm trying to integrate CyberSource's REST API into a Django (Python) application. I'm following this GitHub example /echatrandom example. It works like a charm but it is not clear to me from the example or from the documentation /echatspin how to specify the device's fingerprint ID.

Here's a snippet of the request I'm sending in case it comes useful (note: this is just a method that lives inside a POPO):

def authorize_payment(self, card_token: str, total_amount: Money, customer: CustomerInformation = None,
                      merchant: MerchantInformation = None):
    try:
        request = {
            'payment_information': {
                # NOTE: REQUIRED.
                'card': None,
                'tokenized_card': None,
                'customer': {
                    'customer_id': card_token,
                },
            },
            'order_information': {
                'amount_details': {
                    'total_amount': str(total_amount.amount),
                    'currency': str(total_amount.currency),
                },
            },
        }

        if customer:
            request['order_information'].update({
                'bill_to': {
                    'first_name': customer.first_name,
                    'last_name': customer.last_name,
                    'company': customer.company,
                    'address1': customer.address1,
                    'address2': customer.address2,
                    'locality': customer.locality,
                    'country': customer.country,
                    'email': customer.email,
                    'phone_number': customer.phone_number,
                    'administrative_area': customer.administrative_area,
                    'postalCode': customer.zip_code,
                }
            })

        serialized_request = json.dumps(request)
        data, status, body = self._payment_api_client.create_payment(create_payment_request=serialized_request)

        return data.id
    except Exception as e:
        raise AuthorizePaymentError from e

 

2 REPLIES 2

I've been holding for a while, but the market's dynamism is making me feel pretty uneasy at 3d gaming logo. I could need some guidance.

Elmo_Nader
Contributor

Hello,

I ended up sticking to Simple Order API + Checkout API for authorizations and tokenizations, respectively.

joseemily
Contributor