Skip to content

Logo

Stripe

Financial infrastructure for the internet

Supports in this guide: Payments

Provider website: stripe.com


What you need to do for start processing transactions (brief summary)

  1. Choose account type
  2. Get your credentials (from Stripe)
  3. Connect in Dashboard
  4. Send an API request

Choose account type

Stripe can be connected in different ways (depending on your needs):

  • If you do H2H card payments (card data sent directly to Stripe) -> choose H2H Merchant account
  • If you do redirect payments via Stripe Checkout (customer redirected to Stripe's hosted page, with access to many local payment methods beyond cards) -> choose Provider account

If you're not sure which one to use, confirm with your Corefy account manager.


Prerequisites: get from Stripe

Get the following values from your Stripe Dashboard (both account types use the same API keys, issued per Stripe account):

  • Publishable Key -> Corefy field public_key -> example: pk_live_51H... -> where to find: Stripe Dashboard, Developers -> API keys.
  • Secret Key -> Corefy field private_key -> example: sk_live_51H... -> where to find: Stripe Dashboard, Developers -> API keys. Sent as the Bearer token on every request - store it securely.
  • Webhook Signing Secret (optional) -> Corefy field webhook_secret -> example: whsec_abc123... -> where to find: Stripe Dashboard, Developers -> Webhooks, after adding the endpoint (see Additional info below). Only needed if you want Corefy to receive and verify Stripe's callbacks - without it, final status still reaches you via status polling/reconciliation, just slower.

Additional, for H2H Merchant account only:

  • Stripe Account ID -> Corefy field account_id -> example: acct_1H... -> where to find: Stripe Dashboard, Settings -> Business details. Sent as the Stripe-Account header when the Send Account ID toggle below is enabled (Stripe Connect-style "act as this connected account" mode) - if that toggle is left off, this field isn't actually used, but the connection form still asks for a value.
  • Apple Merchant ID (optional) -> Corefy field apple_id -> where to find: Apple Developer account, only needed if you plan to enable Apple Pay for H2H.
  • Apple Pay Domain (optional) -> Corefy field apple_pay_domain -> the domain you've registered and verified for Apple Pay merchant validation (see Apple Pay docs) -> only needed if you plan to enable Apple Pay for H2H.

Payments processing (connect H2H Merchant account, create payment-invoice)

Connect H2H Merchant account in Corefy Dashboard

Step 1 - Open connection form

Open Stripe in the provider directory and press Connect at Stripe Provider Overview page in the New connection section. Choose H2H Merchant account.

Step 2 - Fill in fields and select settings

  • Stripe Account ID
  • Publishable Key
  • Secret Key
  • Webhook Signing Secret (optional)
  • Apple Merchant ID (optional, Apple Pay only)
  • Apple Pay Domain (optional, Apple Pay only)
  • Test Mode -> (enable if you are using sandbox/test keys)
  • Save Instant Token -> (enable if you plan to use instant/recurring payments)
  • Dynamic Descriptor -> (enable if you need to override the statement descriptor per payment)
  • Send Account ID -> (enable to send the Stripe Account ID above as the Stripe-Account header - needed for Stripe Connect-style setups; leave off for a standalone Stripe account)

Choose Currency and Features. You can set these parameters according to available currencies and features for your Stripe account (EUR, USD, GBP, AUD, CAD), but it is necessary to check details of the connection with your Corefy account manager.

Success

You have connected Stripe H2H Merchant account!


First request to Corefy API (MIN)

What it does: creates a payment-invoice; card data itself is collected and submitted separately by Corefy's checkout/SDK layer, not as part of this request.

Payment - MIN

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "8e3dbbb0-17af-4c9a-bedb-93bdac6900a2",
      "service": "payment_card_eur_hpp",
      "currency": "EUR",
      "amount": 10
    }
  }
}

Payment - MAX

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "6795502c-e27d-4d07-85e0-93245aab9a3f",
      "service": "payment_card_eur_hpp",
      "currency": "EUR",
      "amount": 10.04,
      "descriptor": "MY SHOP ORDER 123",
      "customer": {
        "reference_id": "cus_123",
        "email": "johnsmith@gmail.com",
        "phone": "+15551234567",
        "name": "John Smith"
      }
    }
  }
}

customer is entirely optional here - Stripe only uses it (email/phone/name) to create a matching Stripe Customer object, which is relevant if you plan to reuse the card later (Save Instant Token). descriptor only has an effect when Dynamic Descriptor is enabled on the connection; otherwise Stripe's own default statement descriptor is used. A CVV is required for every H2H sale - a request without it fails before it reaches Stripe.


Extended request (MAX)

Why add extra fields (typical reasons): - Provide additional customer details for compliance/reconciliation - Positively influence conversion rate - Include optional fields required by your specific flow


Options

Options are configured on the Corefy side and affect how Corefy builds provider requests or processes responses.

Currently available options (2)

  • send_billing_details - sends additional billing information to Stripe.
  • fail_by_last_payment_error_code - controls whether a specific Stripe decline reason is treated as a hard failure or left open for retry.
send_billing_details

What it does: includes the customer's billing address details in the request sent to Stripe.

When to use: enable it if you want Stripe's own fraud/AVS checks to see the customer's billing address.

Default: false

Allowed values: true / false

fail_by_last_payment_error_code

What it does: when enabled, a payment is marked as failed as soon as Stripe returns a last_payment_error with code payment_intent_authentication_failure (typically a failed 3D Secure challenge). When disabled, this specific error code is left open for a retry instead of being treated as final.

When to use: enable it for a predictable, immediate failure on a failed 3DS challenge; leave it off (default) to allow the customer to retry authentication.

Default: false

Allowed values: true / false


Payments processing (connect Provider account, create payment-invoice)

Connect Provider account in Corefy Dashboard

Step 1 - Open connection form

Open Stripe in the provider directory and press Connect at Stripe Provider Overview page in the New connection section. Choose Provider account.

Step 2 - Fill in fields and select settings

  • Publishable Key
  • Secret Key
  • Webhook Signing Secret (optional)

Choose Currency and Features. Which local payment methods and currencies are actually available depends on what's enabled on your Stripe account and configured for this connection (see the method table in Additional info) - check with your Corefy account manager.

Success

You have connected Stripe Provider account!


First request to Corefy API (MIN)

What it does: creates a payment-invoice and returns a redirect link to a Stripe-hosted Checkout page.

Payment - MIN

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "0dde9e79-2c64-4703-adaf-93d710633401",
      "service": "payment_card_eur_hpp",
      "currency": "EUR",
      "amount": 10
    }
  }
}

Payment - MAX

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "7976b4ce-fadd-4585-baa0-6b02c65351dc",
      "service": "payment_card_eur_hpp",
      "currency": "EUR",
      "amount": 10
    }
  }
}

This flow reads nothing beyond the generic envelope - no customer/fields data is forwarded to Stripe at all, so MIN and MAX are effectively the same request; the extra fields above are the only ones worth showing. service encodes the local payment method and currency (<method>_<currency>_hpp) - see Additional info for the full list of methods this connection can support; which ones are actually enabled depends on your Stripe account and connection configuration, the same as currency.


Extended request (MAX)

Why add extra fields (typical reasons): - Provide additional customer details for compliance/reconciliation - Positively influence conversion rate - Include optional fields required by your specific flow


Additional info

H2H Merchant account:

  1. Callback authentication and routing. Stripe signs every webhook with a Stripe-Signature header (HMAC-SHA256 over <timestamp>.<raw body>, using your Webhook Signing Secret); Corefy verifies this automatically once that field is set. The callback endpoint is /stripe/callback - add it as a webhook endpoint in your Stripe Dashboard and subscribe to payment_intent.succeeded and payment_intent.payment_failed (disputes that resolve as lost are also picked up via charge.dispute.closed).
  2. Apple Pay is supported with decryption on Stripe's side - Stripe validates your registered domain/merchant ID and handles the decrypted payment data server-side. Requires Apple Merchant ID and Apple Pay Domain above, plus enabling Apple Pay in your Stripe Dashboard.

    For more information, visit:

Provider account:

  1. Callback authentication and routing. Same mechanism as H2H above (Stripe-Signature header, HMAC-SHA256, your Webhook Signing Secret) via the same /stripe/callback endpoint - subscribe to payment_intent.succeeded and payment_intent.payment_failed in your Stripe Dashboard's webhook settings.
  2. Local payment methods available on this flow (per the connection's own configuration - not every connection enables every method):

    Method Currencies
    Cards EUR, USD, GBP
    Link EUR, USD, GBP
    Klarna EUR, USD, GBP
    Revolut Pay EUR, GBP
    MobilePay EUR
    Multibanco EUR
    Bancontact EUR
    BLIK PLN
    EPS EUR
    iDEAL EUR
    Przelewy24 EUR, PLN
    TWINT CHF
    Amazon Pay EUR, USD, GBP

    Apple Pay and Google Pay don't have their own method/service code on this flow - Stripe only accepts them as part of the Cards method and auto-detects them on its own hosted Checkout page once enabled in your Stripe Dashboard's Payment Methods settings; nothing extra needs to be configured on Corefy's side beyond the Cards currency/feature. 5. The product name shown on Stripe's Checkout page is a fixed placeholder generated by Corefy, not something you control. Stripe's Checkout session requires a product name on every line item; Corefy's connector currently sends a generic placeholder value rather than anything derived from your request - don't rely on it to reflect what's actually being purchased. 6. The Checkout session link is valid for 24 hours. If the customer enters invalid payment details, they can reopen the same link and try again within that window - it's still the same transaction. A session only reaches a final failed state once it expires after 24 hours; there's no way to force an earlier expiry from Corefy's side.


FAQ / Troubleshooting

  • Invalid credentials / auth error -> verify you used the correct keys for the chosen environment (sandbox vs production), and that the Secret Key matches the account the Publishable Key belongs to
  • H2H: CVV missing / invalid card -> a CVV is required for every H2H sale; a request without one fails before reaching Stripe
  • H2H: Stripe-Account header errors -> only relevant when Send Account ID is enabled; verify the Stripe Account ID field matches a real, connected Stripe account
  • Provider account: Invalid payment_method_types error from Stripe -> the configured route's external method code isn't one Stripe's Checkout API accepts directly; Apple Pay/Google Pay in particular must route through Cards, not their own code - contact your Corefy account manager to review the connection's routes
  • Webhook signature invalid -> verify the Webhook Signing Secret matches the endpoint actually configured in your Stripe Dashboard (each webhook endpoint has its own secret)
  • Not sure which account type to use? -> ask your Corefy account manager

Question

Still looking for help connecting your Stripe account? Please contact our support team!