Samsung Pay

Below is the prerequisite for using Samsung Pay and also an example of a request to make it available in your store.

ℹ️

Important

The merchant must already have Samsung Pay registration and integration, otherwise it will not be possible to integrate with the API.

⚠️

Warning

The following integration should be used when sending encrypted card data. If the merchant sends the authorization request with decrypted card data, please refer to Create an e-wallet payment using decrypted card.

Request

Example of a standard Samsung Pay request:

{
  "MerchantOrderId": "6242-642-723",
  "Customer": {
    "Name": "Exemplo Wallet Padrão",
    "Identity": "11225468954",
    "IdentityType": "CPF"
  },
  "Payment": {
    "Type": "CreditCard",
    "Amount": 1,
    "Installments": 1,
    "Currency": "BRL",
    "Wallet": {
      "Type": "SamsungPay",
      "WalletKey": "IDENTIFICADOR DA LOJA NA WALLET"
    }
  }
}
curl
--request POST "https://apisandbox.cieloecommerce.cielo.com.br/1/sales/"
--header "Content-Type: application/json"
--header "MerchantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
--header "MerchantKey: 0123456789012345678901234567890123456789"
--header "RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
--data-binary
{
   "MerchantOrderId":"6242-642-723",
   "Customer":{
      "Name":"Exemplo Wallet Padrão",
      "Identity":"11225468954",
      "IdentityType":"CPF"
   },
   "Payment":{
      "Type":"CreditCard",
      "Amount":1,
      "Installments":1,
      "Currency":"BRL",
      "Wallet":{
         "Type":"SamsungPay",
         "WalletKey":"IDENTIFICADOR DA LOJA NA WALLET"
      }
   }
}

Property

Description

Type

Size

Required

MerchantId

Store identifier at Cielo.

GUID

36

Yes (sent in header)

MerchantKey

Public key for dual authentication at Cielo.

Text

40

Yes (sent in header)

RequestId

Request identifier, used when the merchant uses different servers for each GET/POST/PUT.

GUID

36

No (sent in header)

MerchantOrderId

Order ID number.

Text

50

Yes

Customer.Name

Customer's name.

Text

255

No

Customer.Status

Customer's registration status ("NEW" / "EXISTING").

Text

255

No

Payment.Type

Payment method type.

Text

100

Yes

Payment.Amount

Order amount in cents.

Number

15

Yes

Payment.Installments

Number of installments.

Number

2

Yes

Wallet.Type

Wallet type: "SamsungPay".

Text

255

Yes

Wallet.WalletKey

Cryptographic key representing card data. Consult the table WalletKey for more information.

Text

255

Yes

Response

{
  "MerchantOrderId": "2014111703",
  "Customer": {
    "Name": "[Guest]"
  },
  "Payment": {
    "ServiceTaxAmount": 0,
    "Installments": 1,
    "Interest": 0,
    "Capture": false,
    "Authenticate": false,
    "Recurrent": false,
    "CreditCard": {
      "CardNumber": "453211******1521",
      "Holder": "BJORN IRONSIDE",
      "ExpirationDate": "08/2020",
      "SaveCard": false,
      "Brand": "Visa"
    },
    "Tid": "0319040817883",
    "ProofOfSale": "817883",
    "AuthorizationCode": "027795",
    "Wallet": {
      "Type": "SamsungPay",
      "WalletKey": "IDENTIFICADOR DA LOJA NA WALLET",
      "Eci": 0
    },
    "SoftDescriptor": "123456789ABCD",
    "Amount": 100,
    "ReceivedDate": "2018-03-19 16:08:16",
    "Status": 1,
    "IsSplitted": false,
    "ReturnMessage": "Operation Successful",
    "ReturnCode": "4",
    "PaymentId": "e57b09eb-475b-44b6-ac71-01b9b82f2491",
    "Type": "CreditCard",
    "Currency": "BRL",
    "Country": "BRA",
    "Links": [
      {
        "Method": "GET",
        "Rel": "self",
        "Href": "https://apiquerysandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}"
      },
      {
        "Method": "PUT",
        "Rel": "capture",
        "Href": "https://apisandbox.cieloecommerce.cielo.com.br/1/sales/{paymentId}/capture"
      },
      {
        "Method": "PUT",
        "Rel": "void",
        "Href": "https://apisandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}/void"
      }
    ]
  }
}
--header "Content-Type: application/json"
--header "RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
--data-binary
{
    "MerchantOrderId": "2014111703",
    "Customer": {
        "Name": "[Guest]"
    },
    "Payment": {
        "ServiceTaxAmount": 0,
        "Installments": 1,
        "Interest": 0,
        "Capture": false,
        "Authenticate": false,
        "Recurrent": false,
        "CreditCard": {
            "CardNumber": "453211******1521",
            "Holder": "BJORN IRONSIDE",
            "ExpirationDate": "08/2020",
            "SaveCard": false,
            "Brand": "Visa"
        },
        "Tid": "0319040817883",
        "ProofOfSale": "817883",
        "AuthorizationCode": "027795",
        "Wallet": {
            "Type": "SamsungPay",
            "WalletKey": "IDENTIFICADOR DA LOJA NA WALLET",
            "Eci": 0
        },
        "SoftDescriptor": "123456789ABCD",
        "Amount": 100,
        "ReceivedDate": "2018-03-19 16:08:16",
        "Status": 1,
        "IsSplitted": false,
        "ReturnMessage": "Operation Successful",
        "ReturnCode": "4",
        "PaymentId": "e57b09eb-475b-44b6-ac71-01b9b82f2491",
        "Type": "CreditCard",
        "Currency": "BRL",
        "Country": "BRA",
        "Links": [
            {
                "Method": "GET",
                "Rel": "self",
                "Href": "https://apiquerysandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}"
            },
            {
                "Method": "PUT",
                "Rel": "capture",
                "Href": "https://apisandbox.cieloecommerce.cielo.com.br/1/sales/{paymentId}/capture"
            },
            {
                "Method": "PUT",
                "Rel": "void",
                "Href": "https://apisandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}/void"
            }
        ]
    }
}

Property

Description

Type

Size

Format

ProofOfSale

Authorization number, identical to the NSU.

Text

6

Alphanumeric

Tid

Transaction ID on the acquirer.

Text

20

Alphanumeric

AuthorizationCode

Authorization code.

Text

6

Alphanumeric

SoftDescriptor

Text to be printed on the bearer's bank statement. Note: Does not allow special characters. Available for VISA/MASTER only.

Text

13

Alphanumeric

PaymentId

Order identifier field.

GUID

36

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

ECI

  • Electronic Commerce Indicator_. Represents how secure a transaction is.

Text

2

E.g.: 7

Status

Transaction status.

Byte

2

E.g.: 1

ReturnCode

Return code from the acquirer.

Text

32

Alphanumeric

ReturnMessage

Return message from acquirer.

Text

512

Alphanumeric

Type

Wallet type: "SamsungPay"

Text

255

Alphanumeric

WalletKey

Cryptographic key representing card data. Consult the table WalletKey for more information.

Text

255

Refer to WalletKey