Corefay
Quick Start
- Sign up at corefay.com and obtain API credentials
- Create a terminal in the Admin Console with the parameters below
- Start processing — the adapter is pre-built and ready to use
Overview
Corefay payment integration
| Provider ID | corefay |
| Category | Card Processors |
| Website | corefay.com |
Configuration
Required Parameters
| Parameter | Description |
|---|---|
service | service identifier for payments (for example: payment_service_id) |
api_login | login for Basic Auth |
api_password | password for Basic Auth |
Example Configuration
{
"env": "prod",
"service": "payment_service_id",
"api_login": "merchant_login",
"api_password": "merchant_password",
"redirection_remap": true,
"merchant_url": "https://merchant.com"
}
Payment Flow
Payments (one-phase):
Card payments:
-
invoice - payment invoice creation via POST
/payment-invoices:- customer (reference_id, email, name), amount, currency, service
- reference_id (transaction ID), return_url, callback_url
- test_mode (true for test env)
- Retrieval invoice id and metadata.token
-
card_data - card data sending data via POST
/payment/sale:- Bearer token (is obtained via Auth.get_bearer_token with metadata.token)
- card_number, card_holder, cvv, exp_month, exp_year
- browser_info (browser_tz, screen dimensions, ip, user_agent)
- Processing 3DS: auth_mode="3ds" → redirect with TermUrl, MD, PaReq
- Immediate charged if not 3DS
SBP payments:
-
invoice - SBP invoice creation:
- Same parameters as for cards
- Retrieval flow_data.action, flow_data.method, flow_data.params
- Refund redirect URL immediately (without card_data step)
-
status - status check via GET
/payment-invoices/?filter[reference_id]={tx_id}:- Basic Auth (api_login:api_password)
- Parsing data[0].attributes.status
- error_description from resolution or resolution_message
Payouts (one-phase):
-
create_invoice - payout invoice creation via POST
/payout-invoices:- service (payout_service), amount, currency
- fields.card_number (cardnumber from secured_box)
- customer (reference_id hash from email, email)
- options.auto_process = true (one-phase!)
- Retrieval payout id and status
-
process_invoice - payout processing via POST
/payout-invoices/{id}/process:- Empty payload
- Retrieval final status
-
status - status check via GET
/payout-invoices/?filter[reference_id]={tx_id}:- Basic Auth
- Parsing data[0].attributes.status
- error_description from resolution_message
Status Mapping
| Provider Status | 4pay Status | Description |
|---|---|---|
created | new | |
expired | rejected | |
process_pending | charging | |
processed | charged | |
process_failed | rejected | |
refund_pending | refunding | |
partially_refunded | refunded | |
refunded | refunded | |
refund_failed | refunded | |
charged_back | refunded | |
partially_charged_back | refunded | |
created | new | |
terminated | rejected | |
expired | rejected | |
process_pending | charging | |
processed | charged | |
partially_processed | charged | |
canceled | rejected | |
partially_canceled | rejected | |
process_failed | rejected |