### POST /payment/balance-account/initiatePayout Source: https://docs.embed.co/openapi/openapi.yml Initiate a payout from a balance account. ```markdown ### Request Body **Content-Type:** application/json - **accountId** (string) (required): ID of the parent account that owns this entity (example: "21210021c2855007efa2d657018") - **amount** (integer): Integer amount in minor units (e.g. cents) specific to the currency. Example: 100 for €1.00 (example: 100) - **currencyCode** (string (BGN|CHF|CZK|DKK|EUR|GBP|HUF|NOK|PLN|RON|SEK|USD)): Currency codes supported for balance accounts. ISO 4217 currency codes (alpha3) (example: "EUR") ("BGN"|"CHF"|"CZK"|"DKK"|"EUR"|"GBP"|"HUF"|"NOK"|"PLN"|"RON"|"SEK"|"USD") - **paymentReference** (string): Payment reference which must be provided by the customer for reconciliation. Only provided if explicit matching is required (example: "payment-ref-12345") - **merchantReference** (string): Reference provided by the client to identify the payout (example: "client-ref-12345") - **metadata** (object): Free-form key-value pairs that can be supplied to tag and correlate resources. Constraints: - Maximum 20 key-value pairs per request - Maximum 20 characters per key - Maximum 80 characters per value - **invoiceId** (string): Example metadata value identifying the invoice in your system (example: "INV-12345") - **customerRef** (string): Example metadata value identifying the customer in your system (example: "CUST-98765") ### Responses #### 201 - Payout initiated successfully **PayoutResponse** - **id** (string) (required): Identifier of the resource (example: "21210021c2855007efa2d657018") - **status** (string (SETTLED|ERROR)) (required) (example: "SETTLED") ("SETTLED"|"ERROR") #### 400 - response **validationError** - **message** (unknown) (required) ("There is an error with the data provided in your request, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["Invalid reference: 112101b178d86011ef5d596d016"]) - **statusCode** (unknown) (required) ("400") - **code** (unknown) (required) ("MALFORMED_PARAMETERS") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required): Tracing information - **traceId** (string) (example: "1-6876b3f7-3c06da5c11e798d539a9087e") #### 401 - response **unauthorizedError** - **Message** (string) (required): Unauthorized access message (example: "User is not authorized to access this resource with an explicit deny") #### 404 - response **notFoundError** - **message** (unknown) (required) ("The requested resource cannot be found, please see details for more information") - **details** (object) (required) (example: {"transactionError":["Transaction tree not found"]}) - **statusCode** (unknown) (required) ("404") - **code** (unknown) (required) ("NOT_FOUND") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required): Tracing information - **traceId** (string) (example: "1-6876b3f7-3c06da5c11e798d539a9087e") #### 500 - response **internalServerError** - **message** (unknown) (required) ("Your request has returned an error, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["No error message provided"]) - **statusCode** (unknown) (required) ("500") - **code** (unknown) (required) ("API_ERROR") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required) (example: {}) ### Example Usage ```bash curl -X POST "https://apisbx.fungpayments.com/v2/payment/balance-account/initiatePayout" \ -H "Content-Type: application/json" \ -d '{ "accountId": "value", "amount": "value", "currencyCode": "value", "paymentReference": "payment-ref-12345", "merchantReference": "client-ref-12345", "metadata": "value" }' ``` ``` -------------------------------- ### GET /payment-contract/getPaymentContractList Source: https://docs.embed.co/openapi/openapi.yml Get a list of payment contracts ```markdown ### Responses #### 200 - List of payment contracts - Array of PaymentContractResponse #### 400 - response **validationError** - **message** (unknown) (required) ("There is an error with the data provided in your request, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["Invalid reference: 112101b178d86011ef5d596d016"]) - **statusCode** (unknown) (required) ("400") - **code** (unknown) (required) ("MALFORMED_PARAMETERS") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required): Tracing information - **traceId** (string) (example: "1-6876b3f7-3c06da5c11e798d539a9087e") #### 401 - response **unauthorizedError** - **Message** (string) (required): Unauthorized access message (example: "User is not authorized to access this resource with an explicit deny") #### 500 - response **internalServerError** - **message** (unknown) (required) ("Your request has returned an error, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["No error message provided"]) - **statusCode** (unknown) (required) ("500") - **code** (unknown) (required) ("API_ERROR") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required) (example: {}) ### Example Usage ```bash curl -X GET "https://apisbx.fungpayments.com/v2/payment-contract/getPaymentContractList" ``` ``` -------------------------------- ### GET /legal-entity/{id} Source: https://docs.embed.co/openapi/openapi.yml Gets a legal entity by id ```markdown ### Parameters - **id** (id, path, required): ID of the resource - **include** (getLegalEntityIncludeParameters, query, optional): Comma-separated list of additional fields to include in the response ### Responses #### 200 - Legal entity retrieved successfully **LegalEntity** - **id** (string) (required): Identifier of the resource (example: "21210021c2855007efa2d657018") - **associatedLegalEntities** (object) - **type** (unknown) (required) - **associations** (array (Association)) Array items: - **associatedWith** (string) (required): Identifier of the resource (example: "21210021c2855007efa2d657018") - **category** (string (OrganizationAssociation)) (required): The category of the association (example: "OrganizationAssociation") ("OrganizationAssociation") - **ownershipPercentage** (number): The percentage ownership (0-100) (example: 100) - **type** (string (ULTIMATE_PARENT_COMPANY)) (required): The relationship type (example: "ULTIMATE_PARENT_COMPANY") ("ULTIMATE_PARENT_COMPANY") - **organization** (object) (required) - **legalName** (string) (required): The organization's legal name. (Formally called businessName) (example: "Acme Corporation AS") - **doingBusinessAs** (string): The organization's trading name, if different from the registered legal name. (example: "Acme") - **registrationNumber** (string): The organization's registration number. (Formally companyRegistrationNumber) (example: "123456789") - **vatNumber** (string): The organization's VAT number. Needs to be present if tinNumber is empty. (example: "NO123456789MVA") - **taxIdNumber** (string): Tax number. Needs to be present if vatNumber is empty. (example: "123456789") - **type** (string (PUBLIC_LISTED_COMPANY|PRIVATE_LIMITED|SOLE_TRADER|NON_PROFIT|GENERAL_PARTNERSHIP|LIMITED_PARTNERSHIP)) (example: "PRIVATE_LIMITED") ("PUBLIC_LISTED_COMPANY"|"PRIVATE_LIMITED"|"SOLE_TRADER"|"NON_PROFIT"|"GENERAL_PARTNERSHIP"|"LIMITED_PARTNERSHIP") - **registeredAddress** (object) - **countryCode** (string (country-code)): The two-letter ISO 3166-1 alpha-2 country code (example: "NL") - **city** (string): The name of the city. Required if stateOrProvince is provided. If you specify the city, you must also send postalCode and street. - **postalCode** (string): The postal code. Required if stateOrProvince and/or city is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA. - **stateOrProvince** (string): The two-letter ISO 3166-2 state or province code. For example, CA in the US. If you specify the state or province, you must also send city, postalCode, and street. - **street** (string): The name of the street, and the house or building number. Required if stateOrProvince and/or city is provided. - **principalPlaceOfBusiness** (object) - **businessLines** (array (BusinessLine)): The businessLines of an organization. Max size of the array is 1, currently only one businessLine is supported. (example: [{"mcc":"5734","salesChannels":["ECOM"],"webData":{"exempt":false,"urls":["https://www.acme.com","https://shop.acme.com"]}}]) Array items: - **mcc** (string (0000|0742|1520|4111|4121|4784|4789|5074|5261|5399|5411|5441|5499|5511|5552|5611|5641|5651|5655|5661|5691|5699|5732|5734|5812|5813|5814|5921|5944|5945|5992|5995|5999|6300|6513|7011|7230|7298|7523|7832|7994|7995|7997|7999|8931|8999)) (required): The MCC code of this business line (example: "5734") ("0000"|"0742"|"1520"|"4111"|"4121"|"4784"|"4789"|"5074"|"5261"|"5399"|"5411"|"5441"|"5499"|"5511"|"5552"|"5611"|"5641"|"5651"|"5655"|"5661"|"5691"|"5699"|"5732"|"5734"|"5812"|"5813"|"5814"|"5921"|"5944"|"5945"|"5992"|"5995"|"5999"|"6300"|"6513"|"7011"|"7230"|"7298"|"7523"|"7832"|"7994"|"7995"|"7997"|"7999"|"8931"|"8999") - **salesChannels** (array (SalesChannel)) (required): A list of channels where goods or services are sold - **webData** (object) (required) - **exempt** (boolean) (required) (example: false) ("false") - **urls** (array (URL)) (required): List of website URLs where goods are sold (example: ["https://www.example.com","https://shop.example.com"]) - **documents** (array (Document)) Array items: - **id** (string) (required): Identifier of the resource (example: "21210021c2855007efa2d657018") - **accountId** (string) (required): Identifier of the resource (example: "21210021c2855007efa2d657018") - **files** (array (file)) (required) Array items: - **url** (string (uri)) (required): A URL (example: "https://www.example.com") - **expiresAt** (string (date-time)) (required): The date and time the download url expires (example: "2025-01-01T00:00:00Z") - **type** (string (PROOF_OF_ADDRESS|REGISTRATION_DOCUMENT|VAT_DOCUMENT|PROOF_OF_ORGANIZATION_TAX_INFO|PROOF_OF_OWNERSHIP|PROOF_OF_INDUSTRY|PROOF_OF_SIGNATORY|PROOF_OF_FUNDING_OR_WEALTH_SOURCE|IDENTITY_DOCUMENT|DRIVERS_LICENSE|PASSPORT|LIVE_SELFIE|PROOF_OF_NATIONAL_ID_NUMBER|PROOF_OF_ADDRESS|PROOF_OF_INDIVIDUAL_TAX_ID|PROOF_OF_RELATIONSHIP|CONSTITUTIONAL_DOCUMENT|BANK_STATEMENT)) (required) ("PROOF_OF_ADDRESS"|"REGISTRATION_DOCUMENT"|"VAT_DOCUMENT"|"PROOF_OF_ORGANIZATION_TAX_INFO"|"PROOF_OF_OWNERSHIP"|"PROOF_OF_INDUSTRY"|"PROOF_OF_SIGNATORY"|"PROOF_OF_FUNDING_OR_WEALTH_SOURCE"|"IDENTITY_DOCUMENT"|"DRIVERS_LICENSE"|"PASSPORT"|"LIVE_SELFIE"|"PROOF_OF_NATIONAL_ID_NUMBER"|"PROOF_OF_ADDRESS"|"PROOF_OF_INDIVIDUAL_TAX_ID"|"PROOF_OF_RELATIONSHIP"|"CONSTITUTIONAL_DOCUMENT"|"BANK_STATEMENT") - **name** (string): The name of the document (example: "Bank statement for account 1234567890") - **description** (string): Optional additional metadata or description about the document (example: "Account number shown in the top right corner") - **details** (object): Specific details extracted from the document - **type** (unknown) (required) - **associations** (array (Association)) Array items: - **individual** (object) (required) - **firstName** (string) (required): The individual's first name. Must not be blank. (example: "John") - **lastName** (string) (required): The individual's last name. Must not be blank. (example: "Doe") - **dateOfBirth** (string): The individual's date of birth, in YYYY-MM-DD format. Optional but highly recommended. (example: "1985-03-15") - **residentialAddress** (object) - **email** (string (email)): Email address (example: "john.doe@example.com") - **nationality** (string (country-code)): The two-letter ISO 3166-1 alpha-2 country code (example: "NL") - **phoneNumber** (string): A phone number, including the country code in international format (E.164). (example: "+3112345678") - **taxInformation** (array (TaxInformation)): The tax information of the individual. (example: [{"countryCode":"NO","taxIdNumber":"12345678901"}]) Array items: - **countryCode** (string (country-code)) (required): The two-letter ISO 3166-1 alpha-2 country code (example: "NL") - **taxIdNumber** (string) (required): The tax ID number (TIN) of the organization or individual. (example: "12345678901") #### 400 - response **validationError** - **message** (unknown) (required) ("There is an error with the data provided in your request, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["Invalid reference: 112101b178d86011ef5d596d016"]) - **statusCode** (unknown) (required) ("400") - **code** (unknown) (required) ("MALFORMED_PARAMETERS") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required): Tracing information - **traceId** (string) (example: "1-6876b3f7-3c06da5c11e798d539a9087e") #### 401 - Unauthorized **unauthorizedError** - **Message** (string) (required): Unauthorized access message (example: "User is not authorized to access this resource with an explicit deny") #### 404 - response **notFoundError** - **message** (unknown) (required) ("The requested resource cannot be found, please see details for more information") - **details** (object) (required) (example: {"transactionError":["Transaction tree not found"]}) - **statusCode** (unknown) (required) ("404") - **code** (unknown) (required) ("NOT_FOUND") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required): Tracing information - **traceId** (string) (example: "1-6876b3f7-3c06da5c11e798d539a9087e") ### Example Usage ```bash curl -X GET "https://apisbx.fungpayments.com/v2/legal-entity/{id}?include=value" ``` ``` -------------------------------- ### POST /payment/balance-account/initiatePayment Source: https://docs.embed.co/openapi/openapi.yml Initiate a payment against a balance account. The payment will be processed immediately if sufficient funds are available, or will wait for a topup based on the `pendingDays` setting. ```markdown ### Request Body **Content-Type:** application/json - **amount** (integer) (required): Integer amount in minor units (e.g. cents) specific to the currency. Example: 100 for €1.00 (example: 100) - **currencyCode** (string (AUD|BGN|BRL|CAD|CHF|CNY|CZK|DKK|EUR|GBP|HUF|INR|ISK|JPY|MXN|NOK|PLN|RON|SEK|USD|ZAR)) (required): ISO 4217 currency codes (alpha3) supported for payments (example: "EUR") ("AUD"|"BGN"|"BRL"|"CAD"|"CHF"|"CNY"|"CZK"|"DKK"|"EUR"|"GBP"|"HUF"|"INR"|"ISK"|"JPY"|"MXN"|"NOK"|"PLN"|"RON"|"SEK"|"USD"|"ZAR") - **accountId** (string) (required): ID of the parent account that owns this entity (example: "21210021c2855007efa2d657018") - **lineItems** (array (LineItem)): Line items for the payment Array items: - **name** (string) (required): Name of the line item (example: "Product A") - **description** (string): Description of the line item (example: "High-quality product") - **quantity** (integer): Quantity of the item (example: 2) - **unitPrice** (integer): Integer amount in minor units (e.g. cents) specific to the currency. Example: 100 for €1.00 (example: 100) - **imageUrl** (string (uri)): URL to the image of the item (example: "https://example.com/image.jpg") - **merchantReference** (string): Reference provided by the client to identify the payment (example: "client-ref-12345") - **metadata** (object): Free-form key-value pairs that can be supplied to tag and correlate resources. Constraints: - Maximum 20 key-value pairs per request - Maximum 20 characters per key - Maximum 80 characters per value - **invoiceId** (string): Example metadata value identifying the invoice in your system (example: "INV-12345") - **customerRef** (string): Example metadata value identifying the customer in your system (example: "CUST-98765") - **paymentMethodDetails** (object) - **balanceAccountId** (string) (required): ID of the balance account to use for payment (example: "21210021c2855007efa2d657018") - **description** (string): Description of the payment (example: "Payment for services") - **pendingDays** (integer): Number of days to wait for balance account topup before declining. Set to 0 for instant decline on insufficient funds. (example: 0) ### Responses #### 201 - Balance account payment processed successfully **InitiateBalanceAccountPaymentResponse** - **id** (string) (required): Identifier of the resource (example: "21210021c2855007efa2d657018") - **status** (string (INITIATED|DECLINED|AUTHORIZED|ERROR)) (required): Status of the payment (example: "INITIATED") ("INITIATED"|"DECLINED"|"AUTHORIZED"|"ERROR") - **action** (string (PRESENT_DETAILS)): Action required for the payment (example: "PRESENT_DETAILS") ("PRESENT_DETAILS") - **reason** (string (NOT_ENOUGH_BALANCE)): Reason for the payment status (example: "NOT_ENOUGH_BALANCE") ("NOT_ENOUGH_BALANCE") - **responseMessage** (string): Response message from the payment processor (example: "Payment initiated successfully") - **details** (object) (required): Details necessary to topup the balance account - **balanceAccountId** (string) (required): ID of the parent account that owns this entity (example: "21210021c2855007efa2d657018") - **transactionVariant** (string (balanceaccount)) (required): Transaction variant for balance account payments (example: "balanceaccount") ("balanceaccount") - **amount** (integer): Integer amount in minor units (e.g. cents) specific to the currency. Example: 100 for €1.00 (example: 100) - **currencyCode** (string (AUD|BGN|BRL|CAD|CHF|CNY|CZK|DKK|EUR|GBP|HUF|INR|ISK|JPY|MXN|NOK|PLN|RON|SEK|USD|ZAR)): ISO 4217 currency codes (alpha3) supported for payments (example: "EUR") ("AUD"|"BGN"|"BRL"|"CAD"|"CHF"|"CNY"|"CZK"|"DKK"|"EUR"|"GBP"|"HUF"|"INR"|"ISK"|"JPY"|"MXN"|"NOK"|"PLN"|"RON"|"SEK"|"USD"|"ZAR") - **paymentReference** (string): Payment reference which must be provided by the customer for reconciliation. Only provided if explicit matching is required (example: "payment-ref-12345") - **bankTransfer** (object): Details of the bank transfer necessary to topup the balance account (example: {"accountNumber":"GB29NWBK60161331926819","accountHolderName":"John Doe","bankName":"Barclays Bank","bankCode":"NWBKGB2L","accountNumberType":"IBAN","bankCodeType":"BIC"}) - **accountNumber** (string) (required): Account number as IBAN. (example: "NL45DEUTD2012036437") - **accountHolderName** (string) (required): Name of the account holder (example: "John Doe") - **bankName** (string) (required): Name of the bank or financial institution (example: "Barclays Bank") - **bankCode** (string) (required): Bank identification code: - BIC/SWIFT code for international transfers - Sort code for UK accounts - Routing number for US accounts - Other local bank codes (example: "NWBKGB2L") - **accountNumberType** (string (IBAN)) (required): Type of account number (example: "IBAN") ("IBAN") - **bankCodeType** (string (BIC)) (required): Type of bank code (example: "BIC") ("BIC") - **paymentReference** (string): Description included on the bank transfer to help identify the transaction on the recipient's bank statement. **Disclaimer**: The full value might be truncated or have special characters removed, subject to the payment scheme and recipient's bank handling. Payouts to UK bank accounts are limited to 18 characters in length, with the following characters allowed: A-Z, 0-9, space, /, -, . (example: "INVOICE-41252") - **metadata** (object): Free-form key-value pairs that can be supplied to tag and correlate resources. Constraints: - Maximum 20 key-value pairs per request - Maximum 20 characters per key - Maximum 80 characters per value - **invoiceId** (string): Example metadata value identifying the invoice in your system (example: "INV-12345") - **customerRef** (string): Example metadata value identifying the customer in your system (example: "CUST-98765") #### 400 - response **validationError** - **message** (unknown) (required) ("There is an error with the data provided in your request, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["Invalid reference: 112101b178d86011ef5d596d016"]) - **statusCode** (unknown) (required) ("400") - **code** (unknown) (required) ("MALFORMED_PARAMETERS") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required): Tracing information - **traceId** (string) (example: "1-6876b3f7-3c06da5c11e798d539a9087e") #### 401 - response **unauthorizedError** - **Message** (string) (required): Unauthorized access message (example: "User is not authorized to access this resource with an explicit deny") #### 500 - response **internalServerError** - **message** (unknown) (required) ("Your request has returned an error, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["No error message provided"]) - **statusCode** (unknown) (required) ("500") - **code** (unknown) (required) ("API_ERROR") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required) (example: {}) ### Example Usage ```bash curl -X POST "https://apisbx.fungpayments.com/v2/payment/balance-account/initiatePayment" \ -H "Content-Type: application/json" \ -d '{ "amount": "value", "currencyCode": "value", "accountId": "value", "lineItems": [ "value" ], "merchantReference": "client-ref-12345", "metadata": "value", "paymentMethodDetails": "value" }' ``` ``` -------------------------------- ### GET /payment-profile/getPaymentProfileByAccountId/{accountId} Source: https://docs.embed.co/openapi/openapi.yml Get a payment profile by account ID. ```markdown ### Parameters - **accountId** (id, path, required): ID of the account to retrieve payment profile for ### Responses #### 200 - Payment profile **PaymentProfileResponse** - **paymentProfileId** (string): Identifier of the resource (example: "21210021c2855007efa2d657018") - **accountId** (string): Identifier of the resource (example: "21210021c2855007efa2d657018") - **name** (string): Name of the payment profile - **description** (string): Description of the payment profile - **version** (integer): Version number of the profile - **profileDetails** (object): Configuration details of the profile - **paymentMethods** (array (PaymentMethod)) (required): List of payment methods available for the payment profile. A minimum of 1 payment method is required. Array items: - **transactionVariant** (string (card|openbanking|sepa|sepadd|ideal|vipps|balanceaccount|twint|swift)) (required) (example: "card") ("card"|"openbanking"|"sepa"|"sepadd"|"ideal"|"vipps"|"balanceaccount"|"twint"|"swift") - **active** (boolean) (required): Whether the payment method is active or not - **captureWhen** (string (MANUAL|INSTANT)): The capture mode of the transaction ("MANUAL"|"INSTANT") - **paymentContractType** (string (ONE_OFF|RECURRING|UNSCHEDULED_CHARGE)): The contract signed with a card tr ansaction ("ONE_OFF"|"RECURRING"|"UNSCHEDULED_CHARGE") - **cardConfiguration** (object): Additional configuration for card transactions - **authorizationType** (string (PRE_AUTH|FINAL_AUTH|ACCOUNT_STATUS)) (example: "PRE_AUTH") ("PRE_AUTH"|"FINAL_AUTH"|"ACCOUNT_STATUS") - **preAuthorizationType** (string (INCREMENTAL|STANDARD)) (example: "INCREMENTAL") ("INCREMENTAL"|"STANDARD") - **maximumAuthAmounts** (array (object)): Maximum authorization amounts per currency Array items: - **currencyCode** (string (AUD|BGN|BRL|CAD|CHF|CNY|CZK|DKK|EUR|GBP|HUF|INR|ISK|JPY|MXN|NOK|PLN|RON|SEK|USD|ZAR)): ISO 4217 currency codes (alpha3) supported for payments (example: "EUR") ("AUD"|"BGN"|"BRL"|"CAD"|"CHF"|"CNY"|"CZK"|"DKK"|"EUR"|"GBP"|"HUF"|"INR"|"ISK"|"JPY"|"MXN"|"NOK"|"PLN"|"RON"|"SEK"|"USD"|"ZAR") - **amount** (integer): Integer amount in minor units (e.g. cents) specific to the currency. Example: 100 for €1.00 (example: 100) - **threeds** (object): 3DS Configuration - **triggerType** (string (STATIC)): The trigger type of the 3DS transaction ("STATIC") - **wallets** (array (walletType)): The type of wallets accepted - **dynamicDescriptor** (string): Dynamic statement descriptor for the transaction (example: "My Company") #### 400 - response **validationError** - **message** (unknown) (required) ("There is an error with the data provided in your request, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["Invalid reference: 112101b178d86011ef5d596d016"]) - **statusCode** (unknown) (required) ("400") - **code** (unknown) (required) ("MALFORMED_PARAMETERS") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required): Tracing information - **traceId** (string) (example: "1-6876b3f7-3c06da5c11e798d539a9087e") #### 404 - response **notFoundError** - **message** (unknown) (required) ("The requested resource cannot be found, please see details for more information") - **details** (object) (required) (example: {"transactionError":["Transaction tree not found"]}) - **statusCode** (unknown) (required) ("404") - **code** (unknown) (required) ("NOT_FOUND") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required): Tracing information - **traceId** (string) (example: "1-6876b3f7-3c06da5c11e798d539a9087e") #### 500 - response **internalServerError** - **message** (unknown) (required) ("Your request has returned an error, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["No error message provided"]) - **statusCode** (unknown) (required) ("500") - **code** (unknown) (required) ("API_ERROR") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required) (example: {}) ### Example Usage ```bash curl -X GET "https://apisbx.fungpayments.com/v2/payment-profile/getPaymentProfileByAccountId/{accountId}" ``` ``` -------------------------------- ### POST /payment/open-banking/initiatePayment Source: https://docs.embed.co/openapi/openapi.yml Initiate a Open Banking payment. ```markdown ### Request Body **Content-Type:** application/json - **checkoutId** (string): ID of the checkout session (optional) - **amount** (integer) (required): Integer amount in minor units (e.g. cents) specific to the currency. Example: 100 for €1.00 (example: 100) - **currencyCode** (string (EUR)) (required): Currency code (only EUR supported) ("EUR") - **lineItems** (array (LineItem)): Details about the products sold or services provided Array items: - **name** (string) (required): Name of the line item (example: "Product A") - **description** (string): Description of the line item (example: "High-quality product") - **quantity** (integer): Quantity of the item (example: 2) - **unitPrice** (integer): Integer amount in minor units (e.g. cents) specific to the currency. Example: 100 for €1.00 (example: 100) - **imageUrl** (string (uri)): URL to the image of the item (example: "https://example.com/image.jpg") - **merchantReference** (string): A free-form reference to identify the transaction in your system - **ipAddress** (string (ipv4)): IP address of the customer initiating the payment - **accountId** (string) (required): Operating Account ID to which the payment will be credited - **seonDeviceFingerprint** (string): Device fingerprint for fraud detection - **expiresAt** (string (date-time)): When the payment expires (defaults to 7 days from now) - **metadata** (object): Free-form key-value pairs that can be supplied to tag and correlate resources. Constraints: - Maximum 20 key-value pairs per request - Maximum 20 characters per key - Maximum 80 characters per value - **invoiceId** (string): Example metadata value identifying the invoice in your system (example: "INV-12345") - **customerRef** (string): Example metadata value identifying the customer in your system (example: "CUST-98765") - **paymentMethodDetails** (object) (required) - **redirectUrl** (string) (required): URL to which the customer should be sent after the payment. Any payment results will be sent to this URL. ### Responses #### 201 - Open Banking payment initiated successfully **OpenBankingPaymentResponse** - **id** (string) (required): Identifier of the resource (example: "21210021c2855007efa2d657018") - **status** (string (AUTHORIZED|DECLINED|ERROR|INPROGRESS)) (required): Transaction status: - AUTHORIZED: Payment successfully authorized - DECLINED: Payment declined by issuer/acquirer - ERROR: Technical error occurred - INPROGRESS: 3DS authentication required - INITIATED: Payment initiated and requires further action to become `AUTHORIZED` (example: "AUTHORIZED") ("AUTHORIZED"|"DECLINED"|"ERROR"|"INPROGRESS") - **reason** (string (ACQUIRER_DECLINED|ACQUIRER_ERROR|ACQUIRER_UNAVAILABLE|INVALID_AMOUNT|INVALID_REQUEST|MALFORMED_PARAMETERS|INVALID_TRANSACTION_STATUS|NOT_ENOUGH_BALANCE|NOT_SUPPORTED|FULL_AMOUNT_CAPTURED|POSSIBLE_FRAUD|TRANSACTION_IN_PROGRESS)): Reason for the payment status ("ACQUIRER_DECLINED"|"ACQUIRER_ERROR"|"ACQUIRER_UNAVAILABLE"|"INVALID_AMOUNT"|"INVALID_REQUEST"|"MALFORMED_PARAMETERS"|"INVALID_TRANSACTION_STATUS"|"NOT_ENOUGH_BALANCE"|"NOT_SUPPORTED"|"FULL_AMOUNT_CAPTURED"|"POSSIBLE_FRAUD"|"TRANSACTION_IN_PROGRESS") - **details** (object) - **transactionVariant** (string (openbanking)): Payment method used ("openbanking") - **reference** (string) - **responseMessage** (string) - **errorCode** (string) - **paymentId** (string) - **expiration** (string) - **linkToken** (string) - **payee** (string) - **recipientId** (string) - **acquirerName** (string) - **acquirerAccountId** (string) - **redirectUrl** (string) - **metadata** (object): Free-form key-value pairs that can be supplied to tag and correlate resources. Constraints: - Maximum 20 key-value pairs per request - Maximum 20 characters per key - Maximum 80 characters per value - **invoiceId** (string): Example metadata value identifying the invoice in your system (example: "INV-12345") - **customerRef** (string): Example metadata value identifying the customer in your system (example: "CUST-98765") - **action** (string (REDIRECT_SHOPPER|AWAIT_EXTERNAL_ACTION|PRESENT_DETAILS)) ("REDIRECT_SHOPPER"|"AWAIT_EXTERNAL_ACTION"|"PRESENT_DETAILS") #### 400 - response **validationError** - **message** (unknown) (required) ("There is an error with the data provided in your request, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["Invalid reference: 112101b178d86011ef5d596d016"]) - **statusCode** (unknown) (required) ("400") - **code** (unknown) (required) ("MALFORMED_PARAMETERS") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required): Tracing information - **traceId** (string) (example: "1-6876b3f7-3c06da5c11e798d539a9087e") #### 500 - response **internalServerError** - **message** (unknown) (required) ("Your request has returned an error, please see details for more information") - **details** (object) (required) - **error** (array (string)) (example: ["No error message provided"]) - **statusCode** (unknown) (required) ("500") - **code** (unknown) (required) ("API_ERROR") - **version** (string) (required): API version (example: "v1") - **traceIds** (object) (required) (example: {}) ### Example Usage ```bash curl -X POST "https://apisbx.fungpayments.com/v2/payment/open-banking/initiatePayment" \ -H "Content-Type: application/json" \ -d '{ "checkoutId": "string", "amount": "value", "currencyCode": "EUR", "lineItems": [ "value" ], "merchantReference": "string", "ipAddress": "string", "accountId": "string", "seonDeviceFingerprint": "string", "expiresAt": "2023-01-01T00:00:00Z", "metadata": "value", "paymentMethodDetails": { "redirectUrl": "string" } }' ``` ```