Skip to content
This repository was archived by the owner on Mar 31, 2024. It is now read-only.
This repository was archived by the owner on Mar 31, 2024. It is now read-only.

Adicionar link para baixar e revisar recibos no template de email COMPANY_PAYMENT_INTENTENT_SUCEEDED #91

Description

@joaopcm

Usar o bloco de e-mail -> https://postmarkapp.com/transactional-email-templates/receipt
Acessar a propriedade receipt_url no objeto:

{
  "id": ["evt_3Ma0nKL35qcZeCtU0Mjm09o6"](https://dashboard.stripe.com/test/events/evt_3Ma0nKL35qcZeCtU0Mjm09o6),
  "object": "event",
  "api_version": "2022-08-01",
  "created": 1676051640,
  "data": {
    "object": {
      "id": ["pi_3Ma0nKL35qcZeCtU0TjCmjxn"](https://dashboard.stripe.com/test/payments/pi_3Ma0nKL35qcZeCtU0TjCmjxn),
      "object": "payment_intent",
      "amount": 4000,
      "amount_capturable": 0,
      "amount_details": {
        "tip": {
        }
      },
      "amount_received": 4000,
      "application": null,
      "application_fee_amount": null,
      "automatic_payment_methods": null,
      "canceled_at": null,
      "cancellation_reason": null,
      "capture_method": "automatic",
      "charges": {
        "object": "list",
        "data": [
          {
            "id": ["ch_3Ma0nKL35qcZeCtU0WS5kkh4"](https://dashboard.stripe.com/test/payments/ch_3Ma0nKL35qcZeCtU0WS5kkh4),
            "object": "charge",
            "amount": 4000,
            "amount_captured": 4000,
            "amount_refunded": 0,
            "application": null,
            "application_fee": null,
            "application_fee_amount": null,
            "balance_transaction": "txn_3Ma0nKL35qcZeCtU0W6IeK8E",
            "billing_details": {
              "address": {
                "city": null,
                "country": "BR",
                "line1": null,
                "line2": null,
                "postal_code": null,
                "state": null
              },
              "email": "juan.cbserrano@gmail.com",
              "name": "Juan",
              "phone": null
            },
            "calculated_statement_descriptor": "Stripe",
            "captured": true,
            "created": 1676051639,
            "currency": "brl",
            "customer": ["cus_NKg8EHjf4UPlMf"](https://dashboard.stripe.com/test/customers/cus_NKg8EHjf4UPlMf),
            "description": "Subscription creation",
            "destination": null,
            "dispute": null,
            "disputed": false,
            "failure_balance_transaction": null,
            "failure_code": null,
            "failure_message": null,
            "fraud_details": {
            },
            "invoice": ["in_1Ma0nKL35qcZeCtUBw6lzjFn"](https://dashboard.stripe.com/test/invoices/in_1Ma0nKL35qcZeCtUBw6lzjFn),
            "livemode": false,
            "metadata": {
            },
            "on_behalf_of": null,
            "order": null,
            "outcome": {
              "network_status": "approved_by_network",
              "reason": null,
              "risk_level": "normal",
              "risk_score": 33,
              "seller_message": "Payment complete.",
              "type": "authorized"
            },
            "paid": true,
            "payment_intent": ["pi_3Ma0nKL35qcZeCtU0TjCmjxn"](https://dashboard.stripe.com/test/payments/pi_3Ma0nKL35qcZeCtU0TjCmjxn),
            "payment_method": "pm_1Ma0nJL35qcZeCtUHdxR8Y3T",
            "payment_method_details": {
              "card": {
                "brand": "visa",
                "checks": {
                  "address_line1_check": null,
                  "address_postal_code_check": null,
                  "cvc_check": "pass"
                },
                "country": "US",
                "exp_month": 12,
                "exp_year": 2023,
                "fingerprint": "Vk4wgnyhWVDkNUQq",
                "funding": "credit",
                "installments": null,
                "last4": "4242",
                "mandate": null,
                "network": "visa",
                "three_d_secure": null,
                "wallet": null
              },
              "type": "card"
            },
            "receipt_email": null,
            "receipt_number": null,
            "receipt_url": "https://pay.stripe.com/receipts/invoices/CAcaFwoVYWNjdF8xTHo3UVpMMzVxY1plQ3RVKLmJmp8GMgZoEuk6u0A6LBaFoISZDewq_hIDc9AyLFzt6aRHfbEQXXtJayicgRz3Q8prhvDQkj5k1RQP?s=ap",
            "refunded": false,
            "refunds": {
              "object": "list",
              "data": [
              ],
              "has_more": false,
              "total_count": 0,
              "url": "/v1/charges/ch_3Ma0nKL35qcZeCtU0WS5kkh4/refunds"
            },
            "review": null,
            "shipping": null,
            "source": null,
            "source_transfer": null,
            "statement_descriptor": null,
            "statement_descriptor_suffix": null,
            "status": "succeeded",
            "transfer_data": null,
            "transfer_group": null
          }
        ],
        "has_more": false,
        "total_count": 1,
        "url": "/v1/charges?payment_intent=pi_3Ma0nKL35qcZeCtU0TjCmjxn"
      },
      "client_secret": "pi_3Ma0nKL35qcZeCtU0TjCmjxn_secret_XWmIvf1CYlPlsazor2r88J6dM",
      "confirmation_method": "automatic",
      "created": 1676051638,
      "currency": "brl",
      "customer": ["cus_NKg8EHjf4UPlMf"](https://dashboard.stripe.com/test/customers/cus_NKg8EHjf4UPlMf),
      "description": "Subscription creation",
      "invoice": ["in_1Ma0nKL35qcZeCtUBw6lzjFn"](https://dashboard.stripe.com/test/invoices/in_1Ma0nKL35qcZeCtUBw6lzjFn),
      "last_payment_error": null,
      "latest_charge": "ch_3Ma0nKL35qcZeCtU0WS5kkh4",
      "livemode": false,
      "metadata": {
      },
      "next_action": null,
      "on_behalf_of": null,
      "payment_method": "pm_1Ma0nJL35qcZeCtUHdxR8Y3T",
      "payment_method_options": {
        "boleto": {
          "expires_after_days": 3
        },
        "card": {
          "installments": null,
          "mandate_options": null,
          "network": null,
          "request_three_d_secure": "automatic",
          "setup_future_usage": "off_session"
        }
      },
      "payment_method_types": [
        "boleto",
        "card"
      ],
      "processing": null,
      "receipt_email": null,
      "review": null,
      "setup_future_usage": "off_session",
      "shipping": null,
      "source": null,
      "statement_descriptor": null,
      "statement_descriptor_suffix": null,
      "status": "succeeded",
      "transfer_data": null,
      "transfer_group": null
    }
  },
  "livemode": false,
  "pending_webhooks": 1,
  "request": {
    "id": "req_qoxR9a6pNPE2L2",
    "idempotency_key": "c614ce31-cdc2-446b-af83-35b16e92c1cf"
  },
  "type": "payment_intent.succeeded"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions