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.
Deprecated in favour of Company API.
Company address
Error response
{- "address": null
}
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
{- "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"
}
}, - "currency": "GBP",
- "gross_amount": "120",
- "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": [
- "Art",
- "Home"
], - "part_number": "n/a"
}, - "discount_amount": "0",
- "gross_amount": "120",
- "name": "Whale poster",
- "net_amount": "100",
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.2",
- "type": "PHYSICAL",
- "unit_price": "100"
}
], - "merchant_id": "32d8eb3f-8ac3-4aca-82b9-dbbd6f416cfb",
- "order_origination": "ONLINE"
}
{- "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
{- "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "references": {
- "attn": "yo",
- "co": "Company CEO",
- "reference": "Firs floor office"
}, - "region": "GB",
- "street_address": "1 Hacker Way"
}, - "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"
}
}, - "currency": "GBP",
- "discount_amount": "0",
- "discount_rate": "0",
- "gross_amount": "120.00",
- "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",
- "gross_amount": "120.00",
- "line_item_reference": "YOUR_LINE_ITEM_REFERENCE",
- "name": "Whale poster",
- "net_amount": "100.00",
- "quantity": 1,
- "quantity_unit": "pcs",
- "tax_amount": "20.00",
- "tax_class_name": "VAT 20%",
- "tax_rate": "0.20",
- "type": "PHYSICAL",
- "unit_price": "100"
}
], - "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_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_order_verification_pending_url": "YOUR_MERCHANT_URL/pending-order",
- "merchant_shipping_document_url": "YOUR_MERCHANT_URL/shipping-document"
}, - "net_amount": "100.00",
- "order_intent_id": "ORDER_INTENT_TRACKING_ID",
- "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "references": {
- "attn": "The receptionist",
- "co": "Company CEO",
- "reference": "First floor office"
}, - "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_details": {
- "carrier_name": "Example carrier",
- "expected_delivery_date": "2024-01-08",
- "tracking_number": "SHIPPING_TRACKING_NUMBER"
}, - "tax_amount": "20.00"
}
{- "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
{- "billing_address": {
- "city": "Menlo Park",
- "country": "GB",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "references": {
- "attn": "yo",
- "co": "Company CEO",
- "reference": "Firs floor office"
}, - "region": "GB",
- "street_address": "1 Hacker Way"
}, - "buyer_department": null,
- "buyer_project": null,
- "buyer_purchase_order_number": null,
- "buyer_reference": "string",
- "currency": "GBP",
- "discount_amount": "0",
- "discount_rate": "0",
- "gross_amount": "100",
- "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
}, - "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_additional_info": "Example additional info",
- "merchant_order_id": "02f98015-3309-48a3-8ded-ffc4285d06d0",
- "merchant_reference": "Example reference",
- "net_amount": "100",
- "order_note": "Example note",
- "recurring": false,
- "recurring_details": null,
- "shipping_address": {
- "city": "Menlo Park",
- "country": "GB",
- "organization_name": "TWO B2B LTD",
- "postal_code": "SW17 8BY",
- "references": {
- "attn": "The receptionist",
- "co": "Company CEO",
- "reference": "First floor office"
}, - "region": "GB",
- "street_address": "1 Hacker Way"
}, - "shipping_details": {
- "carrier_name": "UPS",
- "expected_delivery_date": "2021-01-31",
- "tracking_number": "track1234567890"
}, - "tax_amount": "0",
- "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": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
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": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
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": null
}
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.
Invoice Issue Date (string) or Invoice Issue Date (null) (Invoice Issue Date) Default: null | |
Invoice Number (string) or Invoice Number (null) (Invoice Number) Default: null Invoice number to be used for invoice if merchant is set up to provide own invoice numbers by Two. If not, then we will generate an auto-incremented one for you. Note this can not be set for orders in Norway. | |
PartialFulfillOrderSchema (object) or null Default: null The partially fulfilled order |
OK
Error response
{- "invoice_issue_date": null,
- "invoice_number": null,
- "partial": null
}
{- "fulfilled_order": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}, - "remained_order": null,
- "elapsed_time_ms": null
}
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": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
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
.
Invoice Number (string) or Invoice Number (null) (Invoice Number) Default: null Invoice number to be used for invoice if merchant is set up to provide own invoice numbers by Two. If not, then we will generate an auto-incremented one for you. Note this can not be set for orders in Norway. |
OK
Error response
{- "invoice_number": null
}
{- "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.
End Date (string) or End Date (null) (End Date) Default: null Last date that should be included in the list of orders. | |
Limit (integer) or Limit (null) (Limit) Default: null Limit the number of results per page to this number. | |
Offset (integer) or Offset (null) (Offset) Default: null Number of offset results by (page parameter is disregarded if provided). | |
Page (integer) or Page (null) (Page) Default: null Page number to display results for. | |
Start Date (string) or Start Date (null) (Start Date) Default: null First date that should be included in the list of orders. |
OK
Error response
{- "items": 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": null
}
Within the notification, the buyer will receive a link that they need to visit to complete their order verification.
Trigger order verification notification to buyer
Error response
{- "channel": "sms"
}
{- "error_code": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
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.
Idempotency-Key (string) or Idempotency-Key (null) (Idempotency-Key) Default: null |
Refund request
Can be either a full or a partial refund
Refund order
Error response
{- "amount": "100.00",
- "currency": "GBP",
- "reason": "Example reason"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "amount": "100.00",
- "currency": "NOK",
- "refund_no": 0,
- "credit_note_number": "string",
- "credit_note_url": null,
- "line_items": null,
- "reason": "Damage",
- "tax_subtotals": null,
- "buyer_refund_surcharges": null,
- "refund_reference": null,
- "refund_date": null
}
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": null,
- "http_method": null,
- "fingerprint": null
}
{- "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
{- "billing_period_id": "75bbbadc-95b0-4b4e-bade-3641204a135c",
- "due_date": "2024-01-31",
- "due_in_days": "30",
- "gross_amount": "200.00",
- "id": "ac8f7621-3214-478b-84ad-3f7ada4df83a",
- "invoice_number": "string",
- "invoicing_group_id": "string",
- "last_updated": "2023-07-07T13:00:25.552211",
- "net_amount": "160.00",
- "payee": {
- "bban": "string",
- "bic": "string",
- "branch_sort_code": "string",
- "country_code": "string",
- "description": "string",
- "iban": "string",
- "local_account_number": "string",
- "organization_name": "string",
- "organization_number": "string"
}, - "payment_reference": "string",
- "payment_reference_message": "string",
- "payment_reference_ocr": "string",
- "payment_reference_type": "string",
- "statement_number": "123",
- "tax_amount": "40.00",
- "total_collected_amount": "0.00",
- "total_credited_amount": "0.00",
- "total_paid_amount": "0.00",
- "total_recoursed_amount": "0.00",
- "unpaid_amount": "200.00"
}
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.
Generate (boolean) or Generate (null) (Generate) Default: "false" Optional parameter generate (defaults to false) to help with testing or the need to re-create if the template changes etc | |
Lang (string) or Lang (null) (Lang) Default: null Specify language to generate PDF [ | |
V (string) or V (null) (V) Default: null Optional parameter |
OK
Error response
{- "error_code": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
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": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
Only fulfilled orders can have invoices.
OK
Error response
{- "error_code": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
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.
CreateAddressRequestSchema (object) or null Default: null Order billing address | |
Buyer Project (string) or Buyer Project (null) (Buyer Project) Default: null New value for buyer project on order | |
Buyer Purchase Order Number (string) or Buyer Purchase Order Number (null) (Buyer Purchase Order Number) Default: null Order purchase number being edited | |
Buyer Reference (string) or Buyer Reference (null) (Buyer Reference) Default: null New value for buyer reference on order | |
Array of Line Item Updates (objects) or Line Item Updates (null) (Line Item Updates) Default: null Changes to existing line items | |
Order Note (string) or Order Note (null) (Order Note) Default: null Notes associated with invoice edit |
OK
Error response
{- "buyer_purchase_order_number": null,
- "buyer_reference": null,
- "order_note": null,
- "buyer_project": null,
- "billing_address": null,
- "line_item_updates": null
}
{- "error_code": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
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": null,
- "date_expiry": null,
- "usage_count": 0,
- "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",
- "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": null,
- "date_expiry": null,
- "usage_count": 0,
- "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea"
}
]
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": null,
- "date_expiry": null,
- "usage_count": 0,
- "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea"
}
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": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
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": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
Endpoint for downloading Two settlement report by settlement ID as .xlsx
or .csv
.
Filetype (string) or Filetype (null) (Filetype) Default: "xlsx" The filetype of the statement file. Two currently supports csv and xlsx as value for the filetype parameter. Default is xlsx. | |
Settlement Id (string) or Settlement Id (null) (Settlement Id) Default: null The ID of the settlement that belongs to the merchant. |
Two settlement report for a specified period.
Bad request.
Error response
{- "error_code": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
List of recent payouts from Two
Bad request.
Error response
{- "items": [
- {
- "settlement_id": null,
- "settlement_date": null,
- "recipient_account_number": null,
- "recipient_account_name": null,
- "recipient_iban": null,
- "recipient_bban": null,
- "funding_provider": "string",
- "funding_provider_account_holder_name": null,
- "funding_provider_account_number": null,
- "payout_currency": "NOK",
- "payout_amount": "10000.00",
- "payment_reference": null
}
], - "page": {
- "items": 0,
- "limit": null,
- "current": null,
- "pages": null
}
}