Adyen

14.0.0 · active · verified Sun Mar 01

Official Python API library for Adyen payment processing. Auto-generated from OpenAPI spec. PyPI package name is 'Adyen' (capital A). Uses X-API-Key auth, not OAuth. Each major version pins updated API versions and may contain breaking changes from codegen corrections.

Warnings

Install

Imports

Quickstart

Amounts are always in minor units (cents, pence). 1000 = $10.00 USD.

import Adyen

adyen = Adyen.Adyen()
adyen.client.xapikey = 'YOUR_X_API_KEY'
adyen.client.platform = 'test'  # change to 'live' for production

request = {
    'merchantAccount': 'YOUR_MERCHANT_ACCOUNT',
    'amount': {'currency': 'USD', 'value': 1000},  # value in minor units (cents)
    'reference': 'order-12345',
    'paymentMethod': {
        'type': 'scheme',
        'encryptedCardNumber': 'test_4111111111111111',
        'encryptedExpiryMonth': 'test_03',
        'encryptedExpiryYear': 'test_2030',
        'encryptedSecurityCode': 'test_737'
    },
    'returnUrl': 'https://your-company.com/checkout/return'
}

result = adyen.checkout.payments_api.payments(request)
print(result.message)

view raw JSON →