Examples

See some sample requests.

Create encrypted credit card payment

We used an order already created and sent the hash of the card to create the payment.

{  
   "installmentCount":6,
   "statementDescriptor":"my-store.com",
   "fundingInstrument":{  
      "method":"CREDIT_CARD",
      "creditCard":{  
         "hash": "HhL0kbhfid+jwgj5l6Kt9EPdetDxQN8s7uKUHDYxDC/XoULjzik44rSda3EcWuOcL17Eb8JjWc1JI7gsuwg9P0rJv1mJQx+d3Dv1puQYz1iRjEWWhnB1bw0gTvnnC/05KbWN5M8oTiugmhVK02Rt2gpbcTtpS7VWyacfgesBJFavYYMljYg8p2YGHXkXrMuQiOCeemKLk420d0OTMBba27jDVVJ663HZDrObnjFXJH/4B5irkj+HO5genV+V4PYoLcOESG4nrI3oFAsMGsLLcdJo0NNvkEmJpn0e9GzureKKFYisYU+BEd9EMr/odS0VMvOYRV65HbPTspIkjl2+3Q==",
         "store":true,
         "holder":{  
            "fullname":"Credit card holder name",
            "birthdate":"1988-12-30",
            "taxDocument":{  
               "type":"CPF",
               "number":"78994193600"
            },
            "phone":{  
               "countryCode":"55",
               "areaCode":"11",
               "number":"22849560"
            },
            "billingAddress":{  
               "city":"Belo Horizonte",
               "district":"Savassi",
               "street":"Avenida Contorno",
               "streetNumber":"400",
               "zipCode":"76932800",
               "state":"MG",
               "country":"BRA"
            }
         }
      }
   },
   "device":{  
      "ip":"127.0.0.1",
      "geolocation":{  
         "latitude":-33.867,
         "longitude":151.206
      },
      "userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36",
      "fingerprint":"QAZXswedCVGrtgBNHyujMKIkolpQAZXswedCVGrtgBNHyujMKIkolpQAZXswedCVGrtgBNHyujMKIkolpQAZXswedCVGrtgBNHyujMKIkolp"
   }
}
#
# This example is based in our SDK developed in Ruby, available
# on: https://github.com/wirecardBrasil/moip-sdk-ruby
#

payment = api.payment.create(order.id,
  installment_count: 6,
  funding_instrument: {
    method: "CREDIT_CARD",
    credit_card: {
      hash: "kJHoKZ2bIVFjEFPSQQxbpXL6t5VCMoGTB4eJ4GLHmUz8f8Ny/LSL20yqbn+bZQymydVJyo3lL2DMT0dsWMzimYILQH4vAF24VwM0hKxX7nVwqGpGCXwBwSJGCwR57lqDiI4RVhKTVJpu7FySfu+Hm9JWSk4fzPXQO/FRqIS5TJQWJSywjLmGwyYtTGsmHTSCwvPFg+0GcG/EkYjPesMc/ycxPixibrEId9Wz03QnLsHYzSBCnPqg8xq8WKYDX2x3dHV3GNsB4TEfVz4psynddDEpX/VhIk2e8cXQ0EoXKkWdJEJB4KFmqj39OhNevCBkF5ADvzFp73J0IxnjOf1AQA==",
      holder: {
        fullname: "Roberto Oliveira",
        birthdate: "1988-12-30",
        taxDocument: {
          type: "CPF",
          number: "78994193600",
        },
        phone: {
          countryCode: "55",
          areaCode: "11",
          number: "22849560",
        },
        billingAddress: {  
               city: "Belo Horizonte", 
               district: "Savassi", 
               street: "Avenida Contorno", 
               streetNumber: "400", 
               zipCode: "76932800", 
               state: "MG", 
               country: "BRA"
        },
      },
    },
  })
<?php

/**
* This example is based in our SDK developed in PHP, available
* on: https://github.com/wirecardBrasil/moip-sdk-php
*/

$holder = $moip->holders()->setFullname('Jose Silva')
    ->setBirthDate("1990-10-10")
    ->setTaxDocument('22222222222', 'CPF')
    ->setPhone(11, 66778899, 55)
    ->setAddress('BILLING', 'Avenida Faria Lima', '2927', 'Itaim', 'Sao Paulo', 'SP', '01234000', 'Apt 101');

$hash = 'HhL0kbhfid+jwgj5l6Kt9EPdetDxQN8s7uKUHDYxDC/XoULjzik44rSda3EcWuOcL17Eb8JjWc1JI7gsuwg9P0rJv1mJQx+d3Dv1puQYz1iRjEWWhnB1bw0gTvnnC/05KbWN5M8oTiugmhVK02Rt2gpbcTtpS7VWyacfgesBJFavYYMljYg8p2YGHXkXrMuQiOCeemKLk420d0OTMBba27jDVVJ663HZDrObnjFXJH/4B5irkj+HO5genV+V4PYoLcOESG4nrI3oFAsMGsLLcdJo0NNvkEmJpn0e9GzureKKFYisYU+BEd9EMr/odS0VMvOYRV65HbPTspIkjl2+3Q==';

$payment = $order->payments()
        ->setCreditCardHash($hash, $holder)
        ->setInstallmentCount(6)
        ->setStatementDescriptor("Minha Loja")
        ->execute();
    
print_r($payment);
/**
* This example is based in our SDK developed in Java, available
* on: https://github.com/wirecardBrasil/moip-sdk-java
*/

Map<String, Object> taxDocument = payloadFactory(
    value("type", "CPF"),
    value("number", "33333333333")
);

Map<String, Object> phone = payloadFactory(
    value("countryCode", "55"),
    value("areaCode", "11"),
    value("number", "66778899")
);

Map<String, Object> holder = payloadFactory(
    value("fullname", "Portador Teste Moip"),
    value("birthdate", "1988-12-30"),
    value("taxDocument", taxDocument),
    value("phone", phone)
);

Map<String, Object> creditCard = payloadFactory(
    value("hash", "HhL0kbhfid+jwgj5l6Kt9EPdetDxQN8s7uKUHDYxDC/XoULjzik44rSda3EcWuO" +
    "cL17Eb8JjWc1JI7gsuwg9P0rJv1mJQx+d3Dv1puQYz1iRjEWWhnB1bw0gTvnn" +
    "C/05KbWN5M8oTiugmhVK02Rt2gpbcTtpS7VWyacfgesBJFavYYMljYg8p2YGH" +
    "XkXrMuQiOCeemKLk420d0OTMBba27jDVVJ663HZDrObnjFXJH/4B5irkj+HO5" +
    "genV+V4PYoLcOESG4nrI3oFAsMGsLLcdJo0NNvkEmJpn0e9GzureKKFYisYU+" +
    "BEd9EMr/odS0VMvOYRV65HbPTspIkjl2+3Q=="),
    value("holder", holder)
);

Map<String, Object> fundingInstrument = payloadFactory(
    value("method", "CREDIT_CARD"),
    value("creditCard", creditCard)
);

Map<String, Object> payment = payloadFactory(
    value("installmentCount", 1),
    value("statementDescriptor", "minhaLoja.com"),
    value("fundingInstrument", fundingInstrument)
);

Map<String, Object> newPay = Moip.API.payments().pay(payment, "order_id", setup);
var body = new PaymentRequest
{
   InstallmentCount = 1,
   FundingInstrument = new Fundinginstrument
   {
       Method = "CREDIT_CARD",
       CreditCard = new Creditcard
       {
           Hash = "HhL0...pIkjl2+3Q==",
           Holder = new Holder
           {
               FullName = "Jose Portador da Silva",
               BirthDate = "1988-12-30",
               TaxDocument = new Taxdocument
               {
                   Type = "CPF",
                   Number = "33333333333"
               }
           }
       }
   }
};          
var result = await WC.Payment.Create(body, "ORD-XXXXXXXXXXXX");
/**
* This example is based in our SDK developed in Node js, available
* on: https://github.com/wirecardBrasil/moip-sdk-node
*/

const moip = require('moip-sdk-node').default({
  accessToken: 'your-access-token',
  production: false
})

moip.payment.create('ORD-SFGB23X8WAVQ', {
    installmentCount: 1,
    fundingInstrument: {
        method: 'CREDIT_CARD',
        creditCard: {        
            hash: 'Credit Card HASH -> generated using the JS encryption SDK',
            holder: {
                fullname: 'Jose Santos',
                birthdate: '1980-01-02',
                taxDocument: {
                    type: 'CPF',
                    number: '12345679891'
                },
                phone: {
                    countryCode: '55',
                    areaCode: '11',
                    number: '25112511'
                }
            }
        }
    }
}).then((response) => {
    console.log(response.body)
}).catch((err) => {
    console.log(err)
})

👍

TIP

You can generate the following hash using a Moip Javascript SDK where you use the customer credit_card data and your public key to create the hash.

Read more about creating credit card hash here.

Create payment with banking billet

Example:

{  
   "fundingInstrument":{  
      "method":"BOLETO",
      "boleto":{  
         "expirationDate":"2020-06-20",
         "instructionLines":{  
            "first":"Instruction 1,",
            "second":"Instruction 2",
            "third":"Instruction 3"
         },
         "logoUri":"http://www.my-store.com/logo.jpg"
      }
   }
}
#
# This example is based in our SDK developed in Ruby, available
# on: https://github.com/wirecardBrasil/moip-sdk-ruby
#

payment = api.payment.create("ORD-2SEQRXM27MV1", {   
   funding_instrument: : {  
      method: 'BOLETO', 
      boleto: {  
         expirationDate: '2020-06-20', 
         instructionLines: {  
             first:"Instruction 1,",
             second:"Instruction 2",
             third:"Instruction 3"
         },
            logoUri:"http://www.my-store.com/logo.jpg"
      }
   }
 })
<?php

/**
* This example is based in our SDK developed in PHP, available
* on: https://github.com/wirecardBrasil/moip-sdk-php
*/

        $logo_uri = "http://www.my-store.com/logo.jpg";
    $expiration_date = "2020-06-20";
    $instruction_lines = [
        "Instruction 1,",                                        
        "Instruction 2,",     
        "Instruction 3."                
    ];

    $payment = $order->payments()
        ->setBoleto($expiration_date, $logo_uri, $instruction_lines)
        ->execute();
    
print_r($payment);
/**
* This example is based in our SDK developed in Java, available
* on: https://github.com/wirecardBrasil/moip-sdk-java
*/

Map<String, Object> instructionLines = payloadFactory(
    value("first", "First instruction line!"),
    value("second", "Second instruction line!"),
    value("third", "Third instruction line!")
)

Map<String, Object> boleto = payloadFactory(
    value("expirationDate", "2020-06-20"),
    value("instructionLines", instructionLines),
    value("logoUri", "http://www.my-store.com/logo.jpg")
);

Map<String, Object> fundingInstrument = payloadFactory(
    value("method", "BOLETO");
    value("boleto", boleto);
);

Map<String, Object> payment = payloadFactory(
    value("installmentCount", 1),
    value("fundingInstrument", fundingInstrument)
);

Map<String, Object> newPay = Moip.API.payments().pay(payment, "order_id", setup);
var body = new PaymentRequest
{
    FundingInstrument = new Fundinginstrument
    {
        Method = "BOLETO",
        Boleto = new Boleto
        {
            ExpirationDate = "2020-06-20",
            InstructionLines = new Instructionlines
            {
                First = "Instruction 1",
                Second = "Instruction 2",
                Third = "Instruction 3"
            }
        }        
    }
};
var result = await WC.Payment.Create(body, "ORD-XXXXXXXXXXXX");
/**
* This example is based in our SDK developed in Java, available
* on: https://github.com/wirecardBrasil/moip-sdk-java
*/

const moip = require('moip-sdk-node').default({
  accessToken: 'your-access-token',
  production: false
})

moip.payment.create('ORD-SFGB23X8WAVQ', {
    installmentCount: 1,
    fundingInstrument: {
        method: "BOLETO",
        boleto: {
            expiration_date: "2017-09-30",
            instruction_lines: {
                first:  "Instruction 1",
                second: "Instruction 2",
                third:  "Instruction 3"
            },
            logo_uri: "https://www.my-store.com/logo.jpg"
        }
    }
}).then((response) => {
    console.log(response.body)
}).catch((err) => {
    console.log(err)
})

🚧

IMPORTANT

The zip code is an 8 digit value numbers. If you enter only 7 digits, the API will add a leading zero to the value.

Create payment with online debit

Example:

{  
   "fundingInstrument":{  
      "method":"ONLINE_BANK_DEBIT",
      "onlineBankDebit":{  
         "bankNumber":341,
         "expirationDate":"2020-11-22"
      }
   }
}
#
# This example is based in our SDK developed in Ruby, available
# on: https://github.com/wirecardBrasil/moip-sdk-ruby
#

payment = api.payment.create("ORD-2SEQRXM27MV1", {  
   funding_instrument:{  
      method:"ONLINE_BANK_DEBIT",
      onlineBankDebit:{  
         bankNumber:341,
         expirationDate:"2020-11-22"
      }
   }
}
<?php

/**
* This example is based in our SDK developed in PHP, available
* on: https://github.com/wirecardBrasil/moip-sdk-php
*/

$bankNumber = "341";
$expirationDate = "2020-11-22";
$returnUri = "https://www.meusite.com.br";

$payment = $order->payments()
    ->setOnlineBankDebit($bankNumber, $expirationDate, $returnUri)
    ->setStatementDescriptor("Minha Loja")
    ->execute();
    
print_r($payment);
/**
* This example is based in our SDK developed in Java, available
* on: https://github.com/wirecardBrasil/moip-sdk-java
*/

Map<String, Object> onlineBankDebit = payloadFactory(
    value("bankNumber", 341),
    value("expirationDate", "2020-11-22")
);

Map<String, Object> fundingInstrument = payloadFactory(
    value("method", "ONLINE_BANK_DEBIT"),
    value("onlineBankDebit", onlineBankDebit)
);

Map<String, Object> payment = payloadFactory(
    value("installmentCount", 1),
    value("statementDescriptor", "minhaLoja.com"),
    value("fundingInstrument", fundingInstrument)
);

Map<String, Object> newPay = Moip.API.payments().pay(payment, "order_id", setup);
/**
* This example is based in our SDK developed in Node js, available
* on: https://github.com/wirecardBrasil/moip-sdk-node
*/

const moip = require('moip-sdk-node').default({
  accessToken: 'your-access-token',
  production: false
})

moip.payment.create('ORD-SFGB23X8WAVQ', {  
   fundingInstrument: {  
      method:"ONLINE_BANK_DEBIT",
      onlineBankDebit: {  
         bankNumber: 341,
         expirationDate: "2020-11-22"
      }
   }
}).then((response) => {
    console.log(response.body)
}).catch((err) => {
    console.log(err)
})
var body = new PaymentRequest
{
    FundingInstrument = new Fundinginstrument
    {
        Method = "ONLINE_BANK_DEBIT",
        OnlineBankDebit = new Onlinebankdebit
        {
            BankNumber = "341",
            ExpirationDate = "2020-10-22"
        }
    }
};
var result = await WC.Payment.Create(body, "ORD-XXXXXXXXXXXX");

Create pre authorized payment

Our APIs allow you to control the pre-authorization and the capture flow a credit card transaction, in this way, unlike the default setting in which the Wirecard performs the transaction capture after the anti-fraud analysis (authorized status), you can control when the capture will be performed.

To pre-authorize a payment, simply use the delayCapture parameter in the payment creation request. Below is an example of a call with the configured parameter.

{  
   "installmentCount":3,
   "delayCapture":true,
   "statementDescriptor":"my-store.com",
   "fundingInstrument":{  
      "method":"CREDIT_CARD",
      "creditCard":{  
 "hash": "KFLeL2jg14a5aJ0QoVEtgFfuYMf8n/ymby5NpBkj6XkTwSRiqWBMS0kUYg0JfQwF8DG2Ry528dAL5J9o5+bcXf/5sX77sPQ2yJfbzqBKlgG+xPMPaye8lgI6fGBzEJz3gJh6RdBfuY+Fqx7s3i0wxaObO3eisLXjDVPWKIa/JUB1qufxYcUg+9t0Q8rYwbaCYVBgb94RGg3EIxmaMUbukSFg7npUnbelPF77NTMLi7PWDeboSdpNQxHLW4UIcdbA7QyGmOU185yFFOuf+zD1Hscj4NP/YP23CENtsJ5ISQA2mdlFNtnLmgH7AP/7LpP8NZneC0eVamYA6/LxbYMU6Q==",
         "store":true,
         "holder":{  
            "fullname":"Credit card holder name",
            "birthdate":"1988-12-30",
            "taxDocument":{  
               "type":"CPF",
               "number":"78994193600"
            },
            "phone":{  
               "countryCode":"55",
               "areaCode":"11",
               "number":"22849560"
            },
            "billingAddress":{  
               "city":"Belo Horizonte",
               "district":"Savassi",
               "street":"Avenida Contorno",
               "streetNumber":"400",
               "zipCode":"76932800",
               "state":"MG",
               "country":"BRA"
            }
         }
      }
   }
}
#
# Este exemplo usa a SDK do Moip de Ruby, disponível
# em: https://github.com/moip/moip-sdk-ruby
#

payment = api.payment.create(
  order.id,
  installment_count: 1,
  delayCapture: true,
  funding_instrument: {
    method: 'CREDIT_CARD',
    credit_card: {
      hash: 'KFLeL2jg14a5aJ0QoVEtgFfuYMf8n/ymby5NpBkj6XkTwSRiqWBMS0kUYg0JfQwF8DG2Ry528dAL5J9o5+bcXf/5sX77sPQ2yJfbzqBKlgG+xPMPaye8lgI6fGBzEJz3gJh6RdBfuY+Fqx7s3i0wxaObO3eisLXjDVPWKIa/JUB1qufxYcUg+9t0Q8rYwbaCYVBgb94RGg3EIxmaMUbukSFg7npUnbelPF77NTMLi7PWDeboSdpNQxHLW4UIcdbA7QyGmOU185yFFOuf+zD1Hscj4NP/YP23CENtsJ5ISQA2mdlFNtnLmgH7AP/7LpP8NZneC0eVamYA6/LxbYMU6Q==',
      store: true,
      holder: {
        fullname: 'Roberto Oliveira',
        birthdate: '1988-12-30',
        taxDocument: {
          type: 'CPF',
          number: '78994193600'
        },
        phone: {
          countryCode: '55',
          areaCode: '11',
          number: '22849560'
        },
        billingAddress: {
          city: 'Belo Horizonte',
          district: 'Savassi',
          street: 'Avenida Contorno',
          streetNumber: '400',
          zipCode: '76932800',
          state: 'MG',
          country: 'BRA'
        }
      }
    }
  }
)
<?php

/**
* Este exemplo usa a SDK do Moip de PHP, disponível 
* em: https://github.com/moip/moip-sdk-php
*/

$holder = $moip->holders()->setFullname('Jose Silva')
    ->setBirthDate("1990-10-10")
    ->setTaxDocument('22222222222', 'CPF')
    ->setPhone(11, 66778899, 55)
    ->setAddress('BILLING', 'Avenida Faria Lima', '2927', 'Itaim', 'Sao Paulo', 'SP', '01234000', 'Apt 101');

$hash = "KFLeL2jg14a5aJ0QoVEtgFfuYMf8n/ymby5NpBkj6XkTwSRiqWBMS0kUYg0JfQwF8DG2Ry528dAL5J9o5+bcXf/5sX77sPQ2yJfbzqBKlgG+xPMPaye8lgI6fGBzEJz3gJh6RdBfuY+Fqx7s3i0wxaObO3eisLXjDVPWKIa/JUB1qufxYcUg+9t0Q8rYwbaCYVBgb94RGg3EIxmaMUbukSFg7npUnbelPF77NTMLi7PWDeboSdpNQxHLW4UIcdbA7QyGmOU185yFFOuf+zD1Hscj4NP/YP23CENtsJ5ISQA2mdlFNtnLmgH7AP/7LpP8NZneC0eVamYA6/LxbYMU6Q==";
    
$payment = $order->payments()
    ->setCreditCardHash($hash, $holder)
    ->setInstallmentCount(3)
    ->setStatementDescriptor("Minha Loja")
    ->setDelayCapture()
    ->execute();
    
print_r($payment);
/**
 * Este exemplo usa a SDK do Moip de Java, disponível 
 * em: https://github.com/moip/moip-sdk-java
 */

Map<String, Object> taxDocument = payloadFactory(
    value("type", "CPF"),
    value("number", "33333333333")
);

Map<String, Object> phone = payloadFactory(
    value("countryCode", "55"),
    value("areaCode", "11"),
    value("number", "66778899")
);

Map<String, Object> holder = payloadFactory(
    value("fullname", "Portador Teste Moip"),
    value("birthdate", "1988-12-30"),
    value("taxDocument", taxDocument),
    value("phone", phone)
);

Map<String, Object> creditCard = payloadFactory(
    value("hash", "CREDIT_CARD_HASH"),
    value("holder", holder)
);

Map<String, Object> fundingInstrument = payloadFactory(
    value("method", "CREDIT_CARD"),
    value("creditCard", creditCard)
);

Map<String, Object> payment = payloadFactory(
    value("installmentCount", 1),
    value("statementDescriptor", "minhaLoja.com"),
    value("delayCapture", true),
    value("fundingInstrument", fundingInstrument)
);

Map<String, Object> newPreAuthorizedPayment = Moip.API.payments().pay(payment, "order_id", setup);
/**
* Este exemplo usa a SDK do Moip de Node, disponível 
* em: https://github.com/moip/moip-sdk-node
*/

const moip = require('moip-sdk-node').default({
  accessToken: 'your-access-token',
  production: false
})

moip.payment.create('ORD-SFGB23X8WAVQ', {
    installmentCount: 1,
    delayCapture: true,
    fundingInstrument: {
        method: 'CREDIT_CARD',
        creditCard: {        
            hash: 'Credit Card HASH -> generated using the JS encryption SDK',
            holder: {
                fullname: 'Jose Santos',
                birthdate: '1980-01-02',
                taxDocument: {
                    type: 'CPF',
                    number: '12345679891'
                },
                phone: {
                    countryCode: '55',
                    areaCode: '11',
                    number: '25112511'
                }
            }
        }
    }
}).then((response) => {
    console.log(response.body)
}).catch((err) => {
    console.log(err)
})
var body = new PaymentRequest
{
    //informe os campos aqui
    DelayCapture = true,
    InstallmentCount = 1,
    FundingInstrument = new Fundinginstrument
    {
        Method = "CREDIT_CARD",
        CreditCard = new Creditcard
        {
            Id = "CRC-XXXXXXXXXXXX",
            Cvc = "123",
            Holder = new Holder
            {
                FullName = "Jose Portador da Silva",
                BirthDate = "1988-12-30",
                TaxDocument = new Taxdocument
                {
                    Type = "CPF",
                    Number = "33333333333"
                }
            }
        }
    }
};
var result = await WC.Payment.Create(body, "ORD-XXXXXXXXXXXX");

❗️

ATTENTION

Upon the recommendation of the credit card companies, a pre-authorized payment shall be captured, in up to 5 days . If this period is exceeded, Wirecard will automatically cancel the payment.

Create 1click2buy payment

{  
   "installmentCount":6,
   "statementDescriptor":"my-store.com",
   "fundingInstrument":{  
      "method":"CREDIT_CARD",
      "creditCard":{  
         "id": "CRC-123ABC456DEF",
         "cvc":123
      }
   }
}
<?php

/**
* This example is based in our SDK developed in PHP, available
* on: https://github.com/wirecardBrasil/moip-sdk-php
*/

$creditCardId = "CRC-123ABC456DEF";
$cvc = "123";
    
$payment = $order->payments()
    ->setCreditCardSaved($creditCardId, $cvc)
    ->setInstallmentCount(3)
    ->setStatementDescriptor("My store")
    ->execute();
    
print_r($payment);
/**
* This example is based in our SDK developed in Node js, available
* on: https://github.com/wirecardBrasil/moip-sdk-node
*/

const moip = require('moip-sdk-node').default({
  accessToken: 'your-access-token',
  production: false
})

moip.payment.create('ORD-SFGB23X8WAVQ', {
    installmentCount: 1,
    fundingInstrument: {
        method: 'CREDIT_CARD',
        creditCard: {        
            id: 'CRC-123ABC456DEF',
            cvc: '123'
        }
      }
}).then((response) => {
    console.log(response.body)
}).catch((err) => {
    console.log(err)
})
#
# This example is based in our SDK developed in Ruby, available
# on: https://github.com/wirecardBrasil/moip-sdk-ruby
#

payment = api.payment.create(order.id,
  {
  installment_count: 6,
  funding_instrument: {
    method: "CREDIT_CARD",
    credit_card: {
      id: "CRC-123ABC456DEF",
      cvc:"123"
       }
    }
  })
/**
* This example is based in our SDK developed in Java, available
* on: https://github.com/wirecardBrasil/moip-sdk-java
*/

Map<String, Object> creditCard = payloadFactory(
    value("id", "CRC-123ABC456DEF"),
    value("cvc", "123")
);

Map<String, Object> fundingInstrument = payloadFactory(
    value("method", "CREDIT_CARD"),
    value("creditCard", creditCard)
);

Map<String, Object> payment = payloadFactory(
    value("installmentCount", 1),
    value("statementDescriptor", "minhaLoja.com"),
    value("fundingInstrument", fundingInstrument)
);

Map<String, Object> newPay = Moip.API.payments().pay(payment, "order_id", setup);
var body = new PaymentRequest
{
   //informe os campos aqui
   InstallmentCount = 1,
   FundingInstrument = new Fundinginstrument
   {
       Method = "CREDIT_CARD",
       CreditCard = new Creditcard
       {
           Id = "CRC-XXXXXXXXXXXX",
           Cvc = "123"
       }
   }
};          
var result = await WC.Payment.Create(body, "ORD-XXXXXXXXXXXX");