### Create Payment Order Request Example Source: https://docs.thunes.com/accept/v1/index_introduction This example shows how to make a POST request to create a payment order. It includes details for both requested and merchant order information, customer and billing/shipping addresses, and integration mode. ```http POST /v1/payment/payment-orders HTTP/1.1 201 Success ``` ```json { "requested": { "amount": 2000.00, "currency": "MXN" }, "type": "B2B", "merchant_id": "mymerchant", "merchant_external_id": "my_company_id", "external_id": "987654", "merchant_urls": { "aborted_url": "aborted.com", "error_url": "error.com", "return_url": "return.com", "notification_url": "notification.com" }, "payment_page_id": "paymentpage12345", "merchant_order": { "total": { "amount": 10.00, "currency": "EUR" }, "tax": { "amount": 0.50, "currency": "EUR" }, "searchable_custom_data_1": null, "searchable_custom_data_2": null, "custom_data": null, "billing_address": { "address_line_1": "47 avenue de l'opera", "address_line_2": null, "city": "Paris", "company_name": "Thunes", "country_iso_code": "FRA", "custom_data": null, "first_name": "Jean", "home_phone": null, "last_name": "Dupont", "mobile_phone": null, "region": "Ile-de-France", "title": null, "zip_code": "75002" }, "shipping_address": { "address_line_1": "47 avenue de l'opera", "address_line_2": null, "city": "Paris", "company_name": "Thunes", "country_iso_code": "FRA", "custom_data": null, "first_name": "Jean", "home_phone": null, "last_name": "Dupont", "mobile_phone": null, "region": "Ile-de-France", "title": null, "zip_code": "75002" }, "customer": { "account_creation_date": "2023-10-26T14:24:31", "date_of_birth": "1990-01-31", "company_name": null, "culture": "fr-FR", "custom_data": null, "email": "jean.dupont@mail.com", "first_name": "Jean", "home_phone": null, "id": null, "last_name": "Dupont", "mobile_phone": "string", "title": null }, "cart_items": [ { "brand": "yourbrand", "category": "cathegory1", "label": "object123", "custom_data": null, "merchant_category_1": null, "merchant_category_2": null, "merchant_item_id": null, "quantity": 1, "type": null, "unit_price": { "amount": 10.00, "currency": "EUR" }, "url": null, "vat": { "amount": 10.00, "currency": "EUR" }, "delivery": { "label": null, "type": null, "speed": "2", "expected_date": "2023-10-26T14:24:31", "expected_delay": 0, "custom_data": null } } ] }, "integration_mode": "REDIRECT", "payment_information": { "card_number": "6541778898761532", "card_cvv": "123", "card_expiration_year": "2050", "card_expiration_month": "01", "card_holder_name": "Jean Dupont", "email": "jean.dupont@mail.com", "phone_number": "0033612345678", "token_id": null, "bank_account_number": null, "account_holder_name": null, "otp": "123456", "msisdn": "263775892364", "qrcode": "324032942309", "bank_id": "123" } } ``` -------------------------------- ### Get Account Balances (JSON Example) Source: https://docs.thunes.com/accept/v1/index_introduction Retrieves a list of Balance objects for an account, including AVAILABLE, EXPECTED, WAITING_FOR_VALIDATION, and UP_TO_DATE types. Each balance object contains details about the amount, currency, and relevant dates. ```json { "balances": [ { "type": "AVAILABLE", "date": "2024-01-11T14:56:51", "last_change_date": "2024-01-10T13:13:23", "balance": { "amount": 10234.97, "currency": "EUR" } }, { "type": "EXPECTED", "date": "2024-01-11T14:56:51", "last_change_date": "2024-01-10T13:13:23", "balance": { "amount": 11667.51, "currency": "EUR" } }, { "type": "UP_TO_DATE", "date": "2024-01-11T14:56:51", "last_change_date": "2024-01-10T13:13:23", "balance": { "amount": 10234.97, "currency": "EUR" } }, { "type": "WAITING_FOR_VALIDATION", "date": "2024-01-11T14:56:51", "last_change_date": "2024-01-10T13:13:23", "balance": { "amount": 1432.54, "currency": "EUR" } } ] } ``` -------------------------------- ### Get Quotation Object Example Source: https://docs.thunes.com/accept/v1/index_introduction This example demonstrates the structure of a quotation object returned by the API. It includes details about the requested and processed amounts, currency, and validity period. ```json { "id" : "121afd71-4444-4bdd-9999-d8c1c50dc6b6", "external_id": "123456789", "merchant_id": "mymerchant", "payment_page_id": "paymentpage12345", "requested": { "amount": 10.00, "currency": "EUR" }, "processed": { "amount": 2000.00, "currency": "MXN" }, "wholesale_fx_rate": 200.000000000000000000, "creation_date": "2024-03-16T16:36:04", "expiration_date": "2024-03-23T16:36:04", "quotation_mode": "REQUESTED_AMOUNT" } ``` -------------------------------- ### GET /v1/onboarding/merchant-payment-pages Source: https://docs.thunes.com/accept/v1/index_introduction Retrieves a list of all merchant payment page configurations. ```APIDOC ## GET /v1/onboarding/merchant-payment-pages ### Description Retrieves a list of all merchant payment page configurations. ### Method GET ### Endpoint `/v1/onboarding/merchant-payment-pages` ### Response #### Success Response (200) - **creation_date** (string) - The date the payment page was created. - **merchant_id** (string) - The ID of the merchant. - **merchant_external_id** (string) - The external ID of the merchant. - **payment_integrator_id** (string) - The ID of the payment integrator. - **payment_page_id** (string) - The ID of the payment page. - **specific_parameters** (JSON) - Specific parameters for the merchant payment page configuration (can be null). - **status** (string) - The current status of the payment page. - **update_date** (string) - The date the payment page was last updated. - **custom_data** (JSON) - Custom data associated with the payment page (can be null). #### Response Example ```json [ { "creation_date": "2023-12-07T16:08:47", "merchant_id": "mymerchant", "merchant_external_id": "my_merchant_id", "payment_integrator_id": "paymentintegrator1", "payment_page_id": "paymentpage1", "specific_parameters": null, "status": "charged", "update_date": "2023-12-07T16:08:47", "custom_data": null } ] ``` ``` -------------------------------- ### API Pagination Example Source: https://docs.thunes.com/accept/v1/index_introduction Demonstrates how to request paginated data from the API using query parameters like 'page' and 'per_page'. It also shows the expected output headers for pagination, including total records, pages, and current page information. ```HTTP GET /{resource}?page=1&per_page=50 HTTP/1.1 X-Total: 1 X-Total-Pages: 1 X-Per-Page: 50 X-Page: 1 ``` -------------------------------- ### Retrieve Account API Request Example Source: https://docs.thunes.com/accept/v1/index This snippet shows an example HTTP request to retrieve an account using its ID. It specifies the HTTP method, path, and protocol version. The endpoint is designed to fetch a specific account's details based on the provided identifier. ```http GET/v1/onboarding/accounts/{id} HTTP/1.1 201 Success ``` -------------------------------- ### GET /v1/onboarding/accounts/{id} Source: https://docs.thunes.com/accept/v1/index_introduction Retrieves a specific account using its unique identifier. Returns the full account object including associated payout bank accounts and balances. ```APIDOC ## GET /v1/onboarding/accounts/{id} ### Description Retrieves a specific account using its unique identifier. Returns the full account object including associated payout bank accounts and balances. ### Method GET ### Endpoint /v1/onboarding/accounts/{id} #### Path Parameters - **id** (string) - Required - The unique identifier of the account to retrieve. ### Response #### Success Response (200) - **template_id** (string) - The ID of the account template. - **label** (string) - A descriptive label for the account. - **company_id** (string) - The ID of the company associated with the account. - **recipient_email** (string) - The email address of the account recipient. - **fees** (array of strings) - A list of fee IDs associated with the account. - **payout_bank_accounts** (array of objects) - A list of the account's payout bank accounts. - **id** (integer) - The unique identifier of the payout bank account. - **address_line_1** (string) - The first line of the bank address. - **address_line_2** (string | null) - The second line of the bank address (optional). - **bank_name** (string) - The name of the bank. - **bank_address** (string) - The address of the bank. - **bank_country_iso_code** (string) - The ISO code of the bank's country. - **bank_routing_code** (string) - The bank's routing code. - **bank_branch_code** (string) - The bank's branch code. - **bic** (string) - The Bank Identifier Code (BIC). - **card_number** (string) - The card number associated with the account. - **external_id** (string) - The external ID of the bank account. - **external_account_id** (string) - The external account ID. - **external_account_type** (string) - The type of the external account. - **iban** (string) - The International Bank Account Number (IBAN). - **holder_name** (string) - The name of the account holder. - **holder_email** (string) - The email of the account holder. - **holder_phone** (string) - The phone number of the account holder. - **format** (string) - The format of the account details (e.g., 'IBAN'). - **label** (string) - A label for the payout bank account. - **registration_number** (string) - The registration number for the account. - **representative_id_number** (string) - The ID number of the representative. - **representative_name** (string) - The name of the representative. - **status** (string) - The status of the payout bank account. - **target_currency** (string) - The target currency for payouts. - **tax_id** (string) - The tax ID of the account holder. - **is_blocked** (boolean) - Indicates if the account is blocked. - **is_default** (boolean) - Indicates if this is the default payout account. - **creation_date** (string) - The date and time the payout bank account was created. - **update_date** (string) - The date and time the payout bank account was last updated. - **balances** (array of objects) - A list of balance information for the account. - **type** (string) - The type of balance (e.g., 'B2B'). - **date** (string) - The date of the balance information. - **last_change_date** (string) - The date of the last balance change. - **balance** (object) - The balance details. - **amount** (number) - The balance amount. - **currency** (string) - The currency of the balance. ### Response Example ```json { "template_id": "1", "label": "MyAccount", "company_id": "my_company_id", "recipient_email": "jean.dupont@mail.com", "fees": [ "fee_id" ], "payout_bank_accounts": [ { "id": 1, "address_line_1": "47 Av. de l'Opéra, 75002 Paris, France", "address_line_2": null, "bank_name": "Bank Name", "bank_address": "1 Av. des Champs-Élysées75008 Paris", "bank_country_iso_code": "FRA", "bank_routing_code": "000123456", "bank_branch_code": "00001", "bic": "AAAAAAA4B", "card_number": "0000111122223333", "external_id": "external_id", "external_account_id": "external_account_id", "external_account_type": "B2B", "iban": "ES0000000000050200050000", "holder_name": "Jean Dupres", "holder_email": "jean.dupres@mail.com", "holder_phone": "0102030405", "format": "IBAN", "label": "Payout Bank Account Name", "registration_number": "123", "representative_id_number": "1234", "representative_name": "Jean Dubois", "status": "charged", "target_currency": "USD", "tax_id": "tax_id", "is_blocked": true, "is_default": true, "creation_date": "2023-12-07T16:10:16", "update_date": "2024-01-07T16:11:57" } ], "balances": [ { "type": "B2B", "date": "2023-12-07T16:11:57", "last_change_date": "2024-01-07T16:11:57", "balance": { "amount": 10.00, "currency": "USD" } } ] } ``` ``` -------------------------------- ### API Basic Authentication Example Source: https://docs.thunes.com/accept/v1/index_introduction Demonstrates how to authenticate API requests using HTTP Basic Authentication with provided API key and secret. This is essential for accessing all Thunes Accept v1 API endpoints. ```bash curl https://${API_ENDPOINT}/ping \ -u "${API_KEY}:${API_SECRET}" ``` -------------------------------- ### Create Merchant - Success Response Example Source: https://docs.thunes.com/accept/v1/index_introduction This snippet shows a successful response when creating a merchant. It returns a Merchant object containing details like ID, currency, and creation dates. ```JSON { "id": 1, "company_id": "1", "currency": "USD", "merchant_external_id": "my_merchant_id", "name": "My Merchant Name", "template_id": "my_merchant_template_id", "custom_data": null, "creation_date": "2023-12-07T16:09:08", "update_date": "2023-12-07T16:09:08" } ``` -------------------------------- ### Create Merchant - Request Example Source: https://docs.thunes.com/accept/v1/index_introduction This snippet demonstrates the POST request to create a new merchant. It requires company ID, merchant external ID, name, and template ID. The response is a Merchant object. ```HTTP POST /v1/onboarding/merchants HTTP/1.1 ``` ```JSON { "company_id": "1", "merchant_external_id": "my_merchant_id", "name": "My Merchant Name", "template_id": "my_merchant_template_id", "custom_data": null } ``` -------------------------------- ### Payment Order Structure Example Source: https://docs.thunes.com/accept/v1/index This JSON object represents a typical payment order. It includes details about the requested and processed amounts, merchant information, URLs for redirection, and a comprehensive merchant order object. ```json { "id": "433282730000", "requested": { "amount": 2000.00, "currency": "MXN" }, "processed": { "amount": 10.00, "currency": "EUR" }, "creation_date": "2024-01-08T15:51:54", "quotation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "merchant_id": "mymerchant", "external_id": "987654", "merchant_external_id": "my_company_id", "merchant_urls": { "aborted_url": "aborted.com", "error_url": "error.com", "return_url": "return.com", "notification_url": "notification.com" }, "payment_integrator_id": "string", "payment_page_id": "paymentpage12345", "payment_url": "payment.com", "status": "Authorized", "update_date": "2024-01-08T15:51:54", "merchant_order": { "total": { "amount": 10.00, "currency": "EUR" }, "tax": { "amount": 0.50, "currency": "EU" }, "searchable_custom_data_1": null, "searchable_custom_data_2": null, "custom_data": null, "billing_address": { "address_line_1": "47 avenue de l'opera", "address_line_2": null, "city": "Paris", "company_name": "Thunes", "country_iso_code": "FRA", "custom_data": null, "first_name": "Jean", "home_phone": null, "last_name": "Dupont", "mobile_phone": null, "region": "Ile-de-France", "title": null, "zip_code": "75002" }, "shipping_address": { "address_line_1": "47 avenue de l'opera", "address_line_2": null, "city": "Paris", "company_name": "Thunes", "country_iso_code": "FRA", "custom_data": null, "first_name": "Jean", "home_phone": null, "last_name": "Dupont", "mobile_phone": null, "region": "Ile-de-France", "title": null, "zip_code": "75002" }, "customer": { "account_creation_date": "2023-10-26T14:24:31", "date_of_birth": "1990-01-31", "company_name": null, "culture": "fr-FR", "custom_data": null, "email": "jean.dupont@mail.com", "first_name": "Jean", "home_phone": null, "id": null, "last_name": "Dupont", "mobile_phone": "string", "title": null }, "cart_items": [ { "brand": "yourbrand", "category": "cathegory1", "label": "object123", "custom_data": null, "merchant_category_1": null, "merchant_category_2": null, "merchant_item_id": null, "quantity": 1, "type": null, "unit_price": { "amount": 10.00, "currency": "EUR" }, "url": null, "vat": { "amount": 10.00, "currency": "EUR" }, "delivery": { "label": null, "type": null, "speed": "2", "expected_date": "2023-10-26T14:24:31", "expected_delay": 0, "custom_data": null } } ] }, "type": "B2B", "integration_mode": "REDIRECT", "payment_methods": [ { "amounts": { "authorizing": { "amount": 10.00, "currency": "EUR" }, }, "brand": "string", "custom_data": "string", "holder_id": "string", "holder_email": "string", "payment_instruction": { "url": "redirecturl3ds.com", "display_message": "Please proceed to do A, B and C to complete the payment" }, "payment_method_order_id": "string", "payment_method_reference": "string", "type": "string" } ], "payment_information": { "card_number": "6541778898761532", "card_cvv": "123", "card_expiration_year": "2050", "card_expiration_month": "01", "card_holder_name": "Jean Dupont", "email": "jean.dupont@mail.com", "phone_number": "0033612345678", "token_id": null, "bank_account_number": null, "account_holder_name": null, "otp": "123456", "msisdn": "263775892364", "qrcode": "324032942309", "bank_id": "123" } } ``` -------------------------------- ### Company Object Example (JSON) Source: https://docs.thunes.com/accept/v1/index_introduction This JSON object represents a company on the Thunes platform, which can be an integrator, merchant, marketplace, or payment institution. It includes the company's ID, name, and creation/update dates. ```json { "id": 1, "name": "My Company Name", "creation_date": "2023-12-07T16:09:48", "update_date": "2023-12-07T16:09:48" } ``` -------------------------------- ### Retrieve Merchant by ID - Request Example Source: https://docs.thunes.com/accept/v1/index_introduction This snippet shows the GET request to retrieve a merchant using its ID. The merchant ID is a path parameter in the URL. ```HTTP GET /v1/onboarding/merchants/{nameId} HTTP/1.1 ``` -------------------------------- ### POST /v1/onboarding/accounts Source: https://docs.thunes.com/accept/v1/index_introduction Creates a new onboarding account with specified details and payout bank account information. ```APIDOC ## POST /v1/onboarding/accounts ### Description This endpoint allows for the creation of a new onboarding account within the Thunes system. It accepts configuration details and payout bank account information to set up the account for receiving funds. ### Method POST ### Endpoint /v1/onboarding/accounts ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **template_id** (string) - Required - Identifier to apply a predefined configuration for account creation. - **label** (string) - Required - A human-readable name for the account. - **company_id** (string) - Required - The unique identifier of the company that will own this account. - **recipient_email** (string) - Optional - Email address to which accounting documentation will be sent. - **fees** (array) - Optional - A list of fee identifiers related to the account creation. - **payout_bank_accounts** (array) - Optional - An array of objects, where each object describes a bank account designated for payouts. - **address_line_1** (string) - Optional - The first line of the payout account holder's address. - **address_line_2** (string) - Optional - The second line of the payout account holder's address. - **bank_name** (string) - Optional - The name of the bank where the payout account is held. - **bank_address** (string) - Optional - The physical address of the bank. - **bank_country_iso_code** (string) - Optional - The ISO 3166-1 alpha-3 code for the bank's country. - **bank_routing_code** (string) - Optional - The routing code for the bank. - **bank_branch_code** (string) - Optional - The branch code of the bank. - **bic** (string) - Required - The Bank Identifier Code (BIC) of the payout bank. - **card_number** (string) - Optional - The card number of the merchant receiving the payout. - **external_id** (string) - Optional - Thunes' unique identifier for the payout bank account. - **external_account_id** (string) - Optional - The account identifier at the bank or in the target payout system. - **external_account_type** (string) - Optional - The type of the account (e.g., SAVINGS, DEPOSIT, CHECKING, OTHERS). - **iban** (string) - Required - The International Bank Account Number (IBAN) for the payout account. - **holder_name** (string) - Optional - The name of the payout bank account holder. - **holder_email** (string) - Optional - The email address of the payout bank account holder. - **holder_phone** (string) - Optional - The phone number of the payout bank account holder. - **format** (string) - Required - Specifies the format of the account details (e.g., IBAN, CLABE, US account). - **label** (string) - Required - A name for the payout bank account. - **registration_number** (string) - Optional - The registration number associated with the account. - **representative_id_number** (string) - Optional - The identification number of the business representative. - **representative_name** (string) - Optional - The name of the business representative. - **target_currency** (string) - Optional - The currency code for the payout bank account. - **tax_id** (string) - Optional - The tax identification number. ### Request Example ```json { "template_id": "1", "label": "MyAccount", "company_id": "my_company_id", "recipient_email": "jean.dupont@mail.com", "fees": [ "fee_id" ], "payout_bank_accounts": [ { "address_line_1": "47 Av. de l'Opéra, 75002 Paris, France", "address_line_2": null, "bank_name": "Bank Name", "bank_address": "1 Av. des Champs-Élysées75008 Paris", "bank_country_iso_code": "FRA", "bank_routing_code": "000123456", "bank_branch_code": "00001", "bic": "AAAAAAA4B", "card_number": "0000111122223333", "external_id": "external_id", "external_account_id": "external_account_id", "external_account_type": "B2B", "iban": "ES0000000000050200050000", "holder_name": "Jean Dupres", "holder_email": "jean.dupres@mail.com", "holder_phone": "0102030405", "format": "IBAN", "label": "Payout Bank Account Name", "registration_number": "123", "representative_id_number": "1234", "representative_name": "Jean Dubois", "target_currency": "USD", "tax_id": "tax_id" } ] } ``` ### Response #### Success Response (201) - **account_id** (string) - The unique identifier assigned to the newly created account. - **status** (string) - The current status of the created account (e.g., PENDING, ACTIVE). #### Response Example ```json { "account_id": "acc_12345abcde", "status": "PENDING" } ``` #### Error Response (400, 401, 403, 500) - **error** (object) - Contains details about the error. - **code** (string) - An error code. - **message** (string) - A human-readable error message. #### Error Response Example ```json { "error": { "code": "INVALID_PARAMETER", "message": "The provided company_id is invalid." } } ``` ``` -------------------------------- ### Create Transfer Request (JSON Example) Source: https://docs.thunes.com/accept/v1/index_introduction Initiates a transfer of funds between two accounts on the platform. Requires transfer amount and currency, external reference, label, source and target account IDs, and transfer type. Returns the created transfer request object with its status. ```json { "transfer": { "amount": 10.00, "currency": "USD" }, "external_reference": "transfer123456", "label": "transfer123456", "source_account_id": "123456789123", "target_account_id": "123111111111", "type": "ScheduledTransferOut", "custom_data": null } ``` -------------------------------- ### Retrieve Merchant by ID via GET Request Source: https://docs.thunes.com/accept/v1/index This snippet shows how to retrieve a merchant's details using the GET /v1/onboarding/merchants/{nameId} endpoint. The {nameId} path parameter specifies the merchant to retrieve. The response is a Merchant object. ```http GET /v1/onboarding/merchants/{nameId} HTTP/1.1 201 Success ``` ```json { "id": 1, "company_id": "1", "currency": "USD", "merchant_external_id": "my_merchant_id", "name": "My Merchant Name", "template_id": "my_merchant_template_id", "custom_data": null, "creation_date": "2023-12-07T16:09:08", "update_date": "2023-12-07T16:09:08" } ``` -------------------------------- ### GET /v1/payment/ping Source: https://docs.thunes.com/accept/v1/index Performs a health check on the payment service. ```APIDOC ## Health check ### Ping #### Request ```http GET v1/payment/ping HTTP/1.1 ``` #### Response (200 OK) ```json { "status": "up" } ``` ``` -------------------------------- ### Retrieve Payment Order by ID - GET Request Source: https://docs.thunes.com/accept/v1/index_introduction This GET request retrieves detailed information about a specific payment order using its unique identifier. The payment order ID must be substituted into the URI path. The response includes the full Payment Order object. ```http GET /v1/payment/payment-orders/{id} HTTP/1.1 200 OK ``` -------------------------------- ### Onboarding API Source: https://docs.thunes.com/accept/v1/index_introduction Endpoints for onboarding companies and merchants. ```APIDOC ## POST /v1/onboarding/companies ### Description Creates a new company entity. ### Method POST ### Endpoint /v1/onboarding/companies ### Parameters #### Request Body - **template_id** (String) - Required - The ID of the template to be used for company creation. - **name** (String) - Required - The name of the company to be created. ### Request Example ```json { "template_id": "My Company Name", "name": "my-template-id" } ``` ### Response #### Success Response (201) - **id** (Integer) - The unique identifier for the company. - **name** (String) - The name of the company. - **creation_date** (String) - The date and time the company was created. - **update_date** (String) - The date and time the company was last updated. #### Response Example ```json { "id": 1, "name": "My Company Name", "creation_date": "2023-12-07T16:09:48", "update_date": "2023-12-07T16:09:48" } ``` ## GET /v1/onboarding/companies/{nameId} ### Description Retrieves a company by its name ID. ### Method GET ### Endpoint /v1/onboarding/companies/{nameId} ### Parameters #### Path Parameters - **nameId** (String) - Required - The name ID of the company to retrieve. ### Response #### Success Response (200) - **id** (Integer) - The unique identifier for the company. - **name** (String) - The name of the company. - **creation_date** (String) - The date and time the company was created. - **update_date** (String) - The date and time the company was last updated. #### Response Example ```json { "id": 1, "name": "My Company Name", "creation_date": "2023-12-07T16:09:48", "update_date": "2023-12-07T16:09:48" } ``` ## POST /v1/onboarding/merchants ### Description Creates a new merchant entity. This is a placeholder as full details were not provided in the input. ### Method POST ### Endpoint /v1/onboarding/merchants ### Parameters #### Request Body (Details for creating a merchant were not fully provided in the input text.) ### Response #### Success Response (201) (Details for the success response were not fully provided in the input text.) #### Response Example (Response example not provided in the input text.) ``` -------------------------------- ### Create Onboarding Account Request Body (JSON) Source: https://docs.thunes.com/accept/v1/index This snippet shows the JSON structure for the request body to create a new onboarding account. It includes essential details like the company ID, account label, recipient email, and payout bank account information. Ensure all required fields are correctly populated. ```json { "template_id": "1", "label": "MyAccount", "company_id": "my_company_id", "recipient_email": "jean.dupont@mail.com", "fees": [ "fee_id" ], "payout_bank_accounts": [ { "address_line_1": "47 Av. de l'Opéra, 75002 Paris, France", "address_line_2": null, "bank_name": "Bank Name", "bank_address": "1 Av. des Champs-Élysées75008 Paris", "bank_country_iso_code": "FRA", "bank_routing_code": "000123456", "bank_branch_code": "00001", "bic": "AAAAAAA4B", "card_number": "0000111122223333", "external_id": "external_id", "external_account_id": "external_account_id", "external_account_type": "B2B", "iban": "ES0000000000050200050000", "holder_name": "Jean Dupres", "holder_email": "jean.dupres@mail.com", "holder_phone": "0102030405", "format": "IBAN", "label": "Payout Bank Account Name", "registration_number": "123", "representative_id_number": "1234", "representative_name": "Jean Dubois", "target_currency": "USD", "tax_id": "tax_id" } ] } ``` -------------------------------- ### Retrieve Payment Order by External ID - GET Request Source: https://docs.thunes.com/accept/v1/index_introduction This GET request allows retrieval of a payment order's details using its external identifier. The `{externalId}` placeholder in the URI must be replaced with the actual external ID. The successful response returns the Payment Order object. ```http GET /v1/payment/payment-orders/{externalId} HTTP/1.1 200 OK ``` -------------------------------- ### GET /v1/account/transfer-requests/{externalId} Source: https://docs.thunes.com/accept/v1/index_introduction Retrieves detailed information about a specific transfer request using its external ID. ```APIDOC ## GET /v1/account/transfer-requests/{externalId} ### Description Fetches the details of a specific transfer request identified by its external ID. This endpoint provides the status and all associated information for a given transfer. ### Method GET ### Endpoint /v1/account/transfer-requests/{externalId} #### Path Parameters - **externalId** (string) - Required - The external ID of the transfer request to retrieve. #### Response ##### Success Response (200) - **id** (string) - The unique identifier of the transfer request. - **transfer** (object) - Details of the transfer. - **amount** (number) - The transferred amount. - **currency** (string) - The currency of the transfer. - **creation_date** (string) - The date and time when the transfer request was created. - **external_reference** (string) - The external reference provided for the transfer. - **label** (string) - The label assigned to the transfer. - **status** (string) - The current status of the transfer request (e.g., "WaitingForValidation"). - **source_account_id** (string) - The ID of the source account. - **target_account_id** (string) - The ID of the target account. - **type** (string) - The type of the transfer request. - **validation_date** (string) - The date and time when the transfer request was validated. - **related** (array) - An array of related resources. - **resource_type** (string) - The type of the related resource. - **resource_id** (string) - The ID of the related resource. - **custom_data** (string or null) - Any custom data associated with the transfer request. ##### Response Example ```json { "id": "1", "transfer": { "amount": 10.00, "currency": "USD" }, "creation_date": "2023-12-07T16:00:27", "external_reference": "transfer123456", "label": "transfer123456", "status": "WaitingForValidation", "source_account_id": "123456789123", "target_account_id": "123111111111", "type": "ScheduledTransferOut", "validation_date": "2023-12-07T16:00:27", "related": [ { "resource_type": "PaymentOrder", "resource_id": "740822050000" } ], "custom_data": null } ``` ``` -------------------------------- ### GET /v1/onboarding/merchants/{nameId} Source: https://docs.thunes.com/accept/v1/index_introduction Retrieves a specific merchant by its ID. This endpoint is useful for fetching details of an existing merchant. ```APIDOC ## GET /v1/onboarding/merchants/{nameId} ### Description Retrieves a specific merchant by its ID. This endpoint is useful for fetching details of an existing merchant. ### Method GET ### Endpoint /v1/onboarding/merchants/{nameId} ### Parameters #### Path Parameters - **nameId** (String) - Required - The ID of the merchant to retrieve. ### Response #### Success Response (200) - **id** (Integer) - Unique identifier for the merchant. - **company_id** (String) - The ID of the company owning the merchant. - **currency** (String) - The default currency for the merchant. - **merchant_external_id** (String) - The external ID provided for the merchant. - **name** (String) - The name of the merchant. - **template_id** (String) - The ID of the template used for the merchant. - **custom_data** (JSON) - Any custom data associated with the merchant. - **creation_date** (String) - The date and time when the merchant was created. - **update_date** (String) - The date and time when the merchant was last updated. #### Response Example ```json { "id": 1, "company_id": "1", "currency": "USD", "merchant_external_id": "my_merchant_id", "name": "My Merchant Name", "template_id": "my_merchant_template_id", "custom_data": null, "creation_date": "2023-12-07T16:09:08", "update_date": "2023-12-07T16:09:08" } ``` ``` -------------------------------- ### Specify Payment Instruction Details Source: https://docs.thunes.com/accept/v1/index_introduction Provides instructions for additional payment steps required in a HOST_TO_HOST payment order. This includes a URL for redirection and a message to display to the payer. ```json { "payment_instruction": { "url": "redirecturl3ds.com", "display_message": "Please proceed to do A, B and C to complete the payment" } } ``` -------------------------------- ### Get Account Balances Source: https://docs.thunes.com/accept/v1/index Retrieves a list of balance objects for all balance types: Available, Expected, Waiting for validation, and Up to date. ```APIDOC ## GET /websites/thunes_accept_v1/balances ### Description Retrieves a list of balance objects, including Available, Expected, Waiting for validation, and Up to date balances. ### Method GET ### Endpoint /websites/thunes_accept_v1/balances ### Parameters #### Query Parameters None ### Request Example ``` GET /websites/thunes_accept_v1/balances HTTP/1.1 ``` ### Response #### Success Response (200) - **balances** (array) - List of Balance objects. - **type** (string) - Type of balance (e.g., AVAILABLE, EXPECTED). - **date** (string) - Timestamp of the balance record. - **last_change_date** (string) - Timestamp of the last balance change. - **balance** (object) - Object containing amount and currency. - **amount** (number) - The balance amount. - **currency** (string) - The currency of the balance. #### Response Example ```json { "balances": [ { "type": "AVAILABLE", "date": "2024-01-11T14:56:51", "last_change_date": "2024-01-10T13:13:23", "balance": { "amount": 10234.97, "currency": "EUR" } }, { "type": "EXPECTED", "date": "2024-01-11T14:56:51", "last_change_date": "2024-01-10T13:13:23", "balance": { "amount": 11667.51, "currency": "EUR" } } ] } ``` ``` -------------------------------- ### Create Company Source: https://docs.thunes.com/accept/v1/index_introduction Onboards a new company, which represents an organization. Requires a template ID and a company name. Returns the created company object with its ID and creation details. ```http POST /v1/onboarding/companies HTTP/1.1 201 Success ``` ```json { "template_id": "My Company Name", "name": "my-template-id" } ```