Download OpenAPI specification:Download
This API is for creating orders connected to an online purchase through your solution. The API also functions as a central building block when using other Two APIs, e.g. Marketplace API, and Trade Account Onboarding API.
Specifically, the API enables you to:
Below you will find a description of a typical flow of how the different endpoints are called. However, you might want to deviate from this order depending on your setup. For inspiration you can find a sample implementation of Two at https://demo.two.inc
By using the Two Search API, you ensure that the user places an order on behalf of the correct organization. It enables an improved user experience and lowers the friction.
Use POST /v1/order_intent
to credit check your buyers during the checkout. Only enable Two as the payment option if the credit check is approved.
Collect the tracking_id
from the response of the order intent in order to connect the order_intent with the actual order being placed by the buyer.
Create an order by building a request body containing all required elements and call the POST /v1/order
endpoint.
APPROVED
.UNVERIFIED
, and redirect the user to the payment_url
.After completing the verfication, the user is redirected back to your order confirmation page.
On the order confirmation page use the POST /v1/order/<order_id>/confirm
endpoint to confirm that the user has arrived at the order confirmation page.
Use POST /v1/order/<order_id>/cancel
to cancel a specific order.
Use PUT /v1/order/<order_id>
with a specified request body to edit an order.
Use POST /v1/order/<order_id>/fulfilled
with a specified request body to fulfil all line items of an order.
Note: Include a request body in order to do a partial fulfillment.
Use POST /v1/order/<order_id>/refund
to refund a specific order.
Note: Include a request body in order to do a partial refund.
{- "address": {
- "city": "London",
- "postal_code": "EC2A 4BT",
- "postal_place": null,
- "street_address": "4 Crown Pl"
}
}
The endpoint enables the merchant to check in advance whether invoice payment is applicable as a payment method for the Buyer
. Two will perform a risk assessment and credit check using the data provided in the OrderIntent
before a boolean is returned as a result. If line_items
are provided Two will be able to do a more accurate assessment and the approval rate will in general increase.
Create order intent
Error response
{- "merchant_id": "32d8eb3f-8ac3-4aca-82b9-dbbd6f416cfb",
- "gross_amount": "120",
- "currency": "GBP",
- "order_origination": "ONLINE",
- "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "country_prefix": "GB",
- "organization_number": "13078389"
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "value": "5954d9e0-ebfb-4498-86a9-3141e8942dc8",
- "type": "SKU"
}, - {
- "value": "cece4007-028c-469c-b0d2-2c038b583b69",
- "type": "UPC"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "Art",
- "Home"
], - "part_number": "n/a"
}, - "name": "Whale poster",
- "gross_amount": "120",
- "net_amount": "100",
- "tax_amount": "20",
- "discount_amount": "0",
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.2",
- "type": "PHYSICAL",
- "unit_price": "100"
}
]
}
{- "approved": true,
- "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "company_type": "",
- "country_prefix": "GB",
- "organization_number": "13078389",
- "website": null
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "currency": "GBP",
- "decline_reason": null,
- "gross_amount": "120.00",
- "id": "5af5a991-8822-4b61-b892-2ffdd2931fba",
- "invoice_type": "FUNDED_INVOICE",
- "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "type": "SKU",
- "value": "5954d9e0-ebfb-4498-86a9-3141e8942dc8"
}, - {
- "type": "UPC",
- "value": "cece4007-028c-469c-b0d2-2c038b583b69"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "Home",
- "Art"
], - "part_number": "n/a"
}, - "discount_amount": "0.00",
- "gross_amount": "120.00",
- "id": "c5f65af4-3fdc-4c46-aa4e-8378b4ba0558",
- "line_item_reference": null,
- "name": "Whale poster",
- "net_amount": "100.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.200000",
- "type": "PHYSICAL",
- "unit_price": "100.00"
}
], - "merchant_id": "32d8eb3f-8ac3-4aca-82b9-dbbd6f416cfb",
- "merchant_short_name": "tillittestuk",
- "order_origination": "ONLINE",
- "tracking_id": "3987eb99-f726-436a-aed1-1c77a1ceb667"
}
The endpoint fetches a specific order intent.
Get order intent
Error response
{- "approved": true,
- "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "company_type": "",
- "country_prefix": "GB",
- "organization_number": "13078389",
- "website": null
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "currency": "GBP",
- "decline_reason": null,
- "gross_amount": "120.00",
- "id": "5af5a991-8822-4b61-b892-2ffdd2931fba",
- "invoice_type": "FUNDED_INVOICE",
- "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "type": "SKU",
- "value": "5954d9e0-ebfb-4498-86a9-3141e8942dc8"
}, - {
- "type": "UPC",
- "value": "cece4007-028c-469c-b0d2-2c038b583b69"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "Home",
- "Art"
], - "part_number": "n/a"
}, - "discount_amount": "0.00",
- "gross_amount": "120.00",
- "id": "c5f65af4-3fdc-4c46-aa4e-8378b4ba0558",
- "line_item_reference": null,
- "name": "Whale poster",
- "net_amount": "100.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.200000",
- "type": "PHYSICAL",
- "unit_price": "100.00"
}
], - "merchant_id": "32d8eb3f-8ac3-4aca-82b9-dbbd6f416cfb",
- "merchant_short_name": "tillittestuk",
- "order_origination": "ONLINE",
- "tracking_id": "3987eb99-f726-436a-aed1-1c77a1ceb667"
}
Endpoint to create a new order in Two's system. Once all the required order data has been added to the request body and the order has been created successfully, Two performs a credit check of the customer and updates the status
. In adition to general information about the order and its content, the response body contains the status of the credit check and payment_url
which is used for customer identification. After the verification step is completed successfully, the order will change state
. The order is now approved and verified, i.e. the order is placed. Later, the order has to be handled by the merchant, either through Two's API enpoints or the merchant portal. Note: When creating an order it is important to note that the invoice_type
, country_prefix
, and organization_number
has to match what the merchant has signed up for with Two.
Order created
Error response
{- "gross_amount": "120.00",
- "net_amount": "100.00",
- "currency": "GBP",
- "discount_amount": "0",
- "discount_rate": "0",
- "tax_amount": "20.00",
- "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "country_prefix": "GB",
- "organization_number": "13078389"
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "order_intent_id": "ORDER_INTENT_TRACKING_ID",
- "merchant_additional_info": "Additional line item information",
- "merchant_order_id": "YOUR_MERCHANT_ORDER_ID",
- "merchant_reference": "YOUR_MERCHANT_REFERENCE",
- "merchant_urls": {
- "merchant_cancel_order_url": "YOUR_MERCHANT_URL/cancel-order",
- "merchant_order_verification_pending_url": "YOUR_MERCHANT_URL/pending-order",
- "merchant_confirmation_url": "YOUR_MERCHANT_URL/confimation",
- "merchant_edit_order_url": "YOUR_MERCHANT_URL/edit-order",
- "merchant_invoice_url": "YOUR_MERCHANT_URL/invoice",
- "merchant_order_verification_failed_url": "YOUR_MERCHANT_URL/order-verification-failed",
- "merchant_shipping_document_url": "YOUR_MERCHANT_URL/shipping-document"
}, - "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "references": {
- "co": "Company CEO",
- "reference": "Firs floor office",
- "attn": "yo"
}, - "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "references": {
- "co": "Company CEO",
- "reference": "First floor office",
- "attn": "The receptionist"
}, - "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_details": {
- "carrier_name": "Example carrier",
- "expected_delivery_date": "2024-01-08",
- "tracking_number": "SHIPPING_TRACKING_NUMBER"
}, - "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "value": "YOUR_BARCODE_VALUE",
- "type": "SKU"
}, - {
- "value": "YOUR_BARCODE_VALUE",
- "type": "UPC"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "YOUR_CATEGORY_A",
- "YOUR_CATEGORY_B"
], - "part_number": "MANUFACTURER_PART_NUMBER"
}, - "name": "Whale poster",
- "gross_amount": "120.00",
- "net_amount": "100.00",
- "tax_amount": "20.00",
- "discount_amount": "0",
- "line_item_reference": "YOUR_LINE_ITEM_REFERENCE",
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.20",
- "type": "PHYSICAL",
- "unit_price": "100"
}
]
}
{- "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "company_type": "",
- "country_prefix": "GB",
- "organization_number": "13078389",
- "website": null
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "buyer_department": null,
- "buyer_project": null,
- "buyer_purchase_order_number": null,
- "buyer_reference": null,
- "credit_note_url": null,
- "currency": "GBP",
- "date_created": "2024-01-01 14:02:02.002222",
- "date_fulfilled": null,
- "date_updated": "2024-01-01 14:02:02.002222",
- "decline_reason": null,
- "discount_amount": "0.00",
- "discount_rate": "0.000000",
- "elapsed_time_ms": null,
- "electronic_invoice_recipient": null,
- "external_order_id": null,
- "external_order_status": null,
- "fixed_fee": null,
- "gross_amount": "120.00",
- "id": "f36cfe22-5a46-4830-a8fa-0f2d7236e269",
- "invoice_details": {
- "due_date": null,
- "due_in_days": 14,
- "id": "a49d8790-306c-4d3e-830f-fbdc99676cf8",
- "invoice_issue_date": null,
- "invoice_number": null,
- "payee": null,
- "payment_reference": null,
- "payment_reference_message": "",
- "payment_reference_ocr": "",
- "payment_reference_type": null,
- "payment_status": null
}, - "invoice_insurance_provider": "NO_INSURANCE",
- "invoice_type": "FUNDED_INVOICE",
- "invoice_url": null,
- "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "type": "SKU",
- "value": "YOUR_BARCODE_VALUE"
}, - {
- "type": "UPC",
- "value": "YOUR_BARCODE_VALUE"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "YOUR_CATEGORY_A",
- "YOUR_CATEGORY_B"
], - "part_number": "MANUFACTURER_PART_NUMBER"
}, - "discount_amount": "0.00",
- "gross_amount": "120.00",
- "id": "21d3fd7f-1e12-466a-bbbb-09ab38bfa869",
- "line_item_reference": "YOUR_LINE_ITEM_REFERENCE",
- "name": "Whale poster",
- "net_amount": "100.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.200000",
- "type": "PHYSICAL",
- "unit_price": "100.00"
}
], - "merchant_additional_info": "Additional line item information",
- "merchant_id": "1115e2ea-f6d2-4129-930f-3657600555ba",
- "merchant_order_id": "YOUR_MERCHANT_ORDER_ID",
- "merchant_payout_account_alias": null,
- "merchant_reference": "YOUR_MERCHANT_REFERENCE",
- "merchant_short_name": "tillit",
- "merchant_urls": {
- "merchant_cancel_order_url": "YOUR_MERCHANT_URL/cancel-order",
- "merchant_confirmation_url": "YOUR_MERCHANT_URL/confimation",
- "merchant_document_urls": null,
- "merchant_edit_order_url": "YOUR_MERCHANT_URL/edit-order",
- "merchant_invoice_url": "YOUR_MERCHANT_URL/invoice",
- "merchant_order_callback_auth": null,
- "merchant_order_callback_url": null,
- "merchant_order_verification_failed_url": "YOUR_MERCHANT_URL/order-verification-failed",
- "merchant_order_verification_pending_url": "YOUR_MERCHANT_URL/pending-order",
- "merchant_order_verified_url": null,
- "merchant_shipping_document_url": "YOUR_MERCHANT_URL/shipping-document"
}, - "net_amount": "100.00",
- "order_note": null,
- "order_origination": "ONLINE",
- "order_placed_date": "2024-01-01 14:02:02.002222",
- "order_revision": null,
- "order_type": "BUYER_INITIATED",
- "original_order_id": null,
- "parent_order_id": null,
- "percentage_fee": null,
- "recurring": false,
- "recurring_details": null,
- "refunds": null,
- "root_order_id": null,
- "sale_country_code": null,
- "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_details": {
- "address_attn": null,
- "address_co": null,
- "address_reference": null,
- "carrier_name": "Example carrier",
- "delivery_method": null,
- "expected_delivery_date": "2024-01-08",
- "id_required_on_delivery": null,
- "tracking_number": "SHIPPING_TRACKING_NUMBER"
}, - "state": "UNVERIFIED",
- "status": "APPROVED",
- "tax_amount": "20.00",
- "tax_subtotals": null,
- "total_fee": null,
- "tracking_id": null,
- "vendor_id": null,
- "vendor_name": null
}
Endpoint to retrieve details related to a previously created order. The endpoint is typically used to check that the order has been verified successfully, in addition to other relevant state
and status
changes.
OK
Error response
{- "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "company_type": "",
- "country_prefix": "GB",
- "organization_number": "13078389",
- "website": null
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "buyer_department": null,
- "buyer_project": null,
- "buyer_purchase_order_number": null,
- "buyer_reference": null,
- "credit_note_url": null,
- "currency": "GBP",
- "date_created": "2024-01-01 14:02:02.002222",
- "date_fulfilled": null,
- "date_updated": "2024-01-01 14:02:02.002222",
- "decline_reason": null,
- "discount_amount": "0.00",
- "discount_rate": "0.000000",
- "elapsed_time_ms": null,
- "electronic_invoice_recipient": null,
- "external_order_id": null,
- "external_order_status": null,
- "fixed_fee": null,
- "gross_amount": "120.00",
- "id": "f36cfe22-5a46-4830-a8fa-0f2d7236e269",
- "invoice_details": {
- "due_date": null,
- "due_in_days": 14,
- "id": "a49d8790-306c-4d3e-830f-fbdc99676cf8",
- "invoice_issue_date": null,
- "invoice_number": null,
- "payee": null,
- "payment_reference": null,
- "payment_reference_message": "",
- "payment_reference_ocr": "",
- "payment_reference_type": null,
- "payment_status": null
}, - "invoice_insurance_provider": "NO_INSURANCE",
- "invoice_type": "FUNDED_INVOICE",
- "invoice_url": null,
- "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "type": "SKU",
- "value": "YOUR_BARCODE_VALUE"
}, - {
- "type": "UPC",
- "value": "YOUR_BARCODE_VALUE"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "YOUR_CATEGORY_A",
- "YOUR_CATEGORY_B"
], - "part_number": "MANUFACTURER_PART_NUMBER"
}, - "discount_amount": "0.00",
- "gross_amount": "120.00",
- "id": "21d3fd7f-1e12-466a-bbbb-09ab38bfa869",
- "line_item_reference": "YOUR_LINE_ITEM_REFERENCE",
- "name": "Whale poster",
- "net_amount": "100.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.200000",
- "type": "PHYSICAL",
- "unit_price": "100.00"
}
], - "merchant_additional_info": "Additional line item information",
- "merchant_id": "1115e2ea-f6d2-4129-930f-3657600555ba",
- "merchant_order_id": "YOUR_MERCHANT_ORDER_ID",
- "merchant_payout_account_alias": null,
- "merchant_reference": "YOUR_MERCHANT_REFERENCE",
- "merchant_short_name": "tillit",
- "merchant_urls": {
- "merchant_cancel_order_url": "YOUR_MERCHANT_URL/cancel-order",
- "merchant_confirmation_url": "YOUR_MERCHANT_URL/confimation",
- "merchant_document_urls": null,
- "merchant_edit_order_url": "YOUR_MERCHANT_URL/edit-order",
- "merchant_invoice_url": "YOUR_MERCHANT_URL/invoice",
- "merchant_order_callback_auth": null,
- "merchant_order_callback_url": null,
- "merchant_order_verification_failed_url": "YOUR_MERCHANT_URL/order-verification-failed",
- "merchant_order_verification_pending_url": "YOUR_MERCHANT_URL/pending-order",
- "merchant_order_verified_url": null,
- "merchant_shipping_document_url": "YOUR_MERCHANT_URL/shipping-document"
}, - "net_amount": "100.00",
- "order_note": null,
- "order_origination": "ONLINE",
- "order_placed_date": "2024-01-01 14:02:02.002222",
- "order_revision": null,
- "order_type": "BUYER_INITIATED",
- "original_order_id": null,
- "parent_order_id": null,
- "percentage_fee": null,
- "recurring": false,
- "recurring_details": null,
- "refunds": null,
- "root_order_id": null,
- "sale_country_code": null,
- "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_details": {
- "address_attn": null,
- "address_co": null,
- "address_reference": null,
- "carrier_name": "Example carrier",
- "delivery_method": null,
- "expected_delivery_date": "2024-01-08",
- "id_required_on_delivery": null,
- "tracking_number": "SHIPPING_TRACKING_NUMBER"
}, - "state": "UNVERIFIED",
- "status": "APPROVED",
- "tax_amount": "20.00",
- "tax_subtotals": null,
- "total_fee": null,
- "tracking_id": null,
- "vendor_id": null,
- "vendor_name": null
}
Endpoint to edit a previously created order which has not been fulfilled. The request body may contain changes related items, quantity, prices, etc.
OK
Error response
{- "gross_amount": "100",
- "net_amount": "100",
- "currency": "GBP",
- "discount_amount": "0",
- "discount_rate": "0",
- "tax_amount": "0",
- "invoice_details": {
- "due_date": null,
- "due_in_days": 14,
- "id": "171728b6-a185-4c55-8bd8-538aa2cb9ca9",
- "invoice_issue_date": null,
- "invoice_number": null,
- "payee": null,
- "payment_reference": null,
- "payment_reference_message": "",
- "payment_reference_ocr": "",
- "payment_reference_type": null,
- "payment_status": null
}, - "recurring": false,
- "buyer_department": null,
- "buyer_project": null,
- "buyer_purchase_order_number": null,
- "buyer_reference": "string",
- "line_items": [
- {
- "description": "This is a nice game",
- "details": {
- "barcodes": [
- {
- "type": "SKU",
- "value": "5954d9e0-ebfb-4498-86a9-3141e8942dc8"
}, - {
- "type": "UPC",
- "value": "cece4007-028c-469c-b0d2-2c038b583b69"
}
], - "brand": "CD Projekt Red",
- "categories": [
- "Games",
- "Entertainment"
], - "part_number": "n/a"
}, - "discount_amount": "0.00",
- "gross_amount": "100.00",
- "id": "ae3b8967-2bec-4a5b-8922-7a0acf2f9424",
- "line_item_reference": null,
- "name": "Witcher III - The wild hunt",
- "net_amount": "100.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "00",
- "tax_class_name": "VAT 0%",
- "tax_rate": "0.2",
- "type": "DIGITAL",
- "unit_price": "100.00"
}
], - "merchant_order_id": "02f98015-3309-48a3-8ded-ffc4285d06d0",
- "merchant_reference": "Example reference",
- "merchant_additional_info": "Example additional info",
- "recurring_details": null,
- "shipping_details": {
- "carrier_name": "UPS",
- "expected_delivery_date": "2021-01-31",
- "tracking_number": "track1234567890"
}, - "order_note": "Example note",
- "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "references": {
- "co": "Company CEO",
- "reference": "Firs floor office",
- "attn": "yo"
}, - "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "references": {
- "co": "Company CEO",
- "reference": "First floor office",
- "attn": "The receptionist"
}, - "region": "GB",
- "street_address": "1 Hacker Way"
}, - "tax_subtotals": null
}
{- "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "company_type": "",
- "country_prefix": "GB",
- "organization_number": "13078389",
- "website": null
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "buyer_department": null,
- "buyer_project": null,
- "buyer_purchase_order_number": null,
- "buyer_reference": null,
- "credit_note_url": null,
- "currency": "GBP",
- "date_created": "2024-01-01 14:02:02.002222",
- "date_fulfilled": null,
- "date_updated": "2024-01-01 14:02:02.002222",
- "decline_reason": null,
- "discount_amount": "0.00",
- "discount_rate": "0.000000",
- "elapsed_time_ms": null,
- "electronic_invoice_recipient": null,
- "external_order_id": null,
- "external_order_status": null,
- "fixed_fee": null,
- "gross_amount": "120.00",
- "id": "f36cfe22-5a46-4830-a8fa-0f2d7236e269",
- "invoice_details": {
- "due_date": null,
- "due_in_days": 14,
- "id": "a49d8790-306c-4d3e-830f-fbdc99676cf8",
- "invoice_issue_date": null,
- "invoice_number": null,
- "payee": null,
- "payment_reference": null,
- "payment_reference_message": "",
- "payment_reference_ocr": "",
- "payment_reference_type": null,
- "payment_status": null
}, - "invoice_insurance_provider": "NO_INSURANCE",
- "invoice_type": "FUNDED_INVOICE",
- "invoice_url": null,
- "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "type": "SKU",
- "value": "YOUR_BARCODE_VALUE"
}, - {
- "type": "UPC",
- "value": "YOUR_BARCODE_VALUE"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "YOUR_CATEGORY_A",
- "YOUR_CATEGORY_B"
], - "part_number": "MANUFACTURER_PART_NUMBER"
}, - "discount_amount": "0.00",
- "gross_amount": "120.00",
- "id": "21d3fd7f-1e12-466a-bbbb-09ab38bfa869",
- "line_item_reference": "YOUR_LINE_ITEM_REFERENCE",
- "name": "Whale poster",
- "net_amount": "100.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.200000",
- "type": "PHYSICAL",
- "unit_price": "100.00"
}
], - "merchant_additional_info": "Additional line item information",
- "merchant_id": "1115e2ea-f6d2-4129-930f-3657600555ba",
- "merchant_order_id": "YOUR_MERCHANT_ORDER_ID",
- "merchant_payout_account_alias": null,
- "merchant_reference": "YOUR_MERCHANT_REFERENCE",
- "merchant_short_name": "tillit",
- "merchant_urls": {
- "merchant_cancel_order_url": "YOUR_MERCHANT_URL/cancel-order",
- "merchant_confirmation_url": "YOUR_MERCHANT_URL/confimation",
- "merchant_document_urls": null,
- "merchant_edit_order_url": "YOUR_MERCHANT_URL/edit-order",
- "merchant_invoice_url": "YOUR_MERCHANT_URL/invoice",
- "merchant_order_callback_auth": null,
- "merchant_order_callback_url": null,
- "merchant_order_verification_failed_url": "YOUR_MERCHANT_URL/order-verification-failed",
- "merchant_order_verification_pending_url": "YOUR_MERCHANT_URL/pending-order",
- "merchant_order_verified_url": null,
- "merchant_shipping_document_url": "YOUR_MERCHANT_URL/shipping-document"
}, - "net_amount": "100.00",
- "order_note": null,
- "order_origination": "ONLINE",
- "order_placed_date": "2024-01-01 14:02:02.002222",
- "order_revision": null,
- "order_type": "BUYER_INITIATED",
- "original_order_id": null,
- "parent_order_id": null,
- "percentage_fee": null,
- "recurring": false,
- "recurring_details": null,
- "refunds": null,
- "root_order_id": null,
- "sale_country_code": null,
- "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_details": {
- "address_attn": null,
- "address_co": null,
- "address_reference": null,
- "carrier_name": "Example carrier",
- "delivery_method": null,
- "expected_delivery_date": "2024-01-08",
- "id_required_on_delivery": null,
- "tracking_number": "SHIPPING_TRACKING_NUMBER"
}, - "state": "UNVERIFIED",
- "status": "APPROVED",
- "tax_amount": "20.00",
- "tax_subtotals": null,
- "total_fee": null,
- "tracking_id": null,
- "vendor_id": null,
- "vendor_name": null
}
{- "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "company_type": "",
- "country_prefix": "GB",
- "organization_number": "13078389",
- "website": null
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "buyer_department": null,
- "buyer_project": null,
- "buyer_purchase_order_number": null,
- "buyer_reference": null,
- "credit_note_url": null,
- "currency": "GBP",
- "date_created": "2024-01-01 14:02:02.002222",
- "date_fulfilled": null,
- "date_updated": "2024-01-01 14:02:02.002222",
- "decline_reason": null,
- "discount_amount": "0.00",
- "discount_rate": "0.000000",
- "elapsed_time_ms": null,
- "electronic_invoice_recipient": null,
- "external_order_id": null,
- "external_order_status": null,
- "fixed_fee": null,
- "gross_amount": "120.00",
- "id": "f36cfe22-5a46-4830-a8fa-0f2d7236e269",
- "invoice_details": {
- "due_date": null,
- "due_in_days": 14,
- "id": "a49d8790-306c-4d3e-830f-fbdc99676cf8",
- "invoice_issue_date": null,
- "invoice_number": null,
- "payee": null,
- "payment_reference": null,
- "payment_reference_message": "",
- "payment_reference_ocr": "",
- "payment_reference_type": null,
- "payment_status": null
}, - "invoice_insurance_provider": "NO_INSURANCE",
- "invoice_type": "FUNDED_INVOICE",
- "invoice_url": null,
- "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "type": "SKU",
- "value": "YOUR_BARCODE_VALUE"
}, - {
- "type": "UPC",
- "value": "YOUR_BARCODE_VALUE"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "YOUR_CATEGORY_A",
- "YOUR_CATEGORY_B"
], - "part_number": "MANUFACTURER_PART_NUMBER"
}, - "discount_amount": "0.00",
- "gross_amount": "120.00",
- "id": "21d3fd7f-1e12-466a-bbbb-09ab38bfa869",
- "line_item_reference": "YOUR_LINE_ITEM_REFERENCE",
- "name": "Whale poster",
- "net_amount": "100.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.200000",
- "type": "PHYSICAL",
- "unit_price": "100.00"
}
], - "merchant_additional_info": "Additional line item information",
- "merchant_id": "1115e2ea-f6d2-4129-930f-3657600555ba",
- "merchant_order_id": "YOUR_MERCHANT_ORDER_ID",
- "merchant_payout_account_alias": null,
- "merchant_reference": "YOUR_MERCHANT_REFERENCE",
- "merchant_short_name": "tillit",
- "merchant_urls": {
- "merchant_cancel_order_url": "YOUR_MERCHANT_URL/cancel-order",
- "merchant_confirmation_url": "YOUR_MERCHANT_URL/confimation",
- "merchant_document_urls": null,
- "merchant_edit_order_url": "YOUR_MERCHANT_URL/edit-order",
- "merchant_invoice_url": "YOUR_MERCHANT_URL/invoice",
- "merchant_order_callback_auth": null,
- "merchant_order_callback_url": null,
- "merchant_order_verification_failed_url": "YOUR_MERCHANT_URL/order-verification-failed",
- "merchant_order_verification_pending_url": "YOUR_MERCHANT_URL/pending-order",
- "merchant_order_verified_url": null,
- "merchant_shipping_document_url": "YOUR_MERCHANT_URL/shipping-document"
}, - "net_amount": "100.00",
- "order_note": null,
- "order_origination": "ONLINE",
- "order_placed_date": "2024-01-01 14:02:02.002222",
- "order_revision": null,
- "order_type": "BUYER_INITIATED",
- "original_order_id": null,
- "parent_order_id": null,
- "percentage_fee": null,
- "recurring": false,
- "recurring_details": null,
- "refunds": null,
- "root_order_id": null,
- "sale_country_code": null,
- "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_details": {
- "address_attn": null,
- "address_co": null,
- "address_reference": null,
- "carrier_name": "Example carrier",
- "delivery_method": null,
- "expected_delivery_date": "2024-01-08",
- "id_required_on_delivery": null,
- "tracking_number": "SHIPPING_TRACKING_NUMBER"
}, - "state": "UNVERIFIED",
- "status": "APPROVED",
- "tax_amount": "20.00",
- "tax_subtotals": null,
- "total_fee": null,
- "tracking_id": null,
- "vendor_id": null,
- "vendor_name": null
}
Re-run credit check to renew our credit guarantee. If an external funding provider owns the order, we cancel that external order, re-create it, and update order.external_order_id
on our internal order. Note that Norwegian Orders funded by Kredinor that have already been partially fulfilled cannot be renewed via our credit renewal end point.
OK
Accepted. Order has already been renewed
Bad Request
Error response
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
Endpoint to change the state of an order to cancelled, and void the invoice. An order cannot change state to cancelled after being fulfilled. After fulfilment the merchant will have to refund the order instead.
OK
Error response
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
This endpoint is used to fetch the associated fulfilled orders and refunds for a given order ID. If the requested order is linked to a partially fulfilled order, the endpoint returns all associated fulfilled orders.
OK
Error response
{- "fulfilled_orders": [
- {
- "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "company_type": "",
- "country_prefix": "GB",
- "organization_number": "13078389",
- "website": null
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "buyer_department": null,
- "buyer_project": null,
- "buyer_purchase_order_number": null,
- "buyer_reference": null,
- "credit_note_url": null,
- "currency": "GBP",
- "date_created": "2024-01-01 14:02:02.002222",
- "date_fulfilled": null,
- "date_updated": "2024-01-01 14:02:02.002222",
- "decline_reason": null,
- "discount_amount": "0.00",
- "discount_rate": "0.000000",
- "elapsed_time_ms": null,
- "electronic_invoice_recipient": null,
- "external_order_id": null,
- "external_order_status": null,
- "fixed_fee": null,
- "gross_amount": "120.00",
- "id": "f36cfe22-5a46-4830-a8fa-0f2d7236e269",
- "invoice_details": {
- "due_date": null,
- "due_in_days": 14,
- "id": "a49d8790-306c-4d3e-830f-fbdc99676cf8",
- "invoice_issue_date": null,
- "invoice_number": null,
- "payee": null,
- "payment_reference": null,
- "payment_reference_message": "",
- "payment_reference_ocr": "",
- "payment_reference_type": null,
- "payment_status": null
}, - "invoice_insurance_provider": "NO_INSURANCE",
- "invoice_type": "FUNDED_INVOICE",
- "invoice_url": null,
- "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "type": "SKU",
- "value": "YOUR_BARCODE_VALUE"
}, - {
- "type": "UPC",
- "value": "YOUR_BARCODE_VALUE"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "YOUR_CATEGORY_A",
- "YOUR_CATEGORY_B"
], - "part_number": "MANUFACTURER_PART_NUMBER"
}, - "discount_amount": "0.00",
- "gross_amount": "120.00",
- "id": "21d3fd7f-1e12-466a-bbbb-09ab38bfa869",
- "line_item_reference": "YOUR_LINE_ITEM_REFERENCE",
- "name": "Whale poster",
- "net_amount": "100.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.200000",
- "type": "PHYSICAL",
- "unit_price": "100.00"
}
], - "merchant_additional_info": "Additional line item information",
- "merchant_id": "1115e2ea-f6d2-4129-930f-3657600555ba",
- "merchant_order_id": "YOUR_MERCHANT_ORDER_ID",
- "merchant_payout_account_alias": null,
- "merchant_reference": "YOUR_MERCHANT_REFERENCE",
- "merchant_short_name": "tillit",
- "merchant_urls": {
- "merchant_cancel_order_url": "YOUR_MERCHANT_URL/cancel-order",
- "merchant_confirmation_url": "YOUR_MERCHANT_URL/confimation",
- "merchant_document_urls": null,
- "merchant_edit_order_url": "YOUR_MERCHANT_URL/edit-order",
- "merchant_invoice_url": "YOUR_MERCHANT_URL/invoice",
- "merchant_order_callback_auth": null,
- "merchant_order_callback_url": null,
- "merchant_order_verification_failed_url": "YOUR_MERCHANT_URL/order-verification-failed",
- "merchant_order_verification_pending_url": "YOUR_MERCHANT_URL/pending-order",
- "merchant_order_verified_url": null,
- "merchant_shipping_document_url": "YOUR_MERCHANT_URL/shipping-document"
}, - "net_amount": "100.00",
- "order_note": null,
- "order_origination": "ONLINE",
- "order_placed_date": "2024-01-01 14:02:02.002222",
- "order_revision": null,
- "order_type": "BUYER_INITIATED",
- "original_order_id": null,
- "parent_order_id": null,
- "percentage_fee": null,
- "recurring": false,
- "recurring_details": null,
- "refunds": null,
- "root_order_id": null,
- "sale_country_code": null,
- "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_details": {
- "address_attn": null,
- "address_co": null,
- "address_reference": null,
- "carrier_name": "Example carrier",
- "delivery_method": null,
- "expected_delivery_date": "2024-01-08",
- "id_required_on_delivery": null,
- "tracking_number": "SHIPPING_TRACKING_NUMBER"
}, - "state": "UNVERIFIED",
- "status": "APPROVED",
- "tax_amount": "20.00",
- "tax_subtotals": null,
- "total_fee": null,
- "tracking_id": null,
- "vendor_id": null,
- "vendor_name": null
}
], - "refunds": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "amount": "100.00",
- "currency": "GB",
- "refund_no": 0,
- "credit_note_url": "string",
- "line_items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "description": "string",
- "line_item_reference": "string",
- "discount_amount": 0,
- "gross_amount": "100.00",
- "net_amount": "100.00",
- "quantity": "1",
- "unit_price": "100.00",
- "tax_amount": "0.00",
- "tax_rate": "0.00",
- "tax_class_name": "VAT 0%",
- "quantity_unit": "pcs",
- "image_url": "string",
- "product_page_url": "string",
- "type": "PHYSICAL",
- "details": {
- "brand": "string",
- "categories": [
- "string"
], - "barcodes": [
- {
- "value": null,
- "type": null
}
], - "part_number": "string"
}, - "prototype_id": "bd06d90d-fdef-4d6b-9438-11f160f219ab",
- "vendor_name": "string",
- "merchant_child_order_id": "string"
}
], - "reason": "Damage",
- "tax_subtotals": [
- {
- "tax_amount": "0.00",
- "taxable_amount": "0.00",
- "tax_rate": "0.00"
}
], - "buyer_refund_surcharges": [
- {
- "surcharge_type": "return_fee",
- "amount": 0,
- "description": "string",
- "tax_rate": 0
}
], - "refund_reference": "string",
- "refund_date": "2019-08-24T14:15:22Z"
}
]
}
Endpoint to fully or partially fulfill an order based on the line item selection and gross, net amount values. If fully fulfilled, the endpoint changes the state of an order to FULFILLED
. If partial fulfilment, the endpoint changes the status of an order to PARTIAL
and creates a child order with 'FULFILLED' state. Note that fulfilment is an async process may take a few minutes to realise.
OK
Error response
{- "invoice_issue_date": "2019-08-24",
- "invoice_number": "string",
- "partial": {
- "gross_amount": "100",
- "net_amount": "100",
- "discount_amount": "0",
- "tax_amount": "0",
- "line_items": [
- {
- "description": "This is a nice game",
- "details": {
- "barcodes": [
- {
- "value": "5954d9e0-ebfb-4498-86a9-3141e8942dc8",
- "type": "SKU"
}, - {
- "value": "cece4007-028c-469c-b0d2-2c038b583b69",
- "type": "UPC"
}
], - "brand": "CD Projekt Red",
- "categories": [
- "Games",
- "Entertainment"
], - "part_number": "n/a"
}, - "name": "Witcher III - The wild hunt",
- "gross_amount": "100",
- "net_amount": "100",
- "tax_amount": "0",
- "discount_amount": "0",
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_class_name": "VAT 0%",
- "tax_rate": "0.0",
- "type": "DIGITAL",
- "unit_price": "100"
}
]
}
}
{- "fulfilled_order": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}, - "remained_order": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}, - "elapsed_time_ms": { }
}
This end point will cancel any unfulfilled parts of the original root order, and in doing so will complete the order.
OK
Error response
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
Endpoint to change the state of the order (similar to "capture" for card payment). The invoice will be issued and distributed to the customer. The endpoint changes the state
of a specified order to FULFILLED
.
OK
Error response
{- "invoice_number": "string"
}
{- "billing_address": {
- "city": "London",
- "country": "GB",
- "id": "dd428005-6e25-49b5-a33b-96edb706464b",
- "organization_name": "Test",
- "postal_code": "1237",
- "preferred": null,
- "region": "test",
- "street_address": "test2"
}, - "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "company_type": null,
- "country_prefix": "GB",
- "organization_number": "13078389",
- "website": null
}, - "representative": {
- "email": "shabib@two.inc",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498324"
}
}, - "buyer_department": null,
- "buyer_project": null,
- "buyer_purchase_order_number": null,
- "buyer_reference": null,
- "credit_note_url": null,
- "currency": "GBP",
- "date_created": "2024-01-01 14:02:02.002222",
- "date_fulfilled": "2024-01-01 14:02:02.002222",
- "date_updated": "2024-01-01 14:02:02.002222",
- "decline_reason": null,
- "discount_amount": "0.00",
- "discount_rate": "0.000000",
- "elapsed_time_ms": null,
- "electronic_invoice_recipient": null,
- "external_order_id": null,
- "external_order_status": null,
- "fixed_fee": "0.00",
- "fulfilled_order": null,
- "gross_amount": "432.00",
- "id": "03c90e8b-9089-44fd-9c66-656620cbc2c2",
- "invoice_details": {
- "due_date": "2024-01-01",
- "due_in_days": 14,
- "id": "9b20417a-0767-48f1-99f7-70455956d686",
- "invoice_issue_date": "2023-12-25",
- "invoice_number": "999900008",
- "payee": {
- "bban": null,
- "bic": null,
- "branch_sort_code": "040072",
- "country_code": "GB",
- "description": null,
- "iban": null,
- "id": null,
- "kid_type": null,
- "local_account_number": "24908983",
- "organization_name": "Two B2B Ltd",
- "organization_number": "13622447"
}, - "payment_reference": "MOCK_REF_001",
- "payment_reference_message": "",
- "payment_reference_ocr": "",
- "payment_reference_type": "assigned_by_mock_njord",
- "payment_status": null
}, - "invoice_insurance_provider": "NO_INSURANCE",
- "invoice_type": "FUNDED_INVOICE",
- "line_items": [
- {
- "description": "This is a plant",
- "details": {
- "barcodes": [
- {
- "type": "testbarcode",
- "value": "1234"
}
], - "brand": "testbrand",
- "categories": [
- "cat1",
- "testcategory"
], - "part_number": "testnumber"
}, - "discount_amount": "0.00",
- "gross_amount": "200.00",
- "id": "0da31ac8-7dae-40cd-be0d-90005b53c39e",
- "line_item_reference": null,
- "name": "Aluminium Plant",
- "net_amount": "180.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 25%",
- "tax_rate": "0.100000",
- "type": "PHYSICAL",
- "unit_price": "0.00"
}, - {
- "description": "This is a plant",
- "details": {
- "barcodes": [
- {
- "type": "testbarcode",
- "value": "1234"
}
], - "brand": "testbrand",
- "categories": [
- "cat1",
- "testcategory"
], - "part_number": "testnumber"
}, - "discount_amount": "0.00",
- "gross_amount": "200.00",
- "id": "22752aea-db42-40e5-b241-319408d10757",
- "line_item_reference": null,
- "name": "Aluminium Plant",
- "net_amount": "180.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 25%",
- "tax_rate": "0.100000",
- "type": "PHYSICAL",
- "unit_price": "0.00"
}
], - "merchant_additional_info": null,
- "merchant_id": "32d8eb3f-8ac3-4aca-82b9-dbbd6f416cfb",
- "merchant_order_id": "32d8eb3f-8ac3-4aca-82b9-dbbd6f416cfb",
- "merchant_payout_account_alias": null,
- "merchant_reference": null,
- "merchant_short_name": "tillittestuk",
- "merchant_urls": {
- "merchant_cancel_order_url": null,
- "merchant_document_urls": null,
- "merchant_edit_order_url": null,
- "merchant_invoice_url": null,
- "merchant_order_callback_auth": null,
- "merchant_order_callback_url": null,
- "merchant_order_verification_failed_url": null,
- "merchant_order_verification_pending_url": null,
- "merchant_order_verified_url": null,
- "merchant_shipping_document_url": null
}, - "net_amount": "360.00",
- "order_note": null,
- "order_origination": "ONLINE",
- "order_placed_date": "2024-01-01 14:02:02.002222",
- "order_revision": null,
- "order_type": "BUYER_INITIATED",
- "original_order_id": null,
- "other_partial_orders": null,
- "parent_order_id": null,
- "percentage_fee": "0.000000",
- "recurring": false,
- "recurring_details": null,
- "refunds": null,
- "remained_order": null,
- "root_order_id": null,
- "sale_country_code": null,
- "shipping_address": {
- "city": "London",
- "country": "GB",
- "id": "dd428005-6e25-49b5-a33b-96edb706464b",
- "organization_name": "Test",
- "postal_code": "1237",
- "preferred": null,
- "region": "test",
- "street_address": "test2"
}, - "shipping_details": null,
- "state": "FULFILLED",
- "status": "APPROVED",
- "tax_amount": "72.00",
- "tax_subtotals": null,
- "total_fee": "0.00",
- "tracking_id": null,
- "vendor_id": null,
- "vendor_name": null
}
Additionally following query params can be specified to manage pagination settings limit
- set limit items per page (default=100) page
- page number (calculated from limit and total results) to display offset
- items offset - alternative to page
(pages not calculated if this param provided) Returns 401 error code if not authenticated. Returns 404 error code if merchant is not specified.
OK
Error response
{- "items": [
- {
- "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "buyer": {
- "company": {
- "company_name": "TWO B2B LTD",
- "company_type": "",
- "country_prefix": "GB",
- "organization_number": "13078389",
- "website": null
}, - "representative": {
- "email": "john.doe@twob2bltd.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+447516498321"
}
}, - "buyer_department": null,
- "buyer_project": null,
- "buyer_purchase_order_number": null,
- "buyer_reference": null,
- "credit_note_url": null,
- "currency": "GBP",
- "date_created": "2024-01-01 14:02:02.002222",
- "date_fulfilled": null,
- "date_updated": "2024-01-01 14:02:02.002222",
- "decline_reason": null,
- "discount_amount": "0.00",
- "discount_rate": "0.000000",
- "elapsed_time_ms": null,
- "electronic_invoice_recipient": null,
- "external_order_id": null,
- "external_order_status": null,
- "fixed_fee": null,
- "gross_amount": "120.00",
- "id": "f36cfe22-5a46-4830-a8fa-0f2d7236e269",
- "invoice_details": {
- "due_date": null,
- "due_in_days": 14,
- "id": "a49d8790-306c-4d3e-830f-fbdc99676cf8",
- "invoice_issue_date": null,
- "invoice_number": null,
- "payee": null,
- "payment_reference": null,
- "payment_reference_message": "",
- "payment_reference_ocr": "",
- "payment_reference_type": null,
- "payment_status": null
}, - "invoice_insurance_provider": "NO_INSURANCE",
- "invoice_type": "FUNDED_INVOICE",
- "invoice_url": null,
- "line_items": [
- {
- "description": "Blue whale poster",
- "details": {
- "barcodes": [
- {
- "type": "SKU",
- "value": "YOUR_BARCODE_VALUE"
}, - {
- "type": "UPC",
- "value": "YOUR_BARCODE_VALUE"
}
], - "brand": "Whale Posters INC",
- "categories": [
- "YOUR_CATEGORY_A",
- "YOUR_CATEGORY_B"
], - "part_number": "MANUFACTURER_PART_NUMBER"
}, - "discount_amount": "0.00",
- "gross_amount": "120.00",
- "id": "21d3fd7f-1e12-466a-bbbb-09ab38bfa869",
- "line_item_reference": "YOUR_LINE_ITEM_REFERENCE",
- "name": "Whale poster",
- "net_amount": "100.00",
- "prototype_id": null,
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.200000",
- "type": "PHYSICAL",
- "unit_price": "100.00"
}
], - "merchant_additional_info": "Additional line item information",
- "merchant_id": "1115e2ea-f6d2-4129-930f-3657600555ba",
- "merchant_order_id": "YOUR_MERCHANT_ORDER_ID",
- "merchant_payout_account_alias": null,
- "merchant_reference": "YOUR_MERCHANT_REFERENCE",
- "merchant_short_name": "tillit",
- "merchant_urls": {
- "merchant_cancel_order_url": "YOUR_MERCHANT_URL/cancel-order",
- "merchant_confirmation_url": "YOUR_MERCHANT_URL/confimation",
- "merchant_document_urls": null,
- "merchant_edit_order_url": "YOUR_MERCHANT_URL/edit-order",
- "merchant_invoice_url": "YOUR_MERCHANT_URL/invoice",
- "merchant_order_callback_auth": null,
- "merchant_order_callback_url": null,
- "merchant_order_verification_failed_url": "YOUR_MERCHANT_URL/order-verification-failed",
- "merchant_order_verification_pending_url": "YOUR_MERCHANT_URL/pending-order",
- "merchant_order_verified_url": null,
- "merchant_shipping_document_url": "YOUR_MERCHANT_URL/shipping-document"
}, - "net_amount": "100.00",
- "order_note": null,
- "order_origination": "ONLINE",
- "order_placed_date": "2024-01-01 14:02:02.002222",
- "order_revision": null,
- "order_type": "BUYER_INITIATED",
- "original_order_id": null,
- "parent_order_id": null,
- "percentage_fee": null,
- "recurring": false,
- "recurring_details": null,
- "refunds": null,
- "root_order_id": null,
- "sale_country_code": null,
- "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "id": "cdb98f98-14c2-47b8-8b7c-87d8313ac6aa",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "preferred": null,
- "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_details": {
- "address_attn": null,
- "address_co": null,
- "address_reference": null,
- "carrier_name": "Example carrier",
- "delivery_method": null,
- "expected_delivery_date": "2024-01-08",
- "id_required_on_delivery": null,
- "tracking_number": "SHIPPING_TRACKING_NUMBER"
}, - "state": "UNVERIFIED",
- "status": "APPROVED",
- "tax_amount": "20.00",
- "tax_subtotals": null,
- "total_fee": null,
- "tracking_id": null,
- "vendor_id": null,
- "vendor_name": null
}
], - "page": {
- "current": 1000,
- "items": 100,
- "limit": 10,
- "pages": 1
}
}
Endpoint to retrieve verification data related to an order. This endpoint is typically used by merchants to get data related to the verification links sent for an order.
OK
Error response
{- "link_sent": true,
- "link_recipient_phone_number": "+46XXXXXXXXXX",
- "link_timestamp": "2024-01-01 14:02:02.002222",
- "link_verification_successful": true
}
Within the notification, the buyer will receive a link that they need to visit to complete their order verification. Note that the order verification call only works for orders placed by valid trade account customers, and at this time, only SMS is supported.
Trigger order verification notification to buyer
Error response
{- "channel": "sms"
}
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
Endpoint to refund an order. The customer will receive a credit note with a description of the items that are credited. An order can also be partially refunded by specifying the exact items and amount that are refunded in the JSON request body.
Fully or partially refund an order that has been fulfilled
Refund order
Error response
{- "reason": "Example reason",
- "amount": "100.00",
- "currency": "GBP"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "amount": "100.00",
- "currency": "GB",
- "refund_no": 0,
- "credit_note_url": "string",
- "line_items": [
- [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "description": "string",
- "line_item_reference": "string",
- "discount_amount": 0,
- "gross_amount": "100.00",
- "net_amount": "100.00",
- "quantity": "1",
- "unit_price": "100.00",
- "tax_amount": "0.00",
- "tax_rate": "0.00",
- "tax_class_name": "VAT 0%",
- "quantity_unit": "pcs",
- "image_url": "string",
- "product_page_url": "string",
- "type": "PHYSICAL",
- "details": {
- "brand": "string",
- "categories": [
- "string"
], - "barcodes": [
- {
- "value": "string",
- "type": "string"
}
], - "part_number": "string"
}, - "prototype_id": "bd06d90d-fdef-4d6b-9438-11f160f219ab",
- "vendor_name": "string",
- "merchant_child_order_id": "string"
}
]
], - "reason": "Damage",
- "tax_subtotals": [
- {
- "tax_amount": "0.00",
- "taxable_amount": "0.00",
- "tax_rate": "0.00"
}
], - "buyer_refund_surcharges": [
- [
- {
- "surcharge_type": "return_fee",
- "amount": 0,
- "description": "string",
- "tax_rate": 0
}
]
], - "refund_reference": "string",
- "refund_date": "2019-08-24T14:15:22Z"
}
Endpoint for merchants to provide data about a user's browser and client. Once the required WebClientData has been added to the request body and the resource has been created successfully, a tracking_id
is returned which the merchant should pass along when they create an order later.
Endpoint for providing web client data.
Error response
{- "ip_address": "string",
- "user_agent": "string",
- "http_method": "string",
- "fingerprint": {
- "visitor_id": "string",
- "request_id": "string",
- "visitorFound": true,
- "meta": { },
- "confidence": {
- "score": 0,
- "revision": "string"
}
}
}
{- "tracking_id": "string"
}
Return an object representing the current status of an invoice, including payment status.
OK
Order not found
Order not invoiced
Error response
{- "payee": {
- "bban": "string",
- "iban": "string",
- "bic": "string",
- "country_code": "string",
- "branch_sort_code": "string",
- "local_account_number": "string",
- "organization_name": "string",
- "organization_number": "string",
- "description": "string"
}, - "payment_reference": "string",
- "payment_reference_type": "string",
- "payment_reference_message": "string",
- "payment_reference_ocr": "string",
- "due_in_days": "30",
- "invoice_number": "string",
- "invoicing_group_id": "string",
- "due_date": "2024-01-31",
- "id": "ac8f7621-3214-478b-84ad-3f7ada4df83a",
- "gross_amount": "200.00",
- "net_amount": "160.00",
- "tax_amount": "40.00",
- "total_paid_amount": "0.00",
- "total_credited_amount": "0.00",
- "total_collected_amount": "0.00",
- "total_recoursed_amount": "0.00",
- "unpaid_amount": "200.00",
- "statement_number": "123",
- "billing_period_id": "75bbbadc-95b0-4b4e-bade-3641204a135c",
- "last_updated": "2023-07-07T13:00:25.552211"
}
Endpoint to fetch the invoice for a fulfilled order using the global order ID. The order ID is returned as part of the create order response and is under the key of id
at the highest level of the JSON response.
OK
Error response
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
Endpoint to fetch the invoice for a fulfilled order by using the global invoice ID. The invoice ID is provided in the response as part of the invoice_details
object with field id
.
OK
Error response
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
Only fulfilled orders can have invoices.
OK
Error response
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
This will credit note the current invoice and create a new invoice, with new invoice number, with the requested fields updated. This will not work for overdue invoices or invoices with a status of NOT_PAID.
OK
Error response
{- "buyer_purchase_order_number": "string",
- "buyer_reference": "string",
- "order_note": "string",
- "buyer_project": "string",
- "billing_address": {
- "organization_name": "string",
- "street_address": "string",
- "country": "AT",
- "postal_code": "string",
- "city": "string",
- "region": ""
}, - "line_item_updates": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "line_item_reference": "string",
- "discount_amount": "0.00",
- "gross_amount": "100.00",
- "net_amount": "100.00",
- "quantity": "1",
- "unit_price": "100.00",
- "tax_amount": "0.00",
- "tax_rate": "0.00",
- "tax_class_name": "VAT 0%",
- "quantity_unit": "pcs"
}
]
}
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
Create a new API key. An existing API key is required to authenticate the request. If you do not have an API key yet, this can be obtained from the merchant portal integration panel. Note that production API key is only available after a manual review once onboarding and integration is complete. The existing key will remain valid until it is revoked.
API key schema
Access denied
Merchant not found
Error response
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "hint": "string",
- "label": "string",
- "date_created": "2019-08-24T14:15:22Z",
- "date_last_used": "2019-08-24T14:15:22Z",
- "date_expiry": "2019-08-24T14:15:22Z",
- "usage_count": 0,
- "api_key": "string"
}
Retrieve a list of metadata associated with active API keys.
List of API key metadata
Merchant not found
Error response
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "hint": "string",
- "label": "string",
- "date_created": "2019-08-24T14:15:22Z",
- "date_last_used": "2019-08-24T14:15:22Z",
- "date_expiry": "2019-08-24T14:15:22Z",
- "usage_count": 0
}
]
Retrieve metadata related to an active API key.
API key metadata
Merchant or API key not found
Error response
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "hint": "string",
- "label": "string",
- "date_created": "2019-08-24T14:15:22Z",
- "date_last_used": "2019-08-24T14:15:22Z",
- "date_expiry": "2019-08-24T14:15:22Z",
- "usage_count": 0
}
Revoke an existing API key. Once revoked, the key will stop working for subsequent requests.
API key deleted successfully
Access denied
Merchant not found
Error response
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
Endpoint for downloading Two settlement report from start_date to end_date as .xlsx
or .csv
.
Two settlement report for a specified period.
Bad request.
Error response
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
Endpoint for downloading Two settlement report by settlement ID as .xlsx
or .csv
.
Two settlement report for a specified period.
Bad request.
Error response
{- "error_code": "string",
- "error_details": "string",
- "error_message": "string",
- "error_json": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
], - "error_trace_id": "string"
}
List of recent payouts from Two
Bad request.
Error response
{- "items": [
- {
- "settlement_id": "string",
- "settlement_date": "2019-08-24",
- "recipient_account_number": "string",
- "recipient_account_name": "string",
- "recipient_iban": "string",
- "recipient_bban": "string",
- "funding_provider": "string",
- "funding_provider_account_holder_name": "string",
- "funding_provider_account_number": "string",
- "payout_currency": "GBP",
- "payout_amount": "10000.00",
- "payment_reference": "string"
}
], - "page": {
- "items": 0,
- "limit": 0,
- "current": 0,
- "pages": 0
}
}