Atributos | Tipo | Descrição |
---|---|---|
type | string | Determina o tipo de token. Para Apple Pay deve-se enviar apple_pay |
apple_pay | object | Campos a serem enviados para pagamento com Apple Pay |
O objeto apple_pay
possui os seguintes atributos:
Atributos | Tipo | Descrição |
---|---|---|
version | string | Informação sobre a versão do token. Único valor aceito é EC_v1 |
merchant_identifier | string | Identificador da loja na Apple |
data | string | Dados de pagamento criptografados |
header | object | Informações utilizadas para descriptografar e verificar o pagamento |
signature | string | Assinatura dos dados de pagamento e do header |
Além disso, o objeto 'header' contém os seguintes atributos:
ephemeral_public_key | string | Ephemeral public key do lojista. EC_v1 apenas. |
public_key_hash | string | Hash da public key criptografada em X.509 do certificado da loja. |
transaction_id | string | É o id da transação, gerado no aparelho |
Atenção!
Todos os campos do objeto
apple_pay
são obrigatórios caso a transação seja feita por esse meio de pagamento!
{
"items": [{
"amount": 2990,
"description": "Chaveiro do Tesseract",
"quantity": 1
}
],
"customer": {
"name": "Tony Stark",
"email": "[email protected]"
},
"payments": [{
"payment_method": "credit_card",
"credit_card": {
"installments": 1,
"statement_descriptor": "AVENGERS",
"payload": {
"type": "apple_pay",
"apple_pay": {
"version": "EC_v1",
"merchant_identifier": "merchant.com.example.mundipagg",
"data": "uxXQ79wQwUFs/ffeQEzcu6u6HCZjBoVdxjxA/BLKUDheuEWSzm1GqWr05ablgcuqNZI1ia4cd52ePuAA2Rb/5iGbNvgQcxBWqBUJ45bJwIb3TsBdRaWMc7HDrDzvBXEtipGBfaep09CZiUQ2XeqaEqXATwGsW8wlwFmuUaoK05+u9KpIWzfA9fb3Ub/45TB0iu1ZWXQdxBSPRUJ771dKaMhdI9qqGZSsg7qb9Bxk+fQw5VXREAu57r7NN70zc6dwBS7kYk4OhieenPTc2iw8PGkqFUyXtb8vwF5TwGzDoKsosFURtFVgfXtpU8DCBM26uW9PX8DMe9mW7ohHrnmuCxRgdJevHLge8ckwE1xibGFsALe7e+GnZP691DGGi4C32G3H3GilDNufaG+NHdjVxS/UOnc5Z7/Vb1cZNg55Jt5r",
"header": {
"ephemeral_public_key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1H48bA6ULVpuJVmIwjw6uiH2774SmxlPVzztBMxVFSbBANxlqqTL2lM3HG9LwW09mYTkpkgsK1KHgaKDwI6eWg==",
"public_key_hash": "Z1/wkFT2/GKkQ/wJnq1RiqB2SlKuPoBMQTUkGlLKIaY=",
"transaction_id": "a1a24121fd3c9dcf5e9efb41af99c4a516094ec624e9f40fbbe5865442d8d8e8"
},
"signature": "MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5jCCA4ugAwIBAgIIaGD2mdnMpw8wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTE2MDYwMzE4MTY0MFoXDTIxMDYwMjE4MTY0MFowYjEoMCYGA1UEAwwfZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtU0FOREJPWDEUMBIGA1UECwwLaU9TIFN5c3RlbXMxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgjD9q8Oc914gLFDZm0US5jfiqQHdbLPgsc1LUmeY+M9OvegaJajCHkwz3c6OKpbC9q+hkwNFxOh6RCbOlRsSlaOCAhEwggINMEUGCCsGAQUFBwEBBDkwNzA1BggrBgEFBQcwAYYpaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZWFpY2EzMDIwHQYDVR0OBBYEFAIkMAua7u1GMZekplopnkJxghxFMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUI/JJxE+T5O8n5sT2KGw/orv9Lksw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9PuoFQl4cUlxg3a/kGC3FeePxI7AAAAAAAA"
}
}
}
}
]
}
{
"id": "or_57oxkMntecE1P6JO",
"code": "PGW5F69IX6",
"amount": 2990,
"currency": "BRL",
"closed": true,
"items": [{
"id": "oi_DZlmrdXfXQcmr5kO",
"description": "Chaveiro do Tesseract",
"amount": 2990,
"quantity": 1,
"status": "active",
"created_at": "2019-01-21T18:37:48Z",
"updated_at": "2019-01-21T18:37:48Z",
"order": {
"id": "or_57oxkMntecE1P6JO",
"code": "PGW5F69IX6",
"amount": 2990,
"closed": true,
"created_at": "2019-01-21T18:37:48Z",
"updated_at": "2019-01-21T18:37:48Z",
"closed_at": "2019-01-21T18:37:48Z",
"currency": "BRL",
"status": "paid",
"customer_id": "cus_n3bqEzdsZUmNA7Qp",
"items": [{
"id": "oi_DZlmrdXfXQcmr5kO",
"description": "Chaveiro do Tesseract",
"amount": 2990,
"quantity": 1,
"status": "active"
}
]
}
}
],
"customer": {
"id": "cus_n3bqEzdsZUmNA7Qp",
"name": "Tony Stark",
"email": "[email protected]",
"delinquent": false,
"created_at": "2019-01-21T18:36:30Z",
"updated_at": "2019-01-21T18:36:30Z",
"phones": {}
},
"status": "paid",
"created_at": "2019-01-21T18:37:48Z",
"updated_at": "2019-01-21T18:37:48Z",
"closed_at": "2019-01-21T18:37:48Z",
"charges": [{
"id": "ch_PNbX8jDIPuL1p5nM",
"code": "PGW5F69IX6",
"amount": 2990,
"paid_amount": 2990,
"status": "paid",
"currency": "BRL",
"payment_method": "credit_card",
"paid_at": "2019-01-21T18:37:48Z",
"created_at": "2019-01-21T18:37:48Z",
"updated_at": "2019-01-21T18:37:48Z",
"customer": {
"id": "cus_n3bqEzdsZUmNA7Qp",
"name": "Tony Stark",
"email": "[email protected]",
"delinquent": false,
"created_at": "2019-01-21T18:36:30Z",
"updated_at": "2019-01-21T18:36:30Z",
"phones": {}
},
"last_transaction": {
"id": "tran_4vP712Qs6tkxmkDV",
"transaction_type": "credit_card",
"gateway_id": "d7809471-4a89-4198-9a30-bf621ef2f8fc",
"amount": 1490,
"status": "captured",
"success": true,
"installments": 1,
"statement_descriptor": "AVENGERS",
"acquirer_name": "simulator",
"acquirer_affiliation_code": "",
"acquirer_tid": "287049",
"acquirer_nsu": "337532",
"acquirer_auth_code": "862029",
"acquirer_message": "Simulator|Transação de simulação autorizada com sucesso",
"acquirer_return_code": "0",
"operation_type": "auth_and_capture",
"card": {
"id": "card_2qE8eEGSrHqR7j3Q",
"first_six_digits": "483026",
"last_four_digits": "7665",
"brand": "Visa",
"holder_name": "APPLE PAY",
"exp_month": 12,
"exp_year": 2023,
"status": "active",
"type": "credit",
"tokenization_method": "apple_pay",
"created_at": "2018-10-02T16:49:27Z",
"updated_at": "2018-10-02T16:49:27Z"
},
"created_at": "2018-10-02T16:49:27Z",
"updated_at": "2018-10-02T16:49:27Z",
"gateway_response": {
"code": "201"
}
}
}
],
"checkouts": []
}