Menu

User Tools

Create PDF

Site Tools


Differences

This shows you the differences between two versions of the page.

Go

Link to this comparison view

token_migration_tool [2019-07-05 09:24]
token_migration_tool [2019-10-04 09:26] (current)
Line 1: Line 1:
 +====== Token Migration Tool ======
 +
 +
 +===== Introduction =====
 +
 +The Token Migration Tool (ToMi) enables merchants to continue processing recurring payments after migration to the Wirecard REST API. With ToMi, you just need to provide the order number which is currently used to reference a recurring transaction. ToMi uses this order number and returns the ''transactionId'' and the corresponding ''tokenId'' (only for credit card), which allows you to continue processing recurring transactions for that order without interruptions.
 +
 +===== Supported Payment Methods =====
 +  * Credit Card 
 +  * SEPA Direct Debit
 + 
 +===== User Access =====
 +Access is secured with basic access authentication. \\
 +You have to request access to the Token Migration Tool by contacting [[support.at@wirecard.com|merchant support]]. Merchant support provides you with username and password. 
 +
 +===== REST API endpoints =====
 +
 +^ Environment ^ URL ^
 +| Production | %%https://checkout.wirecard.com/migration-transaction%% |
 +
 + 
 +===== Request =====
 +
 +==== Header ====
 +
 +  * Content-Type: application/json
 +  * HTTP method: POST
 +
 +==== JSON Schema ====
 +
 +<code>
 +{
 +    "required": [
 +        "orderNumber",
 +        "paymentMethod"
 +    ],
 +    "properties": {
 +      "orderNumber": {
 +          "type": "integer",
 +      },
 +      "paymentMethod": {
 +          "type": "string",
 +      }
 +    }
 +}
 +</code>
 +
 +==== Sample Requests ====
 +
 +=== Sample Request for Credit Card ===
 +<code>
 +{
 +  "orderNumber": 123456,
 +  "paymentMethod" : "creditcard"
 +}
 +</code>
 +
 +=== Sample Request for SEPA ===
 +<code>
 +{
 +  "orderNumber": 654321,
 +  "paymentMethod" : "sepa"
 +}
 +</code>
 +
 +===== Response =====
 +
 +==== Header ====
 +  * Content-Type: application/json
 +  * Possible status codes: 201 | 400 | 404 | 500
 +
 +==== JSON Schema ====
 +
 +=== Success Response ===
 +<code>
 +{
 +    "properties": {
 +        "orderNumber": {
 +            "type": "integer"
 +        },
 +        "merchantAccountId": {
 +            "type": "string"
 +        },
 +        "transactionId": {
 +            "type": "string"
 +        },
 +        "tokenId": {
 +            "type": "string"
 +        },
 +        "transactionServer": {
 +            "type": "string"
 +        }
 +    }
 +}
 +</code>
 +
 +=== Error Response ===
 +
 +<code>
 +{
 +    "properties": {
 +        "status": {
 +            "type": "integer"
 +        },
 +        "message": {
 +            "type": "string"
 +        }
 +    }
 +}
 +</code>
 +
 +==== Sample Responses ====
 +Here you find possible responses for success and failure.
 +
 +=== Success Example 201 Credit Card ===
 +For payment method credit card, there is the additional response field ''tokenId''.
 +<code>
 +{
 +  "orderNumber": 123456,
 +  "merchantAccountId": "62652b50-01d5-11e9-b568-0800200c9a66",
 +  "transactionId": "5d7fadd8-37d5-4578-a815-dcac8626121c",
 +  "tokenId": "4351742214741003"
 +  "transactionServer": "api-wdcee.wirecard.com",
 +}
 +</code>
 +
 +=== Success Example 201 SEPA ===
 +
 +<code>
 +{
 +  "orderNumber": 654321,
 +  "merchantAccountId": "62652b50-01d5-11e9-b568-0800200c9a66",
 +  "transactionId": "5d7fadd8-37d5-4578-a815-dcac8626121c",
 +  "transactionServer": "api-wdcee.wirecard.com",
 +}
 +</code>
 +
 +=== Error Example 404 ===
 +
 +<code>
 +{
 +  "status": 404,
 +  "message": "Order not found."
 +}
 +</code>
 +
 +=== Error Example 400 ===
 +
 +<code>
 +{
 +  "status": 400,
 +  "message": "OrderNumber '0' is too small."
 +}
 +</code>
 +
 +===== Error Handling =====
 +
 +^ Error Message ^ Status Code ^ Description ^ Remedy ^
 +| Provided Payment Method is not valid | 400 | This happens if the ''paymentMethod'' in the request has a value other than ''creditcard'' or ''sepa''. | To recover from this, verify that the payment method is one of those two. |
 +| Entity not found | 404 | Possible reason is that merchant configuration is not valid, e.g. there are many configurations for the same ''merchant_account''. | [[support.at@wirecard.com|Contact merchant support]] for further questions. |
 +| Order with number '<x>' could not be found | 404 | This error occurs for a CREDITCARD or SEPA request when the order does not exist in the database. | Provide a valid order number in the request. \\ **The error is most likely caused by an outdated order number. Check the order creation date. An order number is valid for 400 days.** \\ [[support.at@wirecard.com|Contact merchant support]] for further questions. |
 +| Internal server error | 500 | Possible reason: HTTP method is not POST | Change HTTP method to POST. Do not use GET, PUT, ... |
  

This website uses cookies to deliver the best service to you. By continuing to browse the site, you are agreeing to our use of cookies.