MSTS Seller Integration Documentation (2.19.0)

Document Change History

VERSIONCHANGE HISTORY
1.0.0Initial Version.
2.0.0Add currency attribute to the preauthorization and charge API.
2.0.1Add po_number attribute to the preauthorization API and the error codes for po_number validation.
2.0.2Support additional currencies for buyer application.
2.0.3Fix the link to buyer_application.
2.0.4Add a new endpoint for partial return.
Add a new attribute in buyer_application to pass the URL to link to ecommerce site.
Add a new attribute in buyer_application to specify the current charge amount in the shopping cart.
Support update of preauthorization amount
2.0.5Change buyer_application required parameter from buyer_reference_id to client_reference_id.
2.0.6Fix the description for reponse 400
2.0.7Add the new buyer payment term 'End of Month - Net 45'
2.0.8Add a new error code 400 - invalid_input
2.0.9Enhance API Doc, add more descriptions
2.0.10Modify charge endpoints to support discount_amount
2.0.11Add a new error code 405 - method_not_allowed
2.0.12Add shipping_tax_amount to Charge and Return
2.0.13Add shipping_discount_amount to Charge and Return
2.0.14Change url to app.msts.credit
2.0.15Add a new error code 400 - invalid_shipping_amount
2.0.16Change credit_amount_requested, annual_income in BuyerApplication from string to integer
2.0.17Modify charge endpoints to allow for optional metadata parameter
2.0.18Modify the validation pattern of year_established
2.0.19Add Payload of Webhook Event Types
2.0.20Add new payment terms - Net 90
2.0.21Add the daily.charge.activity webhook event
2.0.22Add buyer_client_reference_id and po_number to the daily.charge.activity webhook event, remove buyer_id
2.0.23Add `errorFields` attribute for 400 errors to indicate invalid input fields
2.0.24Add `cancellation_comment` attribute for Cancel a charge
2.0.25Add `missing_program` error code for Create a charge
2.0.26Add more description under Pre-authorization
2.0.27update transaction_date description in daily.charge.activity webhook
2.1.0Add new endpoints and webhooks to support headless programs
2.1.1Add new company types to support Australian company
2.1.2Fix typo in buyer payment error code
2.1.3Add `trading_name` to buyer create endpoint
2.1.4Add disbursement id to webhook `seller.payment.settled`
2.1.5Support Australia Bank
2.1.6Add `Miskey, Paid To Client Direct`, `Unauthorized Purchase`, `Customer Tax Exempt Or Incorrect Tax` to CancellationReason
2.1.7Add buyer fraud endpoint
2.1.8Add `invalid_terms_and_conditions_id` and `require_terms_and_conditions_id` error code for buyer_application
2.1.9Add `Validation_Required` to Create a Buyer
2.1.10Add `unsupported_operation` error to Create Buyer Contact, Update Buyer Contact and Delete Buyer Contact Endpoints. Add `buyer_contact_require_one_notification` and `buyer_contact_require_one_primary_contact` error for Update Buyer Contact Endpoint.
2.1.11Add `charge` edit endpoint
2.1.12Make annual_income and date_of_birth not required when company type is Sole Proprietor
2.1.13Add company_annual_revenue to buyer application
2.1.14Add pattern match for company_annual_revenue to buyer application
2.1.15Increase max page size of listing endpoints to 1000. Lower min page size of listing endpoints to 1. Make `buyer_id` an optional query param for the preauthorizations listing endpoint.
2.1.16Update description of query param `page_size` of all listing endpoints.
2.1.17Add buyer_id and client_reference_id to preauthorization.updated webhook response
2.1.18Add optional query pram `dispute_cancellation_comment` to the cancel charge dispute endpoint
2.1.19Add buyer risk category fields
2.1.20Add risk_category and industry_data_match to Buyer and buyer.updated webhook
2.1.21Update error code and message for create buyer payment endpoint
2.1.22Add buyer_id and client_reference_id to buyer.payment.updated webhook payload
2.1.23Add List buyers endpoint
2.1.24Add locale to buyer application
2.1.25Add tax details in line items of the charge in charge API
2.1.26Add the standard implementation diagram and new endpoints for seller onboarding, document upload and accountholder agreement
2.1.27Added validation for buyer application locale
2.1.28Add Cooperative to CompanyType
2.1.29Add days_to_suspension and is_approaching_suspension to BuyerInformation
2.1.30Alter description of BuyerApplication tax_id
2.1.31Change Buyer and BuyerApplication business_contact_phone and additional_contact1_phone maxLength from 15 to 16
2.1.32Alter regex for business_contact_phone and additional_contact1_phone
2.1.33Add days_to_suspension and is_approaching_suspension to BuyerStatusInformation
2.1.34Create independent definition for BuyerFraud
2.1.35Add tax_details to ChargeDetails
2.1.36Add charge create, edit and return error details for invalid_charge_details_tax_details
2.1.37Add detail_amount_mismatch error to the charge edit endpoint spec.
2.1.38Add require_charge_details_tax_details error and change type of charge.details.tax_details.tax_rate. Update buyer.business_contact_email and buyer.additional_contact1_email to use a more restrictive validation pattern.
2.1.39Add multipleOf restriction to charge.details.tax_details.tax_rate.
2.1.40Merge DX-78 - CaaS OpenAPI spec adjustments & recommendations
2.1.41Merge DX-90 - Added operationId
2.1.42Fix typo id in operationId
2.1.43Add new payment terms
2.1.44Fix internal links
2.2.0Add Limited Liability Partnership and Registered Charity to company_type
2.2.1Remove Sole Trader from company_type
2.3.0Add shipping_tax_details to charge. Add error codes `shipping_tax_amount_mismatch` and `require_shipping_tax_details` when creating a new charge, or creating a charge return.
2.4.0Add Sole Trader back to company_type
2.5.0Add locale to Seller
2.6.0Add charge_payment_days to charge. Add charge_terms_in_days to response for daily.charge.activity webhook. Add `unsupported_operation` and `cannot_override_payment_terms` error codes when creating a new charge.
2.6.1Update description of Supplier
2.6.2Add client_reference_id as query parameter for List buyers
2.7.0Add credits endpoints, errors to existing return and cancel endpoints, deprecated return endpoint
2.8.0Update DailyChargeActivityEventPayload Type to accept Credit
2.9.0Make Zip & State as a non-required fields
2.10.0Add Archived status to Seller
2.11.0Remove min/max length for `TaxDetails`.`tax_type`
2.12.0Add validation on empty string bank_name and name_of_account for Creating Buyer Bank Account
2.13.0Deprecate Return & Cancel Charges, remove to be able to edit ChargeDetails
2.14.0Remove unapplicable error codes in Edit Charge, and Add 405 Response to Cancel Return & Edit Charge
2.15.0Update Operation ID for Deprecate Return & Cancel Charges
2.16.0Credits can now only have the status "Paid". Change credits endpoint error `shipping_tax_details_mismatch` to `shipping_tax_amount_mismatch`. Change returns endpoint error `charge_has_credit_issued` to `charge_has_credit`. Update description for NewCredit `shipping_tax_details`. Remove unused error `return_not_allowed`. Add 405 response to the "cancel charge" endpoint.
2.17.0Remove unused error `return_not_allowed` from the "return charge" endpoint. Add 405 response to the "cancel charge" endpoint.
2.18.0Add `original_total_amount` to the `Credit` response schema.
2.19.0Add `idempotency.lock_failed` error code.

Introduction

MSTS provides a safe and easy way to extend credit to your business customers. We are aiming to provide the easiest B2B payment flow with straightforward integration with your e-commerce application.

There are two different types of integrations, headless and standard integration. The headless integration will require the ecommerce application to provide the user interface and manage communication to customer. The standard integration relies on MSTS to provide the user interface and communication to the customer. following image shows the integration flow for a headless e-commerce marketplace application:

alt text

The integration flow for a standard standalone e-commerce application:

alt text

If your application involves a marketplace, the standard integration will be slightly different:

alt text

Once you are ready to integrate, you can follow the following steps:

Step 1. Create your API key

Login to https://app.msts.credit. Navigate to the API Keys screen by clicking the API Keys menu item in the menu. If your account has access to multiple programs, then you will need to select the program (located in the upper right of the screen). Click NEW API KEY button to create an API Key. When the key is generated, place the detail in secure storage.

The API key must be used for all server-side interactions. The API key MUST NOT be used for client-side interactions.

Step 2. Register a webhook to receive important notifications

MSTS will notify you about new/changed buyers, payments and other items. The buyer notification will tell you when a buyer is ready to transact.

MSTS will make best efforts to ensure you receive every notification. A HTTP response in the range of 200 to 299 will assist, letting us know not to try again.

MSTS operates two environments for you (Test and Production). They are identified by API key. Each environment has its own webhook.

Step 3. Register buyers

MSTS provides two ways to register buyers. Buyers can complete a MSTS credit application form or alternatively you can submit a server-side API request.

If you are hosting your own credit application form you must dispay the terms and conditions for the buyer to join the program. The specification to retrieve the terms and conditions is provided in this document.

The specification for buyer credit application API lists all the required data to register buyers and apply for credit.

For the MSTS application form, buyers will be provided with a link to navigate to the form. The link contains the URL and query parameters that will pre-populate some fields in the application form. The supported parameters are:

client_reference_id : Required parameter - The ID to identify the buyer in your program.

first_transacted_date : Optional parameter - The first transaction date of the buyer in your program. The date must be in YYYY-MM-DD format.

total_transacted_amount : Optional parameter - The total transaction amount of the buyer.

current_transaction_amount : Optional parameter - The current transaction amount in the shopping cart.

ecommerce_url : Optional parameter - The URL for the buyer to return to the ecommerce site.

An example link with query parameter is as follows https://my_program.msts.credit/apply?client_reference_id=123456&first_transacted_date=2017-01-30&total_transacted_amount=10000

You will need to generate the URL for each buyer, so they can visit the form with necessary query parameters. You will include a link in your site for the buyer to apply for credit.

Step 4. Modify your ecommerce site to integrate auth/charge API's.

Your site needs to include a way to apply for credit as described in Step 3.

Your site also needs to offer the payment method during checkout. This might be displayed when buyers have an approved credit line (see Step 2).

When a buyer selects the payment method, your site will optionally submit a server-side API request to pre-authorize the amount. This locks the amount from being used for other purchases.

When you fulfill an order, your site will submit a server-side API request to charge the buyer. This may reference a pre-authorization. A charge can exceed the pre-authorization amount upto the buyers available credit.

4.1. Pre-authorization (optional)

A pre-authorization places a temporary lock on an amount of credit with a buyer. It ensures that these funds are available to charge when an order is fulfilled.

A single pre-authorization can be used for multiple charges. This provides flexibility to charge incrementally as an order is fulfilled.

Best practice is to submit a preauthorization before submitting a charge. This blocks an amount on the buyer's credit line and verifies that the buyer has enough credit available for the future charge. Preauthorizations will be rejected if the buyer's account is not in an active status. Once a preauthorization is successfully accepted, MSTS will honor that preauthorization regardless of the buyer's account status. Note that preauthorizations will expire after a program specific period of time.

If the seller elects not to submit a preauthorization and only a charge, MSTS will check the buyer's account status and the buyer's available credit before accepting the charge. If the buyer does not have the necessary credit available or is not in an active status, the charge will be rejected.

4.2. Charges

Charges initiate seller payments and buyer invoices. Where a pre-authorization was used, you need to include the id of the pre-authorization to reduce the pre-authorized amount remaining.

4.3. Pre-authorization cancellations

A pre-authorization can be cancelled. Cancellation will free any remaining credit that is locked by this pre-authorization.

4.4. Cancel Charges

A charge must be cancelled when an order is cancelled or partially refunded. If creating a new charge for a revised amount (in the case of refunds) include the previous charge id. You must specify a comment when creating a charge that references a previous charge. This information will be displayed on the buyers invoice. alt text

Errors

HTTP response codes are used to indicate the success or failure of an API request.

Status Code RangeDescription
2xxIndicates success.
4xxIndicates a bad request was made. Eg. data in the payload provided was not valid.
5xxIndicates an error occurred with our server. This should rarely happen

If an error occurs, an error objects will be returned. The error object contains a code, which could be used to programatically handle the error. A message field is also included, containing a text description of the error. Some 400 errors may also include a validationErrors field containing an array of additional data related to the error. For buyer_application, 400 errors might have errorFields attribute to indicate invalid fields.

Sample error response:

 {
   "code": "invalid_seller",
   "message": "Seller with id '7365581a-eedb-4c96-bbf9-f97bac59f551' is non-existent or inactive."
 }

The example list of possible error codes are as follow:

Error CodeDescription
amount_mismatchThe amounts specified in the charge are not equal to the sum of the amounts in charge details
authorization.missing_required_permissionUser does not have the correct role to access this resource
authorization.unauthenticated_not_allowedWrong API key. Unauthenticated access not allowed for API endpoint
buyer_already_createdA buyer has already exists
client_reference_id_already_existsThe client reference ID has been used for a buyer in the same program
detail_amount_mismatchThe amounts specified in the charge details are not equal to the subtotal of the detail in charge details
discount_amount_mismatchThe discount amount specified in the charge is not equal to the sum of the discount amount in charge details
email_already_existsThe email has been used for a buyer
internal_errorInternal server error
invalid_buyerBuyer for the given ID does not exist or inactive
invalid_inputOne of the request inputs is not valid
invalid_preauthorizationInvalid preauthorization for the ID specified
invalid_programSeller and Buyer are not in the same program
invalid_poPurchase Order number is invalid or does not match expected format
invalid_sellerSeller for the given ID does not exist or inactive
invalid_shipping_amountShipping amount + shipping tax amount - shipping discount amount cannot be less than 0
invalid_terms_and_conditions_idThe terms_and_conditions_id is invalid for this program
method_not_allowedMethod is not allowed
missing_programThe associated Program was not found
new_application_not_allowedThe program is configured to not allow any new applications
po_requiredPurchase Order number is required
preauthorization_amount_too_lowThe updated preauthorization amount is lower than the captured amount.
preauthorization_invalid_amountThe updated preauthorization amount must be less than the original amount.
preauthorization_invalid_statusPreauthorization with Expired, Cancelled or Rejected status can't be cancelled or updated
preauthorization_po_requiredPurchase Order number is required for this buyer's preauthorization
program_not_foundThe program in the buyer application doesn't exist
require_terms_and_conditions_idThe terms_and_conditions_id is required for this program
resource_not_foundNo information is found for the requested ID
return_amount_mismatchThe Sum of return amount plus total amount must equal original amount of charge
return_invalid_amountInvalid return amount. The return amount cannot exceed the charge amount.
return_invalid_chargeInvalid charge for the ID specified
return_invalid_total_amountInvalid total amount - not equal to sum of detail subtotal plus shipping and shipping tax(if provided) minus shipping discount(if provided)
return_invalid_amount_use_refundInvalid return amount - amount equals remaining amount - use Cancel a charge instead
require_charge_details_tax_detailsThe invoice country require charge.details.tax_details
tax_amount_mismatchThe tax amount specified in the charge is not equal to the sum of the tax amount in charge details
unsupported_currencyThe specified currency is not supported for the seller
validation.body_not_matching_json_schemaRequest body failed JSON schema validation
validation.invalid_query_parameterThe value for the query parameter is invalid
validation.invalid_path_parameterThe value for the path parameter is invalid
validation.unsupported_media_typeUnsupported media type
idempotency.invalid_requestThe idempotency key supplied does not match the previous request URL, body and headers
idempotency.invalid_key_usageA idempotency key were supplied for an operation other than `POST`
idempotency.lock_failedThe idempotency key supplied is currently in use by another request

Idempotent Requests

Idempotency is supported for all POST operations to enable safely retrying requests without accidentally performing the same operation twice. To perform an idempotent request the client provides an additional Idempotency-Key header containing a unique value (for example a random UUID). The idempotency layer works by saving the resulting status code, headers and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including errors. Requests with the same idempotency key value must have the exact same body, byte for byte, and the same value for the headers Authorization, Content-Type and Content-Length. If the request does not match previous requests with the same key the API will respond with 400 Bad Request containing the error code idempotency.invalid_request. Idempotency keys are remembered for up to 24h so any key that is older than 24h should never be used to retry a request. It is up to the client to generate and keep track of the age of the key. The Idempotency-Key header is only valid for POST operations, supplying the header for any other operation will result in the API responding with 400 Bad Request containing the error code idempotency.invalid_key_usage. If an idempotent request is received with the same key as a request currently in progress, the API will respond with 409 Conflict containing the error code idempotency.lock_failed. The idempotency key is only unique in the scope of an exact match on Authorization header values so two requests with the same API Key, idempotency key and content but were one is using Bearer scheme and one is using Basic scheme will be considered two complitely differrent requests. For example, the different Authorization header values below are considered different in the context of idempotent requests handling.


  Authorization: Bearer 13bdb78c-6169-43de-a6ac-c1c771e4f688
  Authorization: Bearer 13BDB78C-6169-43DE-A6AC-C1C771E4F688
  Authorization: Bearer 13bdb78c616943dea6acc1c771e4f688
  Authorization: Basic MTNiZGI3OGMtNjE2OS00M2RlLWE2YWMtYzFjNzcxZTRmNjg4Og==

Common Variables

Unless otherwise specified, attributes are in the following common formats.

VariableDescriptionExample
dateDates are in ISO 8601/[RFC3339](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14) 'full-date' format. The date is in UTC unless otherwise specified.2018-01-30
date-timeDates/times are in ISO 8601/[RFC3339](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14) 'date-time' format. The date-time is in UTC unless otherwise specified.2018-07-12T02:00:25.535Z
amountsAmounts are in the smallest currency unit unless otherwise specified, for example 100 for JPY 100, 100 for USD 1, 1000 for BHD 1.50000
uuidUUIDs must adhere to UUID v4cf771e8a-5c1a-462f-b4c9-fc745f02d0de
# Authentication Requests are authenticated via bearer authentication. You will need an API Key which can be obtained by following Step 1 in the Introduction section.

The API Key can be used differently depending on the context.

bearerAuth

Provide API key in header as Authorization: Bearer [API-KEY]

Security Scheme Type API Key
Header parameter name: Authorization

basicAuth

Provide API key as username. Password can be left blank.

Security Scheme Type HTTP
HTTP Authorization Scheme basic

Authentication via HTTP Basic Auth

For example if your API Key is 13bdb78c-6169-43de-a6ac-c1c771e4f688, you provide it as the basic auth username value. You do not need to provide a password.

Example curl GET request using basic auth:

 curl -X GET app.msts.credit/api/v20180807/charges -u 13bdb78c-6169-43de-a6ac-c1c771e4f688: 
The colon on the end stops curl from asking for a password

Authentication via Bearer Auth

The API Key can be provided via a Bearer token header.

For example if your api key is 13bdb78c-6169-43de-a6ac-c1c771e4f688, you would include the 'Authorization' header with the value Bearer 13bdb78c-6169-43de-a6ac-c1c771e4f688.

Example curl GET request with authentication:

 curl -H 'Authorization: Bearer 13bdb78c-6169-43de-a6ac-c1c771e4f688' -H "accept: application/json" -X GET app.msts.credit/api/v20180807/charges/f52cd8cd-3728-44d7-85ff-95efbef46e3d 

API requests must be made over https and must include authentication, or else they will fail.

Preauthorization

Create a preauthorization

Reserves an amount of available credit

Authorizations:
Request Body schema: application/json

The preauthorization to create

seller_id
required
string (Uuid) ^(?:{[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7}}|[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7})$

Universally unique identifier (UUID).

buyer_id
required
string (Uuid) ^(?:{[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7}}|[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7})$

Universally unique identifier (UUID).

currency
required
string (SupportedCurrency) ^[A-Z]{3}$

Three-letter ISO currency code in uppercase.

preauthorized_amount
required
integer [ 1 .. 214748364 ]

Amount to be preauthorized.

po_number
string [ 0 .. 200 ] characters

PO Number. This may be required by some buyers/sellers based on their configuration. Format validations may also be applied based on requirements.

Responses

201

The preauthorization was created successfully

400

Bad request

Error CodeDescription
validation.body_not_matching_json_schemaRequest body failed JSON schema validation
invalid_sellerSeller for the given ID does not exist or inactive
invalid_buyerBuyer for the given ID does not exist or inactive
invalid_programSeller and Buyer are not in the same program
unsupported_currencyThe specified currency is not supported for the seller
preauthorization_po_requiredPurchase Order number is required for this buyer's preauthorization
preauthorization_invalid_poPurchase Order number is invalid or does not match expected format
invalid_inputOne of the request inputs is not valid

401

Authentication is missing or invalid

Error CodeDescription
authorization.unauthenticated_not_allowedUnauthenticated access
402

The preauthorization was rejected because of insufficient credit

403

Permission to the requested resource is denied

Error CodeDescription
authorization.missing_required_permissionUser does not have the correct role to access this resource
415

Unsupported media type

Error CodeDescription
validation.unsupported_media_typeUnsupported media type
429

Too many requests hit the API too quickly. We suggest retry the request after waiting for a reasonable time.

500

Internal server error

Error CodeDescription
internal_errorInternal server error
post /preauthorizations
https://app.msts.credit/api/v20180807/preauthorizations

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "seller_id": "cf771e8a-5c1a-462f-b4c9-fc745f02d0de",
  • "buyer_id": "cf771e8a-5c1a-462f-b4c9-fc745f02d0de",
  • "currency": "USD",
  • "preauthorized_amount": 1,
  • "po_number": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "cf771e8a-5c1a-462f-b4c9-fc745f02d0de",
  • "seller_id": "cf771e8a-5c1a-462f-b4c9-fc745f02d0de",
  • "buyer_id": "cf771e8a-5c1a-462f-b4c9-fc745f02d0de",
  • "currency": "USD",
  • "preauthorized_amount": 1,
  • "captured_amount": 0,
  • "foreign_exchange_fee": 0,
  • "status": "Preauthorized",
  • "po_number": "string",
  • "expires": "2018-07-12T02:00:25.535Z",
  • "created": "2018-07-12T02:00:25.535Z",
  • "modified": "2018-07-12T02:00:25.535Z"
}

List preauthorizations

Returns a list of preauthorizations

Authorizations:
query Parameters
page_size
integer [ 1 .. 1000 ]
Default: 10

Number of records per page

page_number
integer >= 1
Default: 1

Page number. If the requested page does not exist, we do not return an error. Instead, we return 0 result.

from_date
string <date-time>
Example: from_date=

The from date of the preauth creation date to list preauthorizations.

to_date
string <date-time>
Example: to_date=

The to date of preauth creation date to list preauthorizations.

buyer_id
string (Uuid) ^(?:{[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7}}|[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7})$
Example: buyer_id=cf771e8a-5c1a-462f-b4c9-fc745f02d0de

The buyer_id of the preauthorizations.

sort_column
string
Default: "-created"
Enum: "id" "seller_id" "currency" "preauthorized_amount" "status" "expires" "created" "-id" "-seller_id" "-currency" "-preauthorized_amount" "-status" "-expires" "-created"

The column to sort. The column name prefix with - will sort in descending. The column without - prefix will sort in ascending order.

Responses

200

The list of preauthorizations

400

Bad request

Error CodeDescription
validation.invalid_query_parameterThe value for the query parameter is invalid

401

Authentication is missing or invalid

Error CodeDescription
authorization.unauthenticated_not_allowedUnauthenticated access
403

Permission to the requested resource is denied

Error CodeDescription
authorization.missing_required_permissionUser does not have the correct role to access this resource
429

Too many requests hit the API too quickly. We suggest retry the request after waiting for a reasonable time.

500

Internal server error

Error CodeDescription
internal_errorInternal server error
get /preauthorizations
https://app.msts.credit/api/v20180807/preauthorizations

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Cancel a preauthorization

Cancels a credit reservation

Authorizations:
path Parameters
id
required
string (Uuid) ^(?:{[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7}}|[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7})$
Example: cf771e8a-5c1a-462f-b4c9-fc745f02d0de

The id of the preauthorization. Universally unique identifier (UUID).

Responses

200

The preauthorization was cancelled

400

Bad request

Error CodeDescription
preauthorization_invalid_statusPreauthorization with Expired, Cancelled or Rejected status can't be cancelled or updated
invalid_inputOne of the request inputs is not valid

401

Authentication is missing or invalid

Error CodeDescription
authorization.unauthenticated_not_allowedUnauthenticated access
403

Permission to the requested resource is denied

Error CodeDescription
authorization.missing_required_permissionUser does not have the correct role to access this resource
404

Not found

Error CodeDescription
resource_not_foundNo information is found for the requested ID
429

Too many requests hit the API too quickly. We suggest retry the request after waiting for a reasonable time.

500

Internal server error

Error CodeDescription
internal_errorInternal server error
post /preauthorizations/{id}/cancel
https://app.msts.credit/api/v20180807/preauthorizations/{id}/cancel

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "cf771e8a-5c1a-462f-b4c9-fc745f02d0de",
  • "seller_id": "cf771e8a-5c1a-462f-b4c9-fc745f02d0de",
  • "buyer_id": "cf771e8a-5c1a-462f-b4c9-fc745f02d0de",
  • "currency": "USD",