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.
Address City (string) or Address City (null) (Address City) Default: null | |
CountryCodeEnum (string) or null Default: null | |
Address Lines (string) or Address Lines (null) (Address Lines) Default: null | |
Address Postal Code (string) or Address Postal Code (null) (Address Postal Code) Default: null | |
Display Name (string) or Display Name (null) (Display Name) Default: null | |
Email (string) or Email (null) (Email) Default: null | |
Email Erp (string) or Email Erp (null) (Email Erp) Default: null | |
Email Invoice (string) or Email Invoice (null) (Email Invoice) Default: null | |
Legal Name (string) or Legal Name (null) (Legal Name) Default: null | |
Logo Path (string) or Logo Path (null) (Logo Path) Default: null The logo URL, valid extensions are: .png, .svg | |
National Id (string) or National Id (null) (National Id) Default: null | |
PartnerPPDetailsSchema (object) or null Default: null | |
Phone (string) or Phone (null) (Phone) Default: null | |
Phone Invoice (string) or Phone Invoice (null) (Phone Invoice) Default: null | |
Vat Number (string) or Vat Number (null) (Vat Number) Default: null | |
Vat Registered (boolean) or Vat Registered (null) (Vat Registered) Default: null | |
Website (string) or Website (null) (Website) Default: null |
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": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
Client' specific JSON
Access denied
Merchant not found
Error response
{ }