### OnboardingVatRegulation Usage Example Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/onboardingvatregulation.md Demonstrates how to import and use the OnboardingVatRegulation model in Python. The DUTCH value is used as an example. ```python from mollie.models import OnboardingVatRegulation value = OnboardingVatRegulation.DUTCH ``` -------------------------------- ### String Metadata Example Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/metadata.md Example of how to define string metadata. Use this when your metadata is a simple text value. ```python value: str = /* values here */ ``` -------------------------------- ### Dictionary Metadata Example Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/metadata.md Example of how to define dictionary metadata. Use this for structured metadata with key-value pairs. ```python value: Dict[str, Any] = /* values here */ ``` -------------------------------- ### Get Transfer Details (Python) Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/transferssdk/README.md Retrieve a single transfer object by its ID. This example shows how to initialize the SDK and make the get request. Ensure you have your advanced access token set as an environment variable. ```python import mollie from mollie import ClientSDK import os with ClientSDK( testmode=False, security=mollie.Security( advanced_access_token=os.getenv("CLIENT_ADVANCED_ACCESS_TOKEN", ""), ), ) as client_sdk: res = client_sdk.transfers.get(business_accounts_transfer_id="batrf_87GByBuj4UCcUTEbs6aGJ", idempotency_key="123e4567-e89b-12d3-a456-426") # Handle response print(res) ``` -------------------------------- ### MandateResponseStatus Example Usage Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/mandateresponsestatus.md Demonstrates how to use the MandateResponseStatus enum to get the valid status value. Unrecognized values are captured as UnrecognizedStr. ```python from mollie.models import MandateResponseStatus value = MandateResponseStatus.VALID # Open enum: unrecognized values are captured as UnrecognizedStr ``` -------------------------------- ### Synchronous SDK Client Example Source: https://github.com/mollie/mollie-api-py/blob/main/README.md Demonstrates how to initialize and use the synchronous ClientSDK for making API requests. Ensure the client is properly closed after use. ```python # Synchronous Example import mollie from mollie import ClientSDK with ClientSDK() as client_sdk: res = client_sdk.oauth.generate(security=mollie.OauthGenerateTokensSecurity( username="", password="", ), idempotency_key="123e4567-e89b-12d3-a456-426", request_body={ "grant_type": mollie.OauthGrantType.AUTHORIZATION_CODE, "code": "auth_...", "refresh_token": "refresh_...", "redirect_uri": "https://example.com/redirect", }) # Handle response print(res) ``` -------------------------------- ### Create oAuth Client (Old) Source: https://github.com/mollie/mollie-api-py/blob/main/MIGRATION.md Illustrates the legacy approach to setting up an oAuth client. ```python from mollie.api.client import Mollie client = Client() client.setup_oauth_authorization_response(authorization_response) ``` -------------------------------- ### Generate OAuth Tokens (Synchronous) Source: https://github.com/mollie/mollie-api-py/blob/main/USAGE.md Use this synchronous example to generate OAuth tokens with the Mollie API Python SDK. Ensure the `mollie` library is installed and imported. ```python # Synchronous Example import mollie from mollie import ClientSDK with ClientSDK() as client_sdk: res = client_sdk.oauth.generate(security=mollie.OauthGenerateTokensSecurity( username="", password="", ), idempotency_key="123e4567-e89b-12d3-a456-426", request_body={ "grant_type": mollie.OauthGrantType.AUTHORIZATION_CODE, "code": "auth_...", "refresh_token": "refresh_...", "redirect_uri": "https://example.com/redirect", }) # Handle response print(res) ``` -------------------------------- ### Create API Key Client (Old) Source: https://github.com/mollie/mollie-api-py/blob/main/MIGRATION.md Demonstrates the legacy method for creating an API key client. ```python from mollie.api.client import Mollie client = Client() client.set_api_key('API_KEY') ``` -------------------------------- ### Get Business Account by ID (Python) Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/accounts/README.md Use this snippet to retrieve a single business account object by its account ID. Ensure you have the Mollie SDK installed and your OAuth token configured. ```python import mollie from mollie import ClientSDK import os with ClientSDK( testmode=True, security=mollie.Security( o_auth=os.getenv("CLIENT_O_AUTH", ""), ), ) as client_sdk: res = client_sdk.accounts.get_account(business_account_id="ba_nopqrstuvwxyz23456789A", idempotency_key="123e4567-e89b-12d3-a456-426") # Handle response print(res) ``` -------------------------------- ### Initialize Mollie SDK with Global Parameters Source: https://github.com/mollie/mollie-api-py/blob/main/README-PYPI.md Demonstrates initializing the Mollie SDK client with global parameters such as test mode, profile ID, and a custom user agent. It also shows how to set an advanced access token using environment variables. This setup allows these values to be used as defaults for subsequent API calls. ```python import mollie from mollie import ClientSDK import os with ClientSDK( testmode=True, profile_id="", custom_user_agent="", security=mollie.Security( advanced_access_token=os.getenv("CLIENT_ADVANCED_ACCESS_TOKEN", ""), ), ) as client_sdk: res = client_sdk.balances.list(currency="EUR", limit=50, idempotency_key="123e4567-e89b-12d3-a456-426") while res is not None: # Handle items res = res.next() ``` -------------------------------- ### Create Payment with Digital Goods Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/paymentssdk/README.md Example of creating a payment with specific parameters for digital goods, including customer reference and terminal ID. This snippet assumes prior setup and authentication with the Mollie API. ```python payment = client.payments.create( amount=Amount('EUR', '10.00'), description='Order #12345', redirect_url='https://example.com/redirect', webhook_url='https://example.com/webhook', metadata={'order_id': '12345'}, digital_goods=True, customer_reference='1234567890', terminal_id='term_1234567890', ) # Handle response print(res) ``` -------------------------------- ### Create Async Client Source: https://github.com/mollie/mollie-api-py/blob/main/MIGRATION.md Demonstrates how to create and use an asynchronous Mollie client with an API key. ```python import asyncio from mollie import Mollie, Security async def main(): async with Mollie( security=Security( api_key='API_KEY' ), ) as mollie: ... asyncio.run(main()) ``` -------------------------------- ### Install mollie-api-py with pip Source: https://github.com/mollie/mollie-api-py/blob/main/README.md Install the mollie-api-py package using pip, the default package installer for Python. ```bash pip install mollie-api-py ``` -------------------------------- ### get Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/payouts/README.md Get payout. ```APIDOC ## GET /v2/payouts/{payout_id} ### Description Get payout. ### Method GET ### Endpoint /v2/payouts/{payout_id} ### Parameters #### Path Parameters - **payout_id** (string) - Required - The ID of the payout to retrieve. ### Response #### Success Response (200) **models.EntityPayoutResponse** ``` -------------------------------- ### Initialize SDK with Global Parameters Source: https://github.com/mollie/mollie-api-py/blob/main/README.md Demonstrates how to initialize the Mollie SDK client with global parameters like testmode, profile_id, and custom_user_agent. These settings act as defaults for subsequent operations. ```python import mollie from mollie import ClientSDK import os with ClientSDK( testmode=True, profile_id="", custom_user_agent="", security=mollie.Security( advanced_access_token=os.getenv("CLIENT_ADVANCED_ACCESS_TOKEN", ""), ), ) as client_sdk: res = client_sdk.balances.list(currency="EUR", limit=50, idempotency_key="123e4567-e89b-12d3-a456-426") while res is not None: # Handle items res = res.next() ``` -------------------------------- ### Create a Standard Payment Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/paymentssdk/README.md This snippet demonstrates how to create a standard payment with essential details like amount, currency, and description. Ensure you have the SDK installed and configured. ```python from mollie.api.client import Client client = Client(api_key='YOUR_API_KEY') try: payment = client.payments.create( { "amount": { "currency": "EUR", "value": "10.00" }, "description": "Order #12345", "redirect_url": "https://example.com/redirect", "webhook_url": "https://example.com/webhook" } ) print(payment) except Exception as e: print(e) ``` -------------------------------- ### get Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/chargebackssdk/README.md Get payment chargeback ```APIDOC ## GET /v2/chargebacks/{chargebackId} ### Description Get a specific payment chargeback by its ID. ### Method GET ### Endpoint /v2/chargebacks/{chargebackId} ### Parameters #### Path Parameters - **chargebackId** (string) - Required - The ID of the chargeback to retrieve. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **data** (object) - The chargeback object. - **_links** (object) - Links to related resources. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Initialize SDK with Custom httpx.Client Source: https://github.com/mollie/mollie-api-py/blob/main/README.md Pass an instance of httpx.Client to the SDK to configure custom headers for all requests. ```python from mollie import ClientSDK import httpx http_client = httpx.Client(headers={"x-custom-header": "someValue"}) s = ClientSDK(client=http_client) ``` -------------------------------- ### Install mollie-api-py with uv Source: https://github.com/mollie/mollie-api-py/blob/main/README.md Install the mollie-api-py package using the uv package manager. uv is a fast Python package installer and resolver. ```bash uv add mollie-api-py ``` -------------------------------- ### get Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/delayedrouting/README.md Get a specific delayed route for a payment. ```APIDOC ## GET /v2/payments/{paymentId}/routes/{routeId} ### Description Get a specific delayed route for a payment. ### Method GET ### Endpoint /v2/payments/{paymentId}/routes/{routeId} ### Parameters #### Path Parameters - **paymentId** (string) - Required - Provide the ID of the related payment. - **routeId** (string) - Required - The ID of the route to retrieve. ### Response #### Success Response (200) - **id** (string) - The ID of the route. - **amount** (object) - The amount that was routed. - **currency** (string) - The currency of the amount. - **value** (string) - The value of the amount. - **destination** (object) - The destination of the routed amount. - **type** (string) - The type of the destination. - **organization_id** (string) - The ID of the organization. - **description** (string) - The description of the route. - **createdAt** (string) - The date and time the route was created. #### Response Example { "id": "rt_abc123", "amount": { "currency": "EUR", "value": "10.00" }, "destination": { "type": "ORGANIZATION", "organization_id": "org_1234567" }, "description": "Payment for Order #12345", "createdAt": "2023-10-27T10:00:00Z" } ### Errors - **404, 429**: models.ErrorResponse - **4XX, 5XX**: models.APIError ``` -------------------------------- ### SalesInvoicePaymentDetailsSource MANUAL Example Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/salesinvoicepaymentdetailssource.md Demonstrates how to import and use the MANUAL value from SalesInvoicePaymentDetailsSource. ```python from mollie.models import SalesInvoicePaymentDetailsSource value = SalesInvoicePaymentDetailsSource.MANUAL ``` -------------------------------- ### Per-Client Authentication with API Key Source: https://github.com/mollie/mollie-api-py/blob/main/README-PYPI.md Configure the SDK client with a global API key for authentication. This example shows setting the API key via an environment variable and enabling test mode. ```python import mollie from mollie import ClientSDK import os with ClientSDK( security=mollie.Security( api_key=os.getenv("CLIENT_API_KEY", ""), ), testmode=True, ) as client_sdk: res = client_sdk.balances.list(currency="EUR", limit=50, idempotency_key="123e4567-e89b-12d3-a456-426") while res is not None: # Handle items res = res.next() ``` -------------------------------- ### Onboarding - Get Onboarding Status Source: https://github.com/mollie/mollie-api-py/blob/main/README.md Get the onboarding status for a connected account. ```APIDOC ## Onboarding - Get Onboarding Status ### Description Get onboarding status. ### Method GET ### Endpoint /v2/onboarding/status ``` -------------------------------- ### Create Customer Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/customers/README.md Example of creating a new customer with various details. Ensure you have the necessary API key and have imported the Mollie client. ```python from datetime import date from mollie.api.client import Client # # Initialize the Mollie API client with your API key. # See: https://docs.mollie.com/quick-startapi/your-api-key # mollie = Client(api_key="test_dHar4XY7L5tq8EL8X8...7a8w") # # Create a customer. # See: https://docs.mollie.com/reference/v2/customers-api/create-customer # # Example with all parameters customer = mollie.customers.create( { "name": "John Doe", "email": "john.doe@example.com", "locale": "nl_NL", "metadata": { "order_id": "12345" }, "mode": "test", } ) # Example with only required parameters # customer = mollie.customers.create({"name": "John Doe", "email": "john.doe@example.com"}) # Handle response print(customer) ``` -------------------------------- ### Instantiate SubscriptionMethod Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/subscriptionmethod.md Shows how to import and assign a SubscriptionMethod value. Use this to explicitly set the payment method for a subscription. ```python from mollie.models import SubscriptionMethod value = SubscriptionMethod.CREDITCARD ``` -------------------------------- ### Instantiate SalesInvoiceVatScheme Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/salesinvoicevatscheme.md Demonstrates how to import and use the SalesInvoiceVatScheme model to set the VAT scheme to STANDARD. ```python from mollie.models import SalesInvoiceVatScheme value = SalesInvoiceVatScheme.STANDARD ``` -------------------------------- ### Create Customer Payment with Voucher PIN Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/customers/README.md Example of creating a payment using a voucher PIN and specifying consumer details. Ensure you have the necessary SDK imports and authentication set up. ```python from datetime import date # Assuming 'mollie_client' is an authenticated Mollie client instance # and 'res' will hold the response from the API call. res = mollie_client.payments.create({ "amount": { "currency": "EUR", "value": "10.00" }, "description": "Order #12345", "redirect_url": "https://web.example.com/redirect", "method": "voucher", "metadata": { "order_id": "order_12345" }, "voucher_pin": "1234", "consumer_date_of_birth": date.fromisoformat("2000-01-01"), "digital_goods": True, "customer_reference": "1234567890", "terminal_id": "term_1234567890", }) # Handle response print(res) ``` -------------------------------- ### Float Metadata Example Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/metadata.md Example of how to define float metadata. Use this for numerical metadata that requires decimal precision. ```python value: float = /* values here */ ``` -------------------------------- ### List of Strings Metadata Example Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/metadata.md Example of how to define metadata as a list of strings. Use this when your metadata is a collection of text values. ```python value: List[str] = /* values here */ ``` -------------------------------- ### Create API Key Client (New) Source: https://github.com/mollie/mollie-api-py/blob/main/MIGRATION.md Shows the updated method for creating an API key client using explicit security configuration. ```python from mollie import Mollie, Security client = Mollie( security = Security( api_key = 'API_KEY, ), ) ``` -------------------------------- ### get Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/organizations/README.md Retrieve a single organization by its ID. This endpoint is primarily for OAuth apps to get details of connected organizations if you have a partner account. ```APIDOC ## GET /v2/organizations/{organizationId} ### Description Retrieve a single organization by its ID. This endpoint is primarily for OAuth apps to get details of connected organizations if you have a partner account. ### Method GET ### Endpoint /v2/organizations/{organizationId} ### Parameters #### Path Parameters - **organizationId** (string) - Required - The ID of the organization to retrieve. #### Query Parameters - **idempotency_key** (string) - Optional - Used to ensure that a request is processed only once. ### Request Example ```python import mollie from mollie import ClientSDK import os with ClientSDK( testmode=True, security=mollie.Security( advanced_access_token=os.getenv("CLIENT_ADVANCED_ACCESS_TOKEN", ""), ), ) as client_sdk: res = client_sdk.organizations.get(organization_id="org_1234567", idempotency_key="123e4567-e89b-12d3-a456-426") # Handle response print(res) ``` ### Response #### Success Response (200) - **id** (string) - The organization's ID. - **name** (string) - The name of the organization. - **resource** (string) - The resource name, always 'organization'. - **created_at** (string) - The date and time the organization was created. #### Response Example { "id": "org_1234567", "name": "My Organization", "resource": "organization", "created_at": "2023-01-01T12:00:00+00:00" } ``` -------------------------------- ### Create Customer with Mollie API Python SDK Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/customers/README.md Example of creating a new customer using the Mollie API Python SDK. This snippet demonstrates how to instantiate the Mollie client and call the customer creation method. ```python from datetime import date from mollie.api.client import Client as MollieClient # # Initialize the Mollie client with your API key. # See: https://docs.mollie.com/quick-startapi-key # mollie = MollieClient() mollie.set_api_key("test_dHar4xiG4r3f7gJ45kL9fG7fG7fG7fG7") # Create a customer try: customer = mollie.customers.create( { "name": "John Doe", "email": "john.doe@example.com", "locale": "nl_NL", "metadata": { "order_id": "ord_k31x31" } } ) print(customer) except Exception as e: print(e) ``` -------------------------------- ### Get Onboarding Status Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/onboarding/README.md Retrieve the onboarding status of the currently authenticated organization. This snippet demonstrates how to initialize the SDK and call the get method. ```python import mollie from mollie import ClientSDK import os with ClientSDK( security=mollie.Security( advanced_access_token=os.getenv("CLIENT_ADVANCED_ACCESS_TOKEN", ""), ), ) as client_sdk: res = client_sdk.onboarding.get(idempotency_key="123e4567-e89b-12d3-a456-426") # Handle response print(res) ``` -------------------------------- ### Instantiate BalanceTransferCategory Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/balancetransfercategory.md Shows how to import and use a BalanceTransferCategory constant. ```python from mollie.models import BalanceTransferCategory value = BalanceTransferCategory.INVOICE_COLLECTION ``` -------------------------------- ### Get Current Organization Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/organizations/README.md Retrieve the currently authenticated organization. This is a convenient alias for the Get organization endpoint. Ensure you have set the CLIENT_ADVANCED_ACCESS_TOKEN environment variable. ```python import mollie from mollie import ClientSDK import os with ClientSDK( security=mollie.Security( advanced_access_token=os.getenv("CLIENT_ADVANCED_ACCESS_TOKEN", ""), ), ) as client_sdk: res = client_sdk.organizations.get_current(idempotency_key="123e4567-e89b-12d3-a456-426") # Handle response print(res) ``` -------------------------------- ### Create Payment Source: https://github.com/mollie/mollie-api-py/blob/main/docs/sdks/paymentssdk/README.md This snippet demonstrates how to create a payment using the `client_sdk.payments.create` method. It includes essential parameters like description, amount, and redirect URLs, as well as advanced options for payment lines, addresses, capture modes, and more. ```APIDOC ## POST /v2/payments ### Description Creates a new payment transaction. This is the primary method for initiating a payment through the Mollie API. ### Method POST ### Endpoint /v2/payments ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **idempotency_key** (string) - Required - Used to ensure that the request is processed only once. - **description** (string) - Required - A description of the payment. - **amount** (object) - Required - The amount to charge. Contains `currency` and `value`. - **currency** (string) - Required - The currency of the amount (e.g., EUR). - **value** (string) - Required - The value of the amount (e.g., "10.00"). - **redirect_url** (string) - Required - The URL Mollie should redirect the customer to after the payment is completed. - **cancel_url** (string) - Required - The URL Mollie should redirect the customer to if the payment is cancelled. - **webhook_url** (string) - Optional - The URL Mollie should send webhook notifications to. - **lines** (array) - Optional - A list of payment lines for the order. - **type** (string) - Required - The type of the payment line (e.g., PHYSICAL, DISCOUNT, SHIPPING, CREDIT, GAME_SOFTWARE, GIFT_CARD, DIGITAL). - **description** (string) - Required - Description of the payment line. - **quantity** (integer) - Required - The quantity of the item. - **quantity_unit** (string) - Optional - The unit of the quantity (e.g., pcs, kg, hours). - **unit_price** (object) - Required - The price per unit. Contains `currency` and `value`. - **discount_amount** (object) - Optional - The discount amount for this line. Contains `currency` and `value`. - **total_amount** (object) - Optional - The total amount for this line after discount. Contains `currency` and `value`. - **vat_rate** (string) - Optional - The VAT rate applied to this line (e.g., "21.00"). - **vat_amount** (object) - Optional - The VAT amount for this line. Contains `currency` and `value`. - **sku** (string) - Optional - The Stock Keeping Unit of the item. - **categories** (array) - Optional - Categories for the line item. - **image_url** (string) - Optional - URL of the image for this line item. - **product_url** (string) - Optional - URL of the product page for this line item. - **recurring** (object) - Optional - Details for recurring payments. - **description** (string) - Required - Description of the recurring item. - **interval** (string) - Required - The interval for recurring payments (e.g., "12 months"). - **amount** (object) - Required - The amount for each recurring payment. Contains `currency` and `value`. - **times** (integer) - Optional - The number of times the payment should recur. - **start_date** (string) - Optional - The date when the recurring payment should start. - **billing_address** (object) - Optional - The billing address for the customer. - **title** (string) - Optional - Title of the customer (e.g., Mr., Ms.). - **given_name** (string) - Required - First name of the customer. - **family_name** (string) - Required - Last name of the customer. - **organization_name** (string) - Optional - Name of the organization. - **street_and_number** (string) - Required - Street name and number. - **street_additional** (string) - Optional - Additional street information. - **postal_code** (string) - Required - Postal code. - **email** (string) - Required - Email address of the customer. - **phone** (string) - Optional - Phone number of the customer. - **city** (string) - Required - City. - **region** (string) - Optional - State or region. - **country** (string) - Required - ISO 3166-1 alpha-2 country code (e.g., NL). - **shipping_address** (object) - Optional - The shipping address for the order. - **locale** (string) - Optional - The locale of the payment page (e.g., en_US, nl_NL). - **method** (string) - Optional - The payment method to use (e.g., creditcard, ideal, paypal). - **issuer** (string) - Optional - The specific issuer for certain payment methods (e.g., ideal_INGBNL2A). - **restrict_payment_methods_to_country** (string) - Optional - Restrict payment methods to a specific country. - **capture_mode** (string) - Optional - The capture mode for the payment (e.g., MANUAL, AUTOMATIC). - **capture_delay** (string) - Optional - Delay before automatic capture (e.g., "8 hours"). - **application_fee** (object) - Optional - Application fee details. - **amount** (object) - Required - The amount of the application fee. Contains `currency` and `value`. - **description** (string) - Optional - Description of the application fee. - **routing** (array) - Optional - Routing information for payments. - **amount** (object) - Required - The amount to route. Contains `currency` and `value`. - **destination** (object) - Required - The destination for the routed amount. - **type** (string) - Required - The type of destination (e.g., ORGANIZATION, BANK_ACCOUNT). - **organization_id** (string) - Required if type is ORGANIZATION - The ID of the organization. - **iban** (string) - Required if type is BANK_ACCOUNT - The IBAN of the bank account. - **release_date** (string) - Optional - The date when the funds should be released. - **sequence_type** (string) - Optional - The sequence type for recurring payments (e.g., ONEOFF, FIRST, SUBSEQUENT, FINAL). - **mandate_id** (string) - Optional - The ID of the mandate for recurring payments. - **customer_id** (string) - Optional - The ID of the customer. - **profile_id** (string) - Optional - The ID of the payment profile. - **due_date** (string) - Optional - The due date for the payment. - **store_credentials** (boolean) - Optional - Whether to store payment credentials for future use. - **testmode** (boolean) - Optional - Whether this is a test payment. - **apple_pay_payment_token** (string) - Optional - The Apple Pay payment token. - **company** (object) - Optional - Company details for the payment. - **registration_number** (string) - Optional - Company registration number. - **vat_number** (string) - Optional - Company VAT number. - **card_token** (string) - Optional - Token for card payments. - **google_pay_payment_token** (string) - Optional - The Google Pay payment token. - **voucher_number** (string) - Optional - The voucher number for voucher payments. - **voucher_pin** (string) - Optional - The PIN for voucher payments. - **consumer_date_of_birth** (string) - Optional - The consumer's date of birth. ### Request Example ```json { "idempotency_key": "123e4567-e89b-12d3-a456-426", "description": "Chess Board", "amount": { "currency": "EUR", "value": "10.00" }, "redirect_url": "https://example.org/redirect", "cancel_url": "https://example.org/cancel", "webhook_url": "https://example.org/webhooks", "lines": [ { "type": "PHYSICAL", "description": "LEGO 4440 Forest Police Station", "quantity": 1, "quantity_unit": "pcs", "unit_price": { "currency": "EUR", "value": "10.00" }, "discount_amount": { "currency": "EUR", "value": "10.00" }, "total_amount": { "currency": "EUR", "value": "10.00" }, "vat_rate": "21.00", "vat_amount": { "currency": "EUR", "value": "10.00" }, "sku": "9780241661628", "categories": [ "MEAL", "ECO" ], "image_url": "https://...", "product_url": "https://...", "recurring": { "description": "Gym subscription", "interval": "12 months", "amount": { "currency": "EUR", "value": "10.00" }, "times": 1, "start_date": "2024-12-12" } } ], "billing_address": { "title": "Mr.", "given_name": "Piet", "family_name": "Mondriaan", "street_and_number": "Keizersgracht 126", "street_additional": "Apt. 1", "postal_code": "1234AB", "email": "piet@example.org", "phone": "31208202070", "city": "Amsterdam", "region": "Noord-Holland", "country": "NL" }, "shipping_address": { "title": "Mr.", "given_name": "Piet", "family_name": "Mondriaan", "organization_name": "Mollie B.V.", "street_and_number": "Keizersgracht 126", "street_additional": "Apt. 1", "postal_code": "1234AB", "email": "piet@example.org", "phone": "31208202070", "city": "Amsterdam", "region": "Noord-Holland", "country": "NL" }, "locale": "en_US", "method": "ideal", "issuer": "ideal_INGBNL2A", "restrict_payment_methods_to_country": "NL", "capture_mode": "MANUAL", "capture_delay": "8 hours", "application_fee": { "amount": { "currency": "EUR", "value": "10.00" }, "description": "10" }, "routing": [ { "amount": { "currency": "EUR", "value": "10.00" }, "destination": { "type": "ORGANIZATION", "organization_id": "org_1234567" }, "release_date": "2024-12-12" } ], "sequence_type": "ONEOFF", "mandate_id": "mdt_5B8cwPMGnU", "customer_id": "cst_5B8cwPMGnU", "profile_id": "pfl_5B8cwPMGnU", "due_date": "2025-01-01", "store_credentials": true, "testmode": false, "apple_pay_payment_token": "{\"paymentData\": {\"version\": \"EC_v1\", \"data\": \"vK3BbrCbI/....\"}}", "company": { "registration_number": "12345678", "vat_number": "NL123456789B01" }, "card_token": "tkn_12345", "google_pay_payment_token": "{\"signature\": \"MEYCIQCv...\", \"protocolVersion\": \"ECv2\", \"signedMessage\": \"{\\\"encryptedMessage\\\":\\\"...\\\",\\\"ephemeralPublicKey\\\":\\\"...\\\",\\\"tag\\\":\\\"...\\\"}\"}", "voucher_number": "1234567890", "voucher_pin": "1234", "consumer_date_of_birth": "2000-01-01" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the payment. - **amount** (object) - The amount of the payment. - **status** (string) - The current status of the payment. - **description** (string) - The description of the payment. - **method** (string) - The payment method used. - **created_at** (string) - The date and time the payment was created. - **expires_at** (string) - The date and time the payment expires. - **redirect_url** (string) - The redirect URL for the payment. - **webhook_url** (string) - The webhook URL for the payment. #### Response Example ```json { "id": "pay_123456789", "amount": { "currency": "EUR", "value": "10.00" }, "status": "open", "description": "Chess Board", "method": "ideal", "created_at": "2024-01-01T10:00:00+00:00", "expires_at": "2024-01-08T10:00:00+00:00", "redirect_url": "https://example.org/redirect", "webhook_url": "https://example.org/webhooks" } ``` ``` -------------------------------- ### Get Organization Request Fields Source: https://github.com/mollie/mollie-api-py/blob/main/docs/models/getorganizationrequest.md This snippet details the fields that can be used when making a request to get an organization. It includes required and optional parameters with their types and descriptions. ```APIDOC ## Get Organization Request ### Description This document outlines the parameters available for retrieving organization details. ### Parameters #### Query Parameters - **organization_id** (string) - Required - Provide the ID of the related organization. - **testmode** (boolean) - Optional - You can enable test mode by setting the `testmode` query parameter to `true`. Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa. - **idempotency_key** (string) - Optional - A unique key to ensure idempotent requests. This key should be a UUID v4 string. ```