Menu

User Tools

Create PDF

Site Tools


This is an old revision of the document!


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 merchant support. Merchant support provides you with username and password.

REST API endpoints

Environment URL
Production https://checkout.wirecard.com/migration-transaction
Test https://checkout-test.wirecard.com/migration-transaction

Request

  • Content-Type: application/json
  • HTTP method: POST

JSON Schema

{
    "required": [
        "orderNumber",
        "paymentMethod"
    ],
    "properties": {
      "orderNumber": {
          "type": "integer",
      },
      "paymentMethod": {
          "type": "string",
      }
    }
}

Sample Requests

Sample Request for Credit Card

{
  "orderNumber": 123456,
  "paymentMethod" : "creditcard"
}

Sample Request for SEPA

{
  "orderNumber": 654321,
  "paymentMethod" : "sepa"
}

Response

Header

  • Content-Type: application/json
  • Possible status codes: 201 | 400 | 404 | 500

JSON Schema - Success Response

{
    "properties": {
        "orderNumber": {
            "type": "integer"
        },
        "merchantAccountId": {
            "type": "string"
        },
        "transactionId": {
            "type": "string"
        },
        "tokenId": {
            "type": "string"
        },
        "transactionServer": {
            "type": "string"
        }
    }
}

JSON Schema - Error Response

{
    "properties": {
        "status": {
            "type": "integer"
        },
        "message": "{
            "type" "string"
        }
    }
}

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.

{
  "orderNumber": 123456,
  "merchantAccountId": "62652b50-01d5-11e9-b568-0800200c9a66",
  "transactionId": "5d7fadd8-37d5-4578-a815-dcac8626121c",
  "tokenId": "4351742214741003"
  "transactionServer": "api-wdcee.wirecard.com",
}

Success Example 201 SEPA

{
  "orderNumber": 654321,
  "merchantAccountId": "62652b50-01d5-11e9-b568-0800200c9a66",
  "transactionId": "5d7fadd8-37d5-4578-a815-dcac8626121c",
  "transactionServer": "api-wdcee.wirecard.com",
}

Error Example 404

{
  "status": 404,
  "message": "Order not found."
}

Error Example 400

{
  "status": 400,
  "message": "OrderNumber '0' is too small."
}

Error Handling

Error Message Status Code Description Remedy
Provided Payment Method is not valid 400 This happens when POST payload as payment method has a value other than creditcard or sepa To recover from this, verify if 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 same merchant_account Contact merchant support.
Order with number '<x>' could not be found 404 This error occurs for CREDITCARD or SEPA request, when order does not exist in database Provide a valid order number in request.
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.