Introduction

Our Buy Now Pay Later (BNPL) service for B2B marketplaces offers flexible and convenient payment methods for buyers while providing sellers faster access to cash. Here you will find the documentation you need to implement our services in your platform.

Our APIs are REST based and use HTTP response codes to indicate API errors. Our API expects incoming data to be valid JSON objects with requests containing the header Content-Type: application/json. All API responses, including errors, are in JSON.

What is BNPL?

BNPL or ‘Buy Now, Pay Later’ is a payment service that allows buyer to make purchases and pay for them at a future date, often interest free. The seller of these goods or services is typically paid upon delivery.

In B2B e-commerce, BNPL ensures measurably higher shopping carts and increased conversion. It can generate sustainable growth for business customers and the process also offers other benefits, such as seamless checkout experiences. The additional option of BNPL reduces the rate of order abandonment, especially for the high-value transactions.

Account Registration

EU law requires new and existing Marketplace customers complete and successfully pass the Know Your Business (KYB) and AML verification process to use ‘Pay with Terms’ service.

Please see https://docs.digiteal.eu/technical/index.html#company_pre_registration for more details

Order Creation and Management

There are 3 main requirements for creating an order:

1) The buyer has successfully registered their business (see Account Registration).

2) If the seller has not yet registered their business, they have 48 hours after order creation to start the  process and accept the account registration terms and conditions. If the registration process has not started within 48 hours, the order will be cancelled unless stated otherwise in the BNPL contract with your marketplace.

3) The buyer has sufficient available credit to cover the order amount

Credit Limit Assignment

Credit limits at TERMS.tech are assigned based on your customers’ credit profiles, their history of successful transactions with your business and their on-going business with us.

Customer credit limits are dynamically managed using updated data from orders and credit rating services. Regular transmission of data from your non-BNPL orders should be established, so that it is incorporated into our decisions, providing optimal customer experience.

Showing a Credit Limit to Your Customers

Knowing the purchasing power of your customers is critical for marketing BNPL and positioning the service in your checkout flows. When should you use GET /companies/{countryISO}-{nationalID}/credit-limit ?

Knowing the purchasing power of your customers is critical for marketing BNPL and positioning the service in your checkout flows. When should you use GET /companies/{countryISO}-{nationalID}/credit-limit
?

• In your checkout flow:
   
- To show the option to checkout with BNPL if CreditLimit => Order Amount    
- To show the available credit to your buyers so they are aware of their potential BNPL purchasing power

• In a customer profile page on your website, to show customers their potential BNPL purchasing power

• In screenings for marketing offers

Creating a New Order

Marketplace transactions are often 1-to-Many, meaning 1 buyer with several sellers. Use the /buyer-orders API to declare the contents of the transaction, split per seller. We require one unique buyer order reference (usually generated by your systems and known to the buyer) and for each seller the unique seller order reference and the total amount of the order, including any taxes, processing and shipping fees.

The service will return a redirect url towards our Buyer Product Agreement that needs to be shown and signed by the buyer for each TERMS.tech transaction.

Vocabulary

Approved - TERMS approved as payment method for a transaction (Buyer is eligible), waiting for Invoice and Proof of delivery to be provided by the Seller/Marketplace.

Review pending - waiting for verification of Invoice and Proof of delivery by TERMS officer.

Paid-out - Invoice and Proof of Delivery check is ok, PSP has been instructed to transfer the Cash Advance and MarketPlace fees.

Cancelled - the transaction has been cancelled (final status).

Settled - repayment by Buyer is executed and transaction is successfully closed (final status).

Investigation - Invoice or Proof of delivery are not correct and Seller/Marketplace is asked for a correction or explanation.  Reason for Investigation may also be potential fraud.

Payment Overdue - repayment by the Buyer was not received on time or the Buyer asked to refund money after SDD mandate execution.

Declined - TERMS not proposed due to negative eligibility check (final status).

Collection - The long overdue transaction is to be handled by our Collections Partner.

Payment to Sellers and to Your Marketplace

Unless stated otherwise in your contract, your marketplace and your sellers are paid after our receipt and validation of proof of delivery. The preferred method of confirmation is the submission of the delivery proof and seller invoice via POST /seller-orders/{sellerOrderReference}-{DocumentType}-{DocumentName}/document

Authentication API

OAUTH2 API Swagger Documentation

[ Base URL: /CredendoOAUTH2Provider/rest/OAuth ]
https://credendo-dev.outsystemsenterprise.com/CredendoOAUTH2Provider/rest/OAuth/swagger.json

Web service to obtain a token based on client credentials.

Basic Authentication is required for all requests.

GET

Attributes
  • client_id string required

    The ClientID as received from the PCI API administrator.

  • client_secret string required

    The Client Secret key associated to the ClientID - as received from the PCI API administrator.

Models
  • GetTokenResponse{
    Response sent by the GetToken service.

    access_token

    string

    default: The token value itself. Needs to be passed in an authentication header of type “Bearer Token” to PCI API web services.

    expires_in

    integer ($int32)

    default: The token validity in seconds.

    token_type

    string

    default: The type of token (always “Bearer”)

    error

    string

    default: Short error text.

    error_description

    string

    default: Detailed description of the error.

    }

POST
/GetToken
{
  "access_token": "string",
  "expires_in": 0,
  "token_type": "string",
  "error": "string",
  "error_description": "string"
}
RESPONSE
GetTokenResponse{
  "access_token": "string" //The token value itself. Needs to be passed in an authentication header of type “Bearer Token” to PCI API web services,
  "expires_in": integer($int32), //The token validity in seconds.
  "token_type": "string",//The type of token (always “Bearer”)
  "error": "string", //Short error text.
  "error_description": "string" //Detailed description of the error.
}

Customers API

Customers API Swagger Documentation

[ Base URL: /terms42api/rest/customers ]
https://credendo-dev.outsystemsenterprise.com/terms42api/rest/customers/swagger.json

GET

Use this service to get the credit score and available TERMS.tech limit of any company (even not registrerd with TERMS.tech). Uses CreditSafe to identify the company and Credendo processing to get the TERMS.tech limit. This service can be used by marketplaces to promote TERMS.tech to users in case the current transaction would qualify for TERMS (TotalAmount < Limit). This service needs the email address of the company - used to provide the onboarding wizard deep link in case the company is not onboarded. The onboarding link can be used by the marketplace to create a button for their customers to start onboarding with TERMS and have pre-filled info in the onboarding wizard.

Return codes:

HTTP 200:

OK.

HTTP 400:

197 - if the countryISO is invalid;
223 - if the NationalID or CountryISO is empty

HTTP 401:
201 - If the authorization fails

HTTP 404:
140 - if the company was not found;

Attributes
  • countryISO string required

  • nationalID string required

POST
/companies/{countryISO}-{nationalID}/credit-limit
{
  "CompanyResponse": {
    "Name": "string",
    "VAT": "string",
    "NationalId": "string",
    "Address": {
      "simpleValue": "string",
      "street": "string",
      "city": "string",
      "postCode": "string",
      "houseNo": "string",
      "postalCode": "string",
      "country": "string",
      "houseNumber": "string"
    },
    "Status": "string",
    "SafeNo": "string",
    "TradingNames": [
      "string"
    ],
    "OfficeType": "string",
    "ConnectId": "string"
  },
  "LimitData": {
    "Rating": "string",
    "FinalLimitAmount": 0.1,
    "AvailableLimitAmount": 0.1
  },
  "isActive": false,
  "OnboardingStatus": "string",
  "canHaveTerms": false,
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

PUT

Sets the email address to be used when communicating with this company.

Attributes
  • countryISO string required

  • nationalID string required

  • email string required

POST
/companies/{countryISO}-{nationalID}/email
string

PUT

Sets the preferred communication language for the current company. The company must already exist in the database. If the preferred language is not set the system defaults to the language set on the marketplace.

Attributes
  • countryISO string required

  • nationalID string required

  • LanguageISO2 string required

POST
/companies/{countryISO}-{nationalID}/language
string

GET

Returns the URL for the TERMS.tech onboarding wizard pre-filled with the respactive company data. The company must exist in our database (created by a call to the API /CreditLimit). The email of the company must be set previously by calling the setEmail API

Attributes
  • countryISO string required

  • nationalID string required

POST
/companies/{countryISO}-{nationalID}/onboarding-url
{
  "OnboardingURL": "string",
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

GET

Returns a list of matching Businesses based on the search key (valid search keys are: 'Name’, ‘VAT’ or ‘NationalID’).
Search criteria value does not have to be an exact match for Name.
If search is performed with NationalID or VAT and no match is found in TERMS.tech database, CreditSafe will be contacted to provide company details (these can be used to pre-fill screens for example). In this case the GUID will not be filled in indicating that the company does not yet exists in the internal database and needs to be created by calling the API CreditLimit.
Returns the status of the onboarding, if “Successfull” means the company has finished the onboarding process with the PSP. See service CreditLimit for the list of possible onbarding statuses.

Return codes:

HTTP 200:

OK.

HTTP 400:

197 - if the CountryISO is not 2 charachters in length;
198 - if the CountryISO is unknown;
195 - if the SearchKey = &#39;Name&#39; and the SearchValue is not at least 3 characters in length;
196 - if the SearchKey is anything other than &#39;Name&#39;, &#39;NationalID&#39; or &#39;VAT&#39;;

HTTP 401:
201 - If the authorization fails (because the OAuth2 token is missing or invalid).

HTTP 404:
140 - If there are no results matching the search criteria.

HTTP 500:
if an unexpected server error occurs.

Attributes
  • countryISO string required

    Two character country code

  • searchKey string required

    The type of search; Valid values are: 'Name’, ‘VAT’ or 'NationalID’.

  • searchValue string required

    Part of a Company name or VAT number

Models
  • Address{

    simpleValue

    string

    default:

    street

    string

    default:

    city

    string

    default:

    postCode

    string

    default:

    houseNo

    string

    default:

    postalCode

    string

    default:

    country

    string

    default:

    houseNumber

    string

    default:

    }

  • BusinessEntityAddress{

    Street Required

    string

    default:

    Number

    string

    default: In some cases street number is included in the Street field

    Zipcode

    string

    default:

    City Required

    string

    default:

    AddressType Required

    string

    default: The Type of address can be 'Headquarters’, 'Billing’, ‘Shipping’ or ‘Branch’

    CountryISO Required

    string

    default:

    FullAddressText

    string

    default:

    GUID Required

    string

    default: Unique external identifier, can be used to refer to this Business Entity in input of web services

    }

  • CompanyResponse{

    Name

    string

    default: The name of the Company.

    VAT

    string

    default: The Value Added Tax number.

    NationalId

    string

    default: The National Registration Number for that company

    Address

    • Address{

      simpleValue

      string

      default:

      street

      string

      default:

      city

      string

      default:

      postCode

      string

      default:

      houseNo

      string

      default:

      postalCode

      string

      default:

      country

      string

      default:

      houseNumber

      string

      default:

      }

    Status

    string

    default: Indicates if the company is active.

    SafeNo

    string

    default: The CreditSafe external identifier. Indicates if the company has been found by Creditsafe

    TradingNames

    string

    [default: List of other known names for this company. ]

    OfficeType

    string

    default: Indicates if it is a headquarters or a branch

    ConnectId

    string

    default:

    }

  • CompanySearchResponse{

    BusinessEntitySearchResultList Required

    • [CompanySearchResult{
      The result for a search on a Business entity

      Name Required

      string

      default:

      Description

      string

      default:

      CompanyType Required

      string

      default:

      CountryISO Required

      string

      default:

      VAT

      string

      default:

      NationalID

      string

      default:

      NationalID Required

      string

      default:

      BusinessEntity
      AddressList

      string

      default:The list of all known addresses

      [BusinessEntityAddress{
      Address of a Business Entity (Company) as returned by PCI services.

      Street Required

      string

      default:

      Number

      string

      default: In some cases street number is included in the Street field

      Zipcode

      string

      default:

      City Required

      string

      default:

      AddressType Required

      string

      default: The Type of address can be 'Headquarters’, 'Billing’, ‘Shipping’ or ‘Branch’

      CountryISO Required

      string

      default:

      FullAddressText

      string

      default:

      GUID Required

      string

      default: Unique external identifier, can be used to refer to this Business Entity in input of web services

      }]

      OnboardingStatus Required

      string

      default: The status of the onboarding. If Onboarding as seller is successfull, then 'seller" is returned. If Onboarding as buyer is successfull, then 'buyer" is returned. If the company is onboarded as both buyer and seller then both are returned separated by a space.

      }]

    HTTPStatus

    • REST_ERROR_RICH{

      HTTPCode

      integer ($int64)

      example: 1234567891234567

      developerMessage

      string

      default:

      userMessage

      string

      default:

      errorCode

      string

      default:

      moreInfo

      string

      default:

      }

    }

  • CompanySearchResult{
    The result for a search on a Business entity

    Name Required

    string

    default: The name of the Business Entity

    Description

    string

    default: A short description of the Business

    CompanyType Required

    string

    default: The Business Entity classification

    CountryISO Required

    string

    default: Country ISO

    VAT

    string

    default: The Business Entity VAT number if known

    NationalID

    string

    default: National Identifier

    GUID Required

    string

    default: Unique external identifier, can be used to refer to this Business Entity in input of web services

    BusinessEntityAddressList

    • The list of all known addresses

      [BusinessEntityAddress{
      Address of a Business Entity (Company) as returned by PCI services.

      Street Required

      string

      default:

      Number

      string

      default: In some cases street number is included in the Street field

      Zipcode

      string

      default:

      City Required

      string

      default:

      AddressType Required

      string

      default: The Type of address can be 'Headquarters’, 'Billing’, ‘Shipping’ or ‘Branch’

      CountryISO Required

      string

      default:

      FullAddressText

      string

      default:

      GUID Required

      string

      default: Unique external identifier, can be used to refer to this Business Entity in input of web services

      }]

    OnboardingStatus Required

    string

    default: The status of the onboarding. If Onboarding as seller is successfull, then 'seller" is returned. If Onboarding as buyer is successfull, then 'buyer" is returned. If the company is onboarded as both buyer and seller then both are returned separated by a space.

    }

  • GetCreditScoringResponse{

    CompanyResponse Required

    • CompanyResponse{

      Name

      string

      default: The name of the Company.

      VAT

      string

      default: The Value Added Tax number.

      NationalId

      string

      default: The National Registration Number for tha company

      Address{

      simpleValue

      string

      default:

      street

      string

      default:

      city

      string

      default:

      postCode

      string

      default:

      houseNo

      string

      default:

      postalCode

      string

      default:

      country

      string

      default:

      houseNumber

      string

      default:

      }

      Status

      string

      default: Indicates if the company is active.

      SafeNo

      string

      default: The CreditSafe external identifier. Indicates if the company has been found by Creditsafe

      TradingNames

      string

      [ default:  List of other known names for this company. ]

      OfficeType

      string

      default: Indicates if it is a headquarters or a branch

      ConnectId

      string

      default:

      }

    LimitData Required

    • LimitData{

      Rating Required

      string

      default:

      FinalLimitAmount Required

      number

      example: 0.1

      AvailableLimitAmount Required

      number

      default: 0.1

      }

    isActive Required

    boolean

    example: false
    True if the company is active in TERMS.tech. Only active companies can participate in transactions. If the company is unknown to TERMS and is found in CreditSafe, it is added as non-active company.

    OnboardingStatus Required

    string

    default: The status of the onboarding. Enum: 'Not Started’, 'In Progress’, 'Failed’, ‘Successful’

    canHaveTerms Required

    boolean

    example: false
    Non binding promise to give TERMS, true if the company is active, has no overdue orders and has an available credit limit.

    HTTPStatus

    • REST_ERROR_RICH{

      HTTPCode

      integer ($int64)

      example: 1234567891234567

      developerMessage

      string

      default:

      userMessage

      string

      default:

      errorCode

      string

      default:

      moreInfo

      string

      default:

      }

    }

  • LimitData{

    Rating Required

    string

    default:

    FinalLimitAmount Required

    number

    example: 0.1

    AvailableLimitAmount Required

    number

    example: 0.1

    }

  • OnboardingResponse{

    OnboardingURL Required

    string

    default:

    HTTPStatus

    • REST_ERROR_RICH{

      HTTPCode

      integer ($int64)

      example: 1234567891234567

      developerMessage

      string

      default:

      userMessage

      string

      default:

      errorCode

      string

      default:

      moreInfo

      string

      default:

      }

    }

  • REST_ERROR_RICH{

    HTTPCode

    integer ($int64)

    example: 1234567891234567

    developerMessage

    string

    default:

    userMessage

    string

    default:

    errorCode

    string

    default:

    moreInfo

    string

    default:

    }

  • SetEmailStructure{

    countryISO Required

    string

    default:

    nationalID Required

    string

    default:

    email Required

    string

    default:

    }

  • SetLanguageStructure{

    countryISO Required

    string

    default:

    nationalID Required

    string

    default:

    email Required

    string

    default:

    }

POST
/companies/{countryISO}-{searchKey}-{searchValue}
{
  "BusinessEntitySearchResultList": [
    {
      "Name": "string",
      "Description": "string",
      "CompanyType": "string",
      "CountryISO": "string",
      "VAT": "string",
      "NationalID": "string",
      "GUID": "string",
      "BusinessEntityAddressList": [
        {
          "Street": "string",
          "Number": "string",
          "Zipcode": "string",
          "City": "string",
          "AddressType": "string",
          "CountryISO": "string",
          "FullAddressText": "string",
          "GUID": "string"
        }
      ],
      "OnboardingStatus": "string"
    }
  ],
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

Transactions API

Transactions API Swagger Documentation

[ Base URL: /terms42api/rest/transactions ]
https://credendo-dev.outsystemsenterprise.com/terms42api/rest/transactions/swagger.json

POST

Creates several Seller Orders (one for each Seller) financed by the requested TERMS product (given in the ‘type’ request parameter). If the call is successful the URL to the buyer agreement page is returned and the marketplace must redirect the buyer to this page.
The buyer and sellers must be known by TERMS.tech (created by calling the CreditLimit service). The sellers must be successfully onboarded if so configured in the marketplace settings.

HTTP 400:

137 - if the list of seller orders is empty or the buyer and seller have the same UBO
194 - if the length of any reference is more than 250 characters
152 - if any sellers are not successfully onboarded and seller onboarding is mandatory
214 - if the total amount for any order is less or equal to 0
223 - Invalid parameter if the type of TERMS product is invalid.

HTTP 401:

201 - if the authorization fails

HTTP 404:

222 - if marketplace cannot be found;
140 - if the buyer cannot be found;
140 - if one of the the sellers cannot be found

HTTP 409:

218 - if one of the sellers is the same as buyer;
120 - if the amount of the order is bigger than the maximum amount of a transaction for the current marketplace;
121 - if the amount of the order is bigger than the current marketplace available funds;
219 - if there is insufficient credit coverage for the buyer;
120 - the amount of the order is bigger than the current maximum transaction amount for the buyer;
151 - if the buyer has overdue orders;
104 - seller is not active;
105 - buyer is not active;

Attributes
  • CreateOrderRequest required

POST
/buyer-orders
{
  "Type": "string",
  "BuyerReference": "string",
  "BuyerNationalID": "string",
  "MarketplaceEndTransactionOKPageURL": "string",
  "MarketplaceEndTransactionErrorPageURL": "string",
  "OrderRequestList": [
    {
      "SellerNationalID": "string",
      "SellerOrderReference": "string",
      "TotalAmount": 0.1,
      "MarketplaceFeesAmount": 0.1
    }
  ],
  "BuyerRepresentativeTitle": "string",
  "BuyerRepresentativeFirstName": "string",
  "BuyerRepresentativeLastName": "string",
  "BuyerRepresentativeEmail": "string",
  "DeliveryAddressFullText": "string",
  "SessionId": "string",
  "LanguageISO2": "string"
}
RESPONSE
{
  "TermsAndConditionsPageURL": "string",
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

POST

Service for updating a Buyer Order reference

HTTP 409:

132 - if an Order is not in a status that allows update. Only orders in statuses &#39;Accepted&#39;, &#39;Review Pending&#39; or &#39;Investigation&#39; are taken into account, orders in other statuses cannot be updated.
223 - if a PO or an Order with the new reference already extists and the update operation would create a duplicate. Only Accepted, ReviewPending or Investigation are taken into account.

HTTP 401:

201 - if the authorization fails

HTTP 404:

131 - if the Order or PO was not found.

Attributes
  • buyerOrderReference string required

  • NewBuyerOrderReference required

POST
/buyer-orders/{buyerOrderReference}/new-reference
string
RESPONSE
{
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

GET

Retuns the Fees based on total order amount and Terms payment method type.

Attributes
  • TERMSType string required

    ‘TERMS30’ or ‘TERMS60’

  • BuyerOrderTotalAmount number required

POST
/buyer-orders/fees
string
RESPONSE
{
  "TERMSTechFeeAmount": 0.1,
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

PUT

Service for updating an active Order (in statuses 'Approved’, 'Review Pending’, 'Investigation’, 'Paid-out’, ‘Overdue’) identified by its unique Seller Reference.

HTTP 400:

135 - if the new order amount is higher than initial order amount
214 - the MarketplaceFeeAmount should be grather or equal to 0
214 - the SellerAmount should be grather or equal to 0
214 - you cannot update the Order in the current status
137 - order amount or marketplace fees amount is the same as the old one (if different than 0)

HTTP 401:

201 - if the authorization fails

HTTP 404:

131 - if the Order was not found

Attributes
  • sellerOrderReference string required

  • UpdateOrderRequest required

POST
/buyer-orders/{buyerOrderReference}/new-reference
{
  "NewTotalAmount": 0.1,
  "NewMarketplaceFeesAmount": 0.1
}
RESPONSE
{
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

DELETE

Cancel an active order (in statuses 'Approved’, 'Review Pending’, 'Investigation’, 'Paid-out’, ‘Overdue’)

HTTP 200:

OK.

HTTP 400:

214 - if the order rference is missing or the order is not in one of the active statuses mentioned above;

HTTP 401:

201 - If the authorization fails

Attributes
  • sellerOrderReference string required

POST
/seller-orders/{sellerOrderReference}
string
RESPONSE
{
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

POST

Service for updating a Seller Order reference

HTTP 409:

132 - if an Order is not in a status that allows update. Only orders in statuses &#39;Accepted&#39;, &#39;Review Pending&#39; or &#39;Investigation&#39; are taken into account, orders in other statuses cannot be updated.
223 - if a PO or an Order with the new reference already extists and the update operation would create a duplicate. Only Accepted, ReviewPending or Investigation are taken into account.

HTTP 401:

201 - if the authorization fails

HTTP 404:

131 - if the Order or PO was not found.

Attributes
  • sellerOrderReference string required

  • NewSellerOrderReference required

POST
/seller-orders/{sellerOrderReference}/new-reference
string
RESPONSE
{
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

POST

Sets the shipping data on the order. When set, it is no longer necessary to upload the Proof of Delivery document via the Document API.

Attributes
  • sellerOrderReference string required

  • ShippingRequest required

POST
/seller-orders/{sellerOrderReference}/shipping
{
  "TrackingNumber": "string",
  "CarrierName": "string"
}
RESPONSE
{
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

GET

Retuns the Order Status Label for a specific Order.

Attributes
  • sellerOrderReference string required

POST
/seller-orders/{sellerOrderReference}/status
string
RESPONSE
{
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

POST

Associates a document with an Order.
The DocumentType can be one of ‘SELLER_INVOICE’ or 'DELIVERY_SLIP’.
The file extention must be pdf, jpeg, jpg, doc or docx.

Return codes:

HTTP 200:

if all went well and the terms are accepted.

HTTP 400:

180 - if no content for the document file;
181 - if the document is bigger than 10 MB;
214 - invalid DocumentType, DocumentName is missing, buyer agreement not found.

HTTP 401:

201 - if the authorization fails (because the OAuth2 token is missing or invalid);

HTTP 404:

101 - if the order with the SellerOrdereReference is not found;

Attributes
  • sellerOrderReference string required

    The unique Seller Order Reference required to identify the order to link the document

  • DocumentType string required

  • DocumentName string required

  • Binary required

    The Document data, max size 10 MB

Models
  • CreateOrderRequest{

    Type Required

    string

    default: The TERMS product to be associated with the order(s). Can be ‘TERMS30’ (buyer pays back after 30 days), ‘TERMS60’ (buyer pays back after 30 days);

    BuyerReference Required

    string

    default: Shopping order buyer reference as displayed in the marketplace. Will be used as reference for the payin from the buyer.

    BuyerNationalID Required

    string

    default: The Buyer National Number. The Business entity must exist in the TERMS42 database and be onboarded for the current marketplace

    MarketplaceEndTransactionOK
    PageURL
    Required

    string

    default: The URL of the Marketplace end transaction successfull page. After accepting the Terms & Conditions the buyer’s browser is redirected to this url

    MarketplaceEndTransactionError
    PageURL
    Required

    string

    default: The Marketplace error processing payment with TERMS42 page. If the buyer cancels the Terms & Conditions page he is redirected to this url. Can be used to present a page where the user can select a different payment method

    OrderRequestList Required

    • [ The list of Orders per seller.

      SellerOrderRequest{
      A request for one order with one seller.

      SellerNationalID Required

      string

      default:The NationalIdentifier of the seller. The business entity of the seller must exist in the TERMS42 database but the seller does not necessarily need to be onboarded (depending on parameter is seller onboarding mandatory on marketplace level)

      SellerOrderReference Required

      string

      default: The Seller Order reference, will be used in the Payment reference for payments to the Seller and The Marketplace

      TotalAmount Required

      number

      example: 0.1
      The total amount of the order, including taxes and any shipping fees.

      MarketplaceFees
      Amount
      Required

      number

      example: 0.1
      The amount of marketplace fees. May be 0 if there is no marketplace comission.

      }]

    BuyerRepresentativeTitle

    string

    default: The Title (Mr. Mrs., etc) of the user acting on behalf of the Buyer entity

    BuyerRepresentativeFirstName

    string

    default: The first name of the user acting on behalf of the Buyer entity (minimum 2 characters)

    BuyerRepresentativeLastName

    string

    default: The last name of the user acting on behalf of the Buyer entity (minimum 2 characters)

    BuyerRepresentativeEmail

    string

    default: The email address of the user acting on behalf of the Buyer entity

    DeliveryAddressFullText

    string

    default: The one line full address text for the delivery address. Used for matching with buyer registered address for order validation but not mandatory.

    SessionId Required

    string

    default: The unique session identifier from the Marketplace, proving that the user performaing the request is authenticated in the Marketplace. It is an identifier that must be traceable in the Marketplace logs to establish legal proof that the user has been authenticated. If a session identifier cannot be supplied, a technical user identifier may be used, if it is possible to link this identifier to the person performing the request. This will be used as part of the Simple Digital Signature on the Buyer Product Agreement.

    LanguageISO2

    string

    default: The language to be used in the communication with the buyer or seller. Can be “fr” or "en", if not specified it defaults to English.

    }

  • CreateOrderResponse{

    TermsAndConditionsPageURL Required

    string

    default: The URL to the T&C page that has to be agreed by the buyer.

    HTTPStatus

    • REST_ERROR_RICH{

      HTTPCode

      integer ($int64)

      example: 1234567891234567

      developerMessage

      string

      default:

      userMessage

      string

      default:

      errorCode

      string

      default:

      moreInfo

      string

      default:

      }

    }

  • GetOrderFeesResponse{

    TERMSTechFeeAmount Required

    number

    example: 0.1

    HTTPStatus

    • REST_ERROR_RICH{

      HTTPCode

      integer ($int64)

      example: 1234567891234567

      developerMessage

      string

      default:

      userMessage

      string

      default:

      errorCode

      string

      default:

      moreInfo

      string

      default:

      }

    }

  • GetOrderStatusStructure{

    OrderStatus

    string

    default:

    }

  • HTTPStatusResponse{

    HTTPStatus

    • REST_ERROR_RICH{

      HTTPCode

      integer ($int64)

      example: 1234567891234567

      developerMessage

      string

      default:

      userMessage

      string

      default:

      errorCode

      string

      default:

      moreInfo

      string

      default:

      }

    }

  • REST_ERROR_RICH{

    HTTPCode

    integer ($int64)

    example: 1234567891234567

    developerMessage

    string

    default:

    userMessage

    string

    default:

    errorCode

    string

    default:

    moreInfo

    string

    default:

    }

  • SellerOrderRequest{
    A request for one order with one seller.

    SellerNationalID Required

    string

    default: The NationalIdentifier of the seller. The business entity of the seller must exist in the TERMS42 database but the seller does not necessarily need to be onboarded (depending on parameter is seller onboarding mandatory on marketplace level)

    SellerOrderReference Required

    string

    default: The Seller Order reference, will be used in the Payment reference for payments to the Seller and The Marketplace

    TotalAmount Required

    number

    example: 0.1
    The total amount of the order, including taxes and any shipping fees.

    MarketplaceFeesAmount Required

    number

    example: 0.1
    The amount of marketplace fees. May be 0 if there is no marketplace comission.

    }

  • ShippingRequest{

    TrackingNumber Required

    string

    default:

    CarrierName Required

    string

    default:

    }

  • UpdateBuyerOrderReferenceStructure{

    buyerOrderReference Required

    string

    default:

    newBuyerOrderReference Required

    string

    default:

    }

  • UpdateOrderRequest{

    NewTotalAmount Required

    number

    example: 0.1

    NewMarketplaceFeesAmount Required

    number

    example: 0.1

    }

POST
/seller-orders/{sellerOrderReference}-{DocumentType}-{DocumentName}/document
string
RESPONSE
{
  "HTTPStatus": {
    "HTTPCode": 1234567891234567,
    "developerMessage": "string",
    "userMessage": "string",
    "errorCode": "string",
    "moreInfo": "string"
  }
}

Notifications - Webhooks

TERMS.tech can send notifications of important events (relevant state changes). Customers (Marketplaces) can register an endpoint which will be called by TERMS.tech. The endpoint needs to subscribe to specific Event Types to receive notifications.

Authentication - Webhooks

The authentication for webhooks can be set via a secret and/or basic authentication (userid/password) both provided by the Customer. The notification receiver (Customer) will need to verify server-side the authentication, take the appropriate action to the event and determine to whom the notification needs to be dispatched.

Webhook - Requests

A POST request is sent to the configured Customer Webhook URL with the following body:

{    
"Id": "string",    
"UserId": "string",    
"OrderReference": "string",    
"OrderGUID": "string",    
"EventType": "string",    
"Payload": "string",    
"Notes": "string",    
"CreatedOn": "date-time"
}

Attributes
  • Id required

    Unique identifier for the event (GUID).

  • UserId

    UserId as used by the notification receiver (e.g. Marketplace) only to be used if the notification is not linked to an order and targeted to a specific user.

  • OrderReference

    Identifier of an order as used by the notification receiver (e.g. Marketplace).

  • OrderGUID

    Identifier of an order defined by TERMS.

  • EventType

    Code representing the type of event. Enumeration:
    TERMSBuyerNotOnboarded,
    TERMSCustomerOnboardingAccepted,
    TERMSCustomerOnboardingPending,
    TERMSCustomerOnboardingRefused,
    TERMSOrderAccepted,
    TERMSOrderCancelled,
    TERMSOrderRefused,
    TERMSPayinBuyerInDefault,
    TERMSPayinExecuted,
    TERMSPayoutAccepted,
    TERMSPayoutExecuted,
    TERMSPayoutUnderInvestigation,
    TERMSSellerNotOnboarded,

  • Payload

    Extra information, content depends on the EventType (structured).

  • Notes

    Extra information (unstructured).

  • CreatedOn

    example: 2014-12-31T23:59:59.938Z Timestamp of the notification creation.

EventTypes

Onboarding
  • TERMSCustomerOnboardingPending

    The onboarding (registration) process with the PSP is started.

  • TERMSCustomerOnboardingAccepted

    The customer was accepted but he PSP.

  • TERMSCustomerOnboardingRefused

    The customer was not accepted but he PSP.

Orders
  • TERMSOrderAccepted

    An order is eligible and accepted by TERMS.tech.

  • TERMSOrderRefused

    An order is not eligible and refused by TERMS.tech.

  • TERMSBuyerNotOnboarded

    An order is on hold because the buyer was not (yet) onboarded by the PSP.

  • TERMSSellerNotOnboarded

    An order is on hold because the seller was not (yet) onboarded by the PSP.

  • TERMSPayoutAccepted

    The pay-out (to the seller) is scheduled as the proof of delivery is verified (if needed).

  • TERMSPayoutUnderInvestigation

    The pay-out is on hold because the proof of delivery (delivery slip, invoice) needs extra verification.

  • TERMSPayoutExecuted

    The pay-out was successfully executed.

  • TERMSPayinBuyerInDefault

    The pay-in (from the buyer via SDD) did not succeed.

  • TERMSOrderCancelled

    An order with TERMS.tech is cancelled (multiple reasons: reason provided).

  • TERMSPayinExecuted

    The pay-in (from the buyer) succeeded and the order is settled.

Request ID's

Each API request has an associated request identifier. You can find this value in the response headers, under Request-Id. You can also find request identifiers in the URLs of individual request logs in your Dashboard. If you need to contact us about a specific request, providing the request identifier will ensure the fastest possible resolution.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

Authentication

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

post responses

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

GET responses

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

error handling

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

Request ID's

Each API request has an associated request identifier. You can find this value in the response headers, under Request-Id. You can also find request identifiers in the URLs of individual request logs in your Dashboard. If you need to contact us about a specific request, providing the request identifier will ensure the fastest possible resolution.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

Authentication

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

post responses

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

GET responses

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

error handling

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

Something Else

The Stripe API uses API keys to authenticate requests. You can view and manage your API keys in the Stripe Dashboard.

Test mode secret keys have the prefix sk_test_ and live mode secret keys have the prefix sk_live_. Alternatively, you can use restricted API keys for granular permissions.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.

If you need to authenticate via bearer auth (e.g., for a cross-origin request), use -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" instead of -u sk_test_4eC39HqLyjWDarjtT1zdp7dc.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Attributes
  • type string

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

  • doc_url required

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

  • charge string

    For card errors, the ID of the failed charge.

  • code string

    For some errors that could be handled programmatically, a short string indicating the error code reported.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

New Child Method

Each API request has an associated request identifier. You can find this value in the response headers, under Request-Id. You can also find request identifiers in the URLs of individual request logs in your Dashboard. If you need to contact us about a specific request, providing the request identifier will ensure the fastest possible resolution.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

Authentication

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

post responses

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

GET responses

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

error handling

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);

Something Else

The Stripe API uses API keys to authenticate requests. You can view and manage your API keys in the Stripe Dashboard.

Test mode secret keys have the prefix sk_test_ and live mode secret keys have the prefix sk_live_. Alternatively, you can use restricted API keys for granular permissions.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.

If you need to authenticate via bearer auth (e.g., for a cross-origin request), use -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" instead of -u sk_test_4eC39HqLyjWDarjtT1zdp7dc.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Attributes
  • type string

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

  • doc_url required

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

  • charge string

    For card errors, the ID of the failed charge.

  • code string

    For some errors that could be handled programmatically, a short string indicating the error code reported.

Was this section helpful?

POST
/v1/ava/endpoint/ids
curl https://api.stripe.com/v1/credit_notes/cn_1FWqvi2eZvKYlo2CZd3TwT6n \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d "metadata[order_id]=6735"
POST
/v1/ava/endpoint/ids
var stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

stripe.creditNotes.retrieve(
  'cn_1FWuAc2eZvKYlo2C1Kbk7sKK',
  function(err, creditNote) {
    // asynchronously called
  }
);