BergoPay
Supports in this guide: Payments
Provider website: bergopay.com
What you need to do for start processing transactions (brief summary)
- Choose account type
- Get your credentials (from BergoPay)
- Connect in Dashboard
- Send an API request
Choose account type
BergoPay can be connected in different ways (depending on your needs):
- If you do card payments (host-to-host) -> choose H2H Merchant account
- If you do redirect payments (customer redirected to a hosted payment page) -> choose Provider account
If you're not sure which one to use, confirm with your Corefy account manager.
Important
BergoPay keeps every payment method on its own merchant record, and each merchant record has its own webhook endpoint. Card payments (H2H Merchant account) and redirect payments (Provider account) therefore need separate BergoPay merchant records and separate credentials - don't reuse the same Merchant ID / Webhook Secret for both account types.
Prerequisites: get from BergoPay
Get the following values for your BergoPay project/account:
For H2H Merchant account (card payments):
- API key -> Corefy field
api_key-> example:sk_live_51Hx...-> used as a Bearer token to authenticate every request to BergoPay's API -> where to find: issued by BergoPay manager for your card merchant - Merchant ID (optional) -> Corefy field
merchant_id-> example:19-> required only if you were issued a partner API key (one key for several merchants); leave it empty for a merchant API key -> where to find: issued by BergoPay manager - Webhook Secret -> Corefy field
webhook_secret-> format: plain text key (for examplewhsec_..., enter it in full, including the prefix) -> used to verify the signature of incoming webhook notifications from BergoPay -> where to find: issued by BergoPay once the webhook endpoint is registered for your card merchant
For Provider account (redirect payments):
- Merchant ID -> Corefy field
merchant_id-> example:10-> sent asmerchant_idon every payment request to identify your account -> where to find: BergoPay back-office / issued by BergoPay manager - API key -> Corefy field
api_key-> example:sk_live_51Hx...-> used as a Bearer token to authenticate every request to BergoPay's API -> where to find: BergoPay back-office / issued by BergoPay manager - Webhook Secret -> Corefy field
webhook_secret-> format: plain text key -> used to verify the signature of incoming webhook notifications from BergoPay -> where to find: BergoPay back-office / issued by BergoPay manager, generated after you register your webhook endpoint with BergoPay
Card payments processing (connect H2H Merchant account, create payment-invoice)
Connect H2H Merchant account in Corefy Dashboard
Step 1 - Open connection form
Open BergoPay in the provider directory and press Connect at BergoPay Provider Overview page in the New connection section. Choose H2H Merchant account.
Step 2 - Fill in fields and select settings
- API key ->
api_key - Merchant ID ->
merchant_id(optional, only for partner API keys) - Webhook Secret ->
webhook_secret - API URL ->
api_url(optional, overrides the default gateway endpoint - leave blank unless told otherwise) - Test mode -> (enable if you are using sandbox credentials)
- Currency / Features -> choose values available for your account (
EUR,USD,GBP,AUD,CADare supported)
Success
You have connected BergoPay H2H Merchant account!
First request to Corefy API (MIN)
What it does: creates a payment-invoice.
Payment - MIN
POST /api/payment-invoices
{
"data": {
"type": "payment-invoice",
"attributes": {
"reference_id": "5b7e2c1a-3f4d-4e8b-9a6c-1d2e3f4a5b6c",
"service": "payment_card_eur_hpp",
"currency": "EUR",
"amount": 10
}
}
}
Payment - MAX
POST /api/payment-invoices
{
"data": {
"type": "payment-invoice",
"attributes": {
"reference_id": "7c9f4e2b-1a3d-4b5c-8e6f-2a3b4c5d6e7f",
"service": "payment_card_eur_hpp",
"currency": "EUR",
"amount": 10,
"customer": {
"reference_id": "cus_123",
"name": "John Smith",
"email": "johnsmith@gmail.com",
"phone": "441234567890",
"address": {
"country": "GB",
"city": "London",
"street": "1 High Street",
"post_code": "SW1A 1AA"
}
}
}
}
}
The minimum payment amount accepted by BergoPay is 1.00. Use payment_card_usd_hpp, payment_card_gbp_hpp, payment_card_aud_hpp or payment_card_cad_hpp for other currencies - the request shape is the same.
Customer details are optional. They are forwarded to BergoPay only when customer.reference_id, customer.email and a customer.name with both first and last name are all present - otherwise no customer details are sent at all. customer.phone and customer.address are added on top when provided. The customer's IP address is taken from the payment session automatically.
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
Refunds
BergoPay supports full and partial refunds, but only one refund per payment - a second refund against the same payment isn't supported. A refund can only be processed once the original BergoPay transaction ID has been recorded against the payment. If the refund result isn't final right away, Corefy checks the refund status directly with BergoPay.
Redirect payments processing (connect Provider account, create payment-invoice)
Connect Provider account in Corefy Dashboard
Step 1 - Open connection form
Open BergoPay in the provider directory and press Connect at BergoPay Provider Overview page in the New connection section. Choose Provider account.
Step 2 - Fill in fields and select settings
- Merchant ID ->
merchant_id - API key ->
api_key - API URL ->
api_url(optional, overrides the default gateway endpoint - leave blank unless told otherwise) - Webhook Secret ->
webhook_secret - Test Mode -> (enable if you are using sandbox credentials)
- Currency / Features -> choose values available for your account
Success
You have connected BergoPay Provider account!
First request to Corefy API (MIN)
What it does: creates a payment-invoice and returns a redirect link to BergoPay's hosted payment page.
Payment - MIN
POST /api/payment-invoices
{
"data": {
"type": "payment-invoice",
"attributes": {
"reference_id": "9c1d3e56-7f8a-4b0c-8d12-3e4f5a6b7c8d",
"service": "applepay_eur_hpp",
"currency": "EUR",
"amount": 10
}
}
}
Payment - MAX
POST /api/payment-invoices
{
"data": {
"type": "payment-invoice",
"attributes": {
"reference_id": "0d2e4f67-8a9b-4c1d-8e23-4f5a6b7c8d9e",
"service": "applepay_eur_hpp",
"currency": "EUR",
"amount": 10,
"customer": {
"reference_id": "cus_123",
"name": "John Smith",
"email": "johnsmith@gmail.com",
"address": {
"country": "DE"
},
"metadata": {
"ip": "203.0.113.42"
}
}
}
}
}
BergoPay also supports googlepay_eur_hpp (Google Pay), eps_eur_hpp (EPS) and paysafecard_eur_hpp (paysafecard) - the request shape is identical, only the service code changes; the exact set of service codes available depends on your account configuration. customer.name is split into first/last name parts before being forwarded to BergoPay; customer.address.country and customer.metadata.ip are forwarded as-is, and the IP falls back to the request's own origin IP if metadata.ip isn't set. None of the customer fields above are required - Corefy only sends what you provide and omits the rest.
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
Constants (fallback fields)
Constants are static values that Corefy can send to the provider instead of dynamic data from your API request, when those fields are missing in the request.
Priority (predictable rule): 1. If a value is present in the request -> Corefy uses the request value 2. Else if the constant is set -> Corefy uses the constant 3. Else -> provider may reject the request or apply its defaults (depends on provider)
Currently available constants (constant -> Corefy API field)
FIRST_NAME->customer.name(first part)LAST_NAME->customer.name(last part)EMAIL->customer.emailCOUNTRY_CODE->customer.address.countryIP->customer.metadata.ip(falls back further to the request's own origin IP if neither is set)
Refunds
BergoPay supports partial refunds, but only one refund per transaction - a second refund against the same payment isn't supported. A refund can only be processed once the original BergoPay transaction id has been recorded against the payment; if it hasn't synced yet, the refund request is rejected until it has. Refund status can also be checked directly against BergoPay if a refund callback doesn't arrive.
Additional info
- BergoPay sends a webhook notification whenever a transaction's status changes; Corefy verifies its signature automatically using the Webhook Secret configured on the account. If no webhook arrives in time, Corefy can reconcile the payment status directly with BergoPay instead.
- The API URL field is optional and only needed if BergoPay instructs you to use a non-default endpoint (for example, a dedicated sandbox or merchant-specific host) - leave it blank to use the standard environment endpoint matching your Test Mode setting.
H2H Merchant account:
- 3D Secure - BergoPay doesn't run 3D Secure authentication itself and there's no redirect to a BergoPay 3DS page. Authentication runs through a third-party 3D Secure (MPI) service, not something Corefy operates itself, and its result is passed to BergoPay together with the payment. It has to be set up for your account - contact your Corefy account manager for details on getting this configured for your BergoPay H2H Merchant account. Without 3DS data the acquirer may decline the payment.
- Callback routing - for callbacks processing BergoPay has to register a webhook URL for your card merchant record (one URL per merchant record, set up on request via your BergoPay manager). The callback endpoint for H2H Payments is
/bergopay/callback. Enter the Webhook Secret BergoPay returns for that endpoint in the Webhook Secret field. - Partner API key - if one partner API key serves several BergoPay merchants (for example, several brands), connect each merchant as a separate H2H Merchant account with the same API key and its own Merchant ID.
FAQ / Troubleshooting
- Invalid credentials / auth error -> verify the API key (and Merchant ID, where used) for the selected environment (Test Mode on/off)
- Webhook signature invalid -> verify the Webhook Secret matches the one currently registered with BergoPay for the webhook endpoint of this merchant record, entered in full
- H2H: "Payment method is not supported or does not exist" -> the credentials belong to a BergoPay merchant record that isn't set up for cards (for example, your redirect payments merchant) - ask BergoPay for the credentials of your card merchant
- H2H: "Credentials are already in use" when connecting a second account -> you're using a partner API key - fill in the Merchant ID of each merchant so the accounts can be told apart
- H2H: payment declined because 3DS is required -> make sure 3D Secure (third-party MPI service) is configured for your BergoPay H2H Merchant account (see Additional info)
- H2H: callbacks not arriving -> confirm with your BergoPay manager that the webhook for your card merchant record points to the
/bergopay/callbackendpoint - Refund rejected with a missing transaction error -> wait for the payment's BergoPay transaction id to sync, then retry the refund
- Currency or service is not supported -> confirm allowed currencies/features in your BergoPay account and in Corefy
- Not sure which account type to use? -> ask your Corefy account manager
Question
Still looking for help connecting your BergoPay account? Please contact our support team!