Download OpenAPI specification:Download
This API is for creating new merchants as a part of a marketplace setup using Two. The merchants that are onboarded through the markeplace are able to sell products or services with Two as the payment solution.
Note: Only authorised merchants will have access to use this API. Feel free to contact support@two.inc if you think this API might be relevant for your marketplace setup.
Specifically:
Do a POST /v1/partner/<partner_id>/merchant
with the required information to sign up a merchant with Two.
Keep note of the merchant's id
in the response (hereby refered to as new_merchant_id
) in the response.
You can then use add X-Merchant-Id: <new_merchant_id>
to requests that require X-Api-Key
header and execute our endpoints on behalf of the merchant. For example:
GET /something
X-Api-Key: <your_api_key>
X-Merchant-Id: <new_merchant_id>
Do a POST /v1/order
from the Checkout API with by using secret_api_key
of the specific merchant as authentication.
GET /v1/partner/<partner_id>/merchant
GET /v1/partner/<partner_id>/merchant/<new_merchant_id>
PATCH /v1/partner/<partner_id>/merchant/<new_merchant_id>
Note: All Checkout API features are available for the merchant onboarded with Two.
This endpoint enables the partner / marketplace owner to create a new merchant who can sell products or services through Two.
Merchant created
Access denied
Merchant already exists
Error response
{- "short_name": "testshortname",
- "national_id": "13078389",
- "legal_name": "Two B2B LIMITED",
- "email": "test@two.inc",
- "email_erp": "erp@two.inc",
- "email_invoice": "invoice@two.inc",
- "phone": "12345678",
- "phone_invoice": "12345670",
- "address_lines": "Test Square",
- "address_city": "London",
- "address_postal_code": "AED 12A",
- "address_country_code": "GB",
- "fixed_fee_per_order": "0.0",
- "percentage_fee_per_order": "2.0",
- "country_code": "GB",
- "payment_provider_details": {
- "bank_account": {
- "description": "Bank Account Test",
- "branch_sort_code": "04-00-11",
- "local_account_number": "31126819",
- "country_code": "GB"
}
}
}
{- "account_enabled": true,
- "account_executive": null,
- "address_city": "OSLO",
- "address_country_code": "NO",
- "address_lines": "Testplass 1",
- "address_postal_code": "1111",
- "buyer_fallback_enabled": false,
- "country_code": "NO",
- "display_email": null,
- "display_name": "Two AS",
- "display_phone_number": null,
- "due_in_days": null,
- "email": "test@two.inc",
- "email_erp": "erp@two.inc",
- "email_invoice": "invoice@two.inc",
- "fee_currency": "NOK",
- "fixed_fee_per_order": "0.00",
- "id": "3d26e5b2-3ee6-466f-96b3-5591500eb4fb",
- "lead_type": null,
- "legal_name": "Two AS",
- "merchant_initiated_enabled": false,
- "national_id": "925976105",
- "onboarding_events": null,
- "partner": "two",
- "payee_accounts": [
- {
- "bank_account": {
- "bban": "11111111111",
- "bic": "DNBANOKK",
- "branch_sort_code": null,
- "country_code": "NO",
- "description": "Bank Account Test",
- "iban": "NO9311111111111",
- "id": null,
- "kid_type": null,
- "local_account_number": null,
- "organization_name": "Two AS",
- "organization_number": "925976105"
}, - "external_app_id": "",
- "external_merchant_id": "",
- "external_ref_url": "",
- "external_status": null,
- "id": null,
- "invoice_type": "FUNDED_INVOICE",
- "payout_plan": "DAILY",
- "provider_id": "APRILA",
- "recourse": false,
- "region": "NO"
}, - {
- "bank_account": {
- "bban": "11111111111",
- "bic": "DNBANOKK",
- "branch_sort_code": null,
- "country_code": "NO",
- "description": "Bank Account Test",
- "iban": "NO9311111111111",
- "id": null,
- "kid_type": null,
- "local_account_number": null,
- "organization_name": "Two AS",
- "organization_number": "925976105"
}, - "external_app_id": "",
- "external_merchant_id": "",
- "external_ref_url": "",
- "external_status": null,
- "id": null,
- "invoice_type": "DIRECT_INVOICE",
- "payout_plan": "MONTHLY",
- "provider_id": "MERCHANT",
- "recourse": false,
- "region": "NO"
}
], - "payment_provider_details": null,
- "percentage_fee_per_order": "2.000000",
- "phone": "+4712345678",
- "phone_invoice": "+4712345670",
- "platform_type": null,
- "product_type": null,
- "sales_development_rep": null,
- "short_name": "testshortname",
- "vat_number": null,
- "vat_registered": false,
- "web_developer": null,
}
This endpoint enables the partner / marketplace owner to retrieve all merchants associated with the partner / marketplace owner.
Merchant
Access denied
Merchant not found
Error response
[- {
- "account_enabled": true,
- "account_executive": null,
- "address_city": "OSLO",
- "address_country_code": "NO",
- "address_lines": "Testplass 1",
- "address_postal_code": "1111",
- "buyer_fallback_enabled": false,
- "country_code": "NO",
- "display_email": null,
- "display_name": "Two AS",
- "display_phone_number": null,
- "due_in_days": null,
- "email": "test@two.inc",
- "email_erp": "erp@two.inc",
- "email_invoice": "invoice@two.inc",
- "fee_currency": "NOK",
- "fixed_fee_per_order": "0.00",
- "id": "3d26e5b2-3ee6-466f-96b3-5591500eb4fb",
- "lead_type": null,
- "legal_name": "Two AS",
- "merchant_initiated_enabled": false,
- "national_id": "925976105",
- "onboarding_events": null,
- "partner": "two",
- "payee_accounts": [
- {
- "bank_account": {
- "bban": "11111111111",
- "bic": "DNBANOKK",
- "branch_sort_code": null,
- "country_code": "NO",
- "description": "Bank Account Test",
- "iban": "NO9311111111111",
- "id": null,
- "kid_type": null,
- "local_account_number": null,
- "organization_name": "Two AS",
- "organization_number": "925976105"
}, - "external_app_id": "",
- "external_merchant_id": "",
- "external_ref_url": "",
- "external_status": null,
- "id": null,
- "invoice_type": "FUNDED_INVOICE",
- "payout_plan": "DAILY",
- "provider_id": "APRILA",
- "recourse": false,
- "region": "NO"
}, - {
- "bank_account": {
- "bban": "11111111111",
- "bic": "DNBANOKK",
- "branch_sort_code": null,
- "country_code": "NO",
- "description": "Bank Account Test",
- "iban": "NO9311111111111",
- "id": null,
- "kid_type": null,
- "local_account_number": null,
- "organization_name": "Two AS",
- "organization_number": "925976105"
}, - "external_app_id": "",
- "external_merchant_id": "",
- "external_ref_url": "",
- "external_status": null,
- "id": null,
- "invoice_type": "DIRECT_INVOICE",
- "payout_plan": "MONTHLY",
- "provider_id": "MERCHANT",
- "recourse": false,
- "region": "NO"
}
], - "payment_provider_details": null,
- "percentage_fee_per_order": "2.000000",
- "phone": "+4712345678",
- "phone_invoice": "+4712345670",
- "platform_type": null,
- "product_type": null,
- "sales_development_rep": null,
- "short_name": "testshortname",
- "vat_number": null,
- "vat_registered": false,
- "web_developer": null,
}, - {
- "account_enabled": true,
- "account_executive": null,
- "address_city": "OSLO",
- "address_country_code": "NO",
- "address_lines": "Testplass 1",
- "address_postal_code": "1111",
- "buyer_fallback_enabled": false,
- "country_code": "NO",
- "display_email": null,
- "display_name": "Two AS",
- "display_phone_number": null,
- "due_in_days": null,
- "email": "test@two.inc",
- "email_erp": "erp@two.inc",
- "email_invoice": "invoice@two.inc",
- "fee_currency": "NOK",
- "fixed_fee_per_order": "0.00",
- "id": "3d26e5b2-3ee6-466f-96b3-5591500eb4fb",
- "lead_type": null,
- "legal_name": "Two AS",
- "merchant_initiated_enabled": false,
- "national_id": "925976105",
- "onboarding_events": null,
- "partner": "two",
- "payee_accounts": [
- {
- "bank_account": {
- "bban": "11111111111",
- "bic": "DNBANOKK",
- "branch_sort_code": null,
- "country_code": "NO",
- "description": "Bank Account Test",
- "iban": "NO9311111111111",
- "id": null,
- "kid_type": null,
- "local_account_number": null,
- "organization_name": "Two AS",
- "organization_number": "925976105"
}, - "external_app_id": "",
- "external_merchant_id": "",
- "external_ref_url": "",
- "external_status": null,
- "id": null,
- "invoice_type": "FUNDED_INVOICE",
- "payout_plan": "DAILY",
- "provider_id": "APRILA",
- "recourse": false,
- "region": "NO"
}, - {
- "bank_account": {
- "bban": "11111111111",
- "bic": "DNBANOKK",
- "branch_sort_code": null,
- "country_code": "NO",
- "description": "Bank Account Test",
- "iban": "NO9311111111111",
- "id": null,
- "kid_type": null,
- "local_account_number": null,
- "organization_name": "Two AS",
- "organization_number": "925976105"
}, - "external_app_id": "",
- "external_merchant_id": "",
- "external_ref_url": "",
- "external_status": null,
- "id": null,
- "invoice_type": "DIRECT_INVOICE",
- "payout_plan": "MONTHLY",
- "provider_id": "MERCHANT",
- "recourse": false,
- "region": "NO"
}
], - "payment_provider_details": null,
- "percentage_fee_per_order": "2.000000",
- "phone": "+4712345678",
- "phone_invoice": "+4712345670",
- "platform_type": null,
- "product_type": null,
- "sales_development_rep": null,
- "short_name": "testshortname",
- "vat_number": null,
- "vat_registered": false,
- "web_developer": null,
}
]
This endpoint enables the partner / marketplace owner to retrieve information about the merchant ID associated with the partner / marketplace owner.
Merchant response
Access denied
Merchant not found
Error response
{- "account_enabled": true,
- "account_executive": null,
- "address_city": "OSLO",
- "address_country_code": "NO",
- "address_lines": "Testplass 1",
- "address_postal_code": "1111",
- "buyer_fallback_enabled": false,
- "country_code": "NO",
- "display_email": null,
- "display_name": "Two AS",
- "display_phone_number": null,
- "due_in_days": null,
- "email": "test@two.inc",
- "email_erp": "erp@two.inc",
- "email_invoice": "invoice@two.inc",
- "fee_currency": "NOK",
- "fixed_fee_per_order": "0.00",
- "id": "3d26e5b2-3ee6-466f-96b3-5591500eb4fb",
- "lead_type": null,
- "legal_name": "Two AS",
- "merchant_initiated_enabled": false,
- "national_id": "925976105",
- "onboarding_events": null,
- "partner": "two",
- "payee_accounts": [
- {
- "bank_account": {
- "bban": "11111111111",
- "bic": "DNBANOKK",
- "branch_sort_code": null,
- "country_code": "NO",
- "description": "Bank Account Test",
- "iban": "NO9311111111111",
- "id": null,
- "kid_type": null,
- "local_account_number": null,
- "organization_name": "Two AS",
- "organization_number": "925976105"
}, - "external_app_id": "",
- "external_merchant_id": "",
- "external_ref_url": "",
- "external_status": null,
- "id": null,
- "invoice_type": "FUNDED_INVOICE",
- "payout_plan": "DAILY",
- "provider_id": "APRILA",
- "recourse": false,
- "region": "NO"
}, - {
- "bank_account": {
- "bban": "11111111111",
- "bic": "DNBANOKK",
- "branch_sort_code": null,
- "country_code": "NO",
- "description": "Bank Account Test",
- "iban": "NO9311111111111",
- "id": null,
- "kid_type": null,
- "local_account_number": null,
- "organization_name": "Two AS",
- "organization_number": "925976105"
}, - "external_app_id": "",
- "external_merchant_id": "",
- "external_ref_url": "",
- "external_status": null,
- "id": null,
- "invoice_type": "DIRECT_INVOICE",
- "payout_plan": "MONTHLY",
- "provider_id": "MERCHANT",
- "recourse": false,
- "region": "NO"
}
], - "payment_provider_details": null,
- "percentage_fee_per_order": "2.000000",
- "phone": "+4712345678",
- "phone_invoice": "+4712345670",
- "platform_type": null,
- "product_type": null,
- "sales_development_rep": null,
- "short_name": "testshortname",
- "vat_number": null,
- "vat_registered": false,
- "web_developer": null,
}
This endpoint enables the partner / marketplace owner to update the merchant ID associated with the partner / marketplace owner.
Success
Access denied
Merchant not found
Error response
{- "national_id": "925976105",
- "legal_name": "Two B2B LIMITED",
- "email": "test@two.inc",
- "email_erp": "erp@two.inc",
- "email_invoice": "invoice@two.inc",
- "phone": "12345678",
- "phone_invoice": "12345670",
- "address_lines": "Test Square",
- "address_city": "London",
- "address_postal_code": "AED 12A",
- "address_country_code": "GB",
- "payment_provider_details": {
- "bank_account": {
- "description": "Bank Account Test",
- "branch_sort_code": "04-00-11",
- "local_account_number": "31126819",
- "country_code": "GB"
}
}
}
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
Client' specific JSON
Access denied
Merchant not found
Error response
{ }