Explore Knowledge Base

Corefy

11. 01. 2025

The SDK.finance Core platform features integration with Corefy, a payment orchestration platform for online businesses and payment institutions, as a Gate Provider.

How to start using the integration

  1. Make an Agreement with the provider. There is a requirement for the SDK.finance client to make an agreement with the service provider. All features that will be available from the vendor (Corefy Payment Gateway) to the client (for both, the source code or cloud clients) depend on the client’s needs and their agreements with the vendor (Corefy Payment Gateway).
  2. Get credentials from the provider. After the agreement is signed, the service provider provides the client with the credentials to access the Test and Production Environment. These accesses must be used for provider connectivity setup.
  3. Set up the provider connectivity settings in the SDK.finance Core platform. Set up the system configuration file.
  4. Set up the commission profile. Specify the provider and total commission for the operations “Corefy Top up” and “Corefy Withdrawal“ in the Contract/Provider Commission settings. To activate the “Corefy Top up” or “Corefy Withdrawal“ operations for the user vendor Corefy must be added to the system and provider and the total commission must be specified for these operations in the user`s Contract.

How it works (on the example of Top up via debit Card)

The user of the SDK.finance platform initiates a Top-Up via Debit Card operation through the front-end application (web or mobile). The front end sends API calls to create a Business Process in the SDK.finance Core system according to predefined conditions.

As a result, the Business Process triggers the Corefy Integration, sending requests via the provider’s REST API and returning available payment options (providers) to the user.

The user selects a payment option, and the Corefy Payment Gateway securely redirects them to the checkout form hosted on the payment provider’s side in a PCI-compliant manner.

On the provider’s side, the payment data is processed, and the SDK.finance Core system receives a redirect from the provider with the operation result.

Upon receiving the provider’s response, the SDK.finance Core system processes it and triggers the internal Top-Up Business Process, updating its status based on the provider’s response.

As a result, the SDK.finance Core system finalizes the operation and successfully tops up the in-system account.

Supported operations

Operation supported on the Test Environment

  1. Top-Up via Provider:
    Individual and Merchant users can top up their accounts using a payment card through the Corefy Payment Gateway.
  2. Withdraw via Provider:
    Individual and Merchant users can withdraw funds from their accounts to a payment card using a card token via the Corefy Payment Gateway.
  3. Card Tokenization:
    Individual and Merchant users can tokenize their payment cards (tokenization occurs on the Corefy Gateway side) and link the card token to their user account (organization) during top-up and withdrawal operations via the Corefy Payment Gateway.

Note: All features available from the vendor (Corefy) to the client—whether using the source code or the cloud version—depend on the client’s specific needs and their agreements with the vendor (Corefy).

On the SDK.finance side, the system offers a streamlined way to interact with the Corefy platform through REST API integration within the SDK.finance Core system.

Business process flow

Step 1. Integration setup

As a Platform Owner:

  • Sign an agreement with the provider (to get access credentials to the Corefy Payment Gateway)
  • Register at the Corefy Payment Gateway system (Merchant Portal)

As an Administrator of the platform:

  • Check in the SDK.finance Core system configuration for Corefy in application.yaml:

corefy:
private-client:
  baseUrl: 
  requestTimeout: 10 # seconds
  connectTimeout: 10 # seconds
  login: 
  password: 
  obtainPaymentServicesPath: ‘/payment-services’
  initPaymentPath: ‘/payment-invoices’
  findPaymentByIdPath: ‘/payment-invoices/{id}’
  obtainPayoutServicesPath: ‘/payout-services’
  initPayoutPath: ‘/payout-invoices’
  findPayoutByIdPath: ‘/payout-invoices/{id}’
public-client:
  baseUrl: 
  requestTimeout: 10 # seconds
  connectTimeout: 10 # seconds
  publicKey: 
  obtainPaymentServicesPath: ‘/payment-prerequest’
  obtainPayoutServicesPath: ‘/payout-prerequest’

There are preliminary steps that must be done as part of integration settings before the Top up via provider operation will be performed by the end-user.

Step 2. Contract setup

As an Administrator of the platform:

  • Set up Provider and Total commissions and activate Corefy Top up/Withdrawal operations

Step 3. Initiate operation

Top up via provider (Top up via Debit Card) by the Business user of the SDK.finance Core platform

Business user:

  • Initiates Top-up wallet by payment card and select “Corefy” as the method of payment
  • Provides: account, amount (after the amount is specified, the system calculates the commissions and displays the calculation result to the user)
  • Provides whether or not to tokenize the payment card that will be used

When the user selects “Tokenize” the card number will be tokenized on the Corefy Gateway side and the token will be linked with the used (organization) and card in both Corefy and SDK.finance Systems. The user will be able to use this token next time the Withdrawal via Corefy operation.

  • Select the payment service to top up through

Under the hood SDK.finance Core system triggers integration methods and returns the available payment services (available providers) from Corefy depending on the payment way and currency

  • Process the operation

Under the hood  SDK.finance Core system creates an internal Business Process and submits the transaction to the Corefy Payment Gateway. Corefy Payment Gateway system redirects the user to the Payment Provider side and opens an authorized hosted checkout form.

  • Enter the card details in the opened checkout form and “Process” (the hosted checkout form sends specified transaction details to the Payment Provider which was selected)

After the form sends data to Corefy the user will be redirected to the redirect URL according to the submission result (redirect URLs are provided during payment initiation). In SDK.finance Core system the Top up via provider operation is created in the “Pending” status which shows that SDK.finance is waiting for the processing result from the Provider (BusinessProcess.status=Pending). After the SDK.finance Core system calls Corefy`s API to get the operation status and change the business process status accordingly.

Withdrawal via provider (Withdrawal via Debit Card) by the Business user of the SDK.finance Core platform

Business user:

  • Initiates the withdrawal from wallet via a debit card and selects “Corefy” as the method
  • Provides: account, amount (after the amount is specified, the system calculates the commissions and displays the calculation result to the user)
  • Provides a card (Card Token) to which to withdraw

Withdrawals to cards can be initiated by token or payment card number. In the test environment, only Withdrawal by card token is available. To initiate Withdrawal by card token the card must be tokenized on the Corefy side.

  • Select the payment service to top up through

Under the hood SDK.finance Core system triggers integration methods and returns the available payment services (available providers) from Corefy depending on the payment way and currency

  • Press the “Next” button

Under the hood SDK.finance Core system creates an internal Business Process and submits the transaction to the Corefy Payment Gateway. After the transaction is sent to Corefy the user will be redirected to the redirect URL according to the submission result (redirect URLs are provided during payment initiation). In SDK.finance Core system the Withdrawal via provider operation is created in the “Pending” status which shows that SDK.finance is waiting for the processing result from the Provider (BusinessProcess.status=Pending). After the SDK.finance Core system calls Corefy`s API to get the operation status and change the business process status accordingly.

Tokenize card by the Business user of the SDK.finance Core platform while Withdrawal via Corefy is performed

As a Business user:

  • Initiate card tokenization (press “Add card“ while Withdrawal via Corefy performing)

Under the hood SDK.finance Core system triggers the integration and submits the request to the Corefy Payment Gateway (for tokenization SDK call method /payment-invoices with data.attributes.flow=verify and data.attributes.gateway_options.cardgate.tokenize = true of Corefy integration). Corefy Payment Gateway system redirects the user to the Provider side and opens an authorized hosted checkout form (to enter the details for the card that must be tokenized).

  • Enters the card number and expiration date in the opened checkout form (the hosted checkout form sends specified transaction details to the Provider)

After the form sends data to Corefy the user will be redirected to the redirect URL according to the submission result (redirect URLs are provided during payment initiation). On the Corefy side, the card will be tokenized and the card token will be stored.

SDK System gets payment details by ID (integration method /payment-invoices/{{id}}) and receives a card token and masked card number in the provider response. Card token is linked to the card and user (organization) on both, Corefy and SDK Systems. After successful tokenization, the user will be returned to the Withdrawal page to finalize the operation. A new card token will be available on the “Card“ list box.

  • See card token and select it to finalize the Withdrawal operation

Token lifecycle

  • The expiration date for the Card token is the card expiration date
  • If the user tokenizes the same card twice – the returned token will be the same
  • If user deletes the token in SDK system – the token remains available and active in the gateway system till the expiration date, if the user tokenizes this card again – the gateway returns the same token

 

Mapping of SDK APIs to Corefy APIs that are used by Top up/Withdrawal via Corefy Business Processes

SDK APIs Corefy APIs
URL Description URL Description
POST​ /gate​/transactions​/calculate To calculate the commissions and display the calculation result to the user    
POST /gate/transactions To create the gate transaction for Top up (create an operation inside SDK.finance system)    
POST /gate/transactions/{tx}/submit To submit created transaction. Under the hood, on this stage the SDK.finance system back-end calls Corefy Payment Gateway API to create an authorized checkout session with selected Payment Provider. Or create a payout to withdrawal though specified Payment Provider. POST /payment-invoices Payments: Payment invoice – Create payment invoice with selected service and fields. Request to initiate a Checkout interaction, that allows the payer to enter payment data and make a payment. In this case, sensitive data is entered on the Checkout Payment form, which is hosted by the provider and thus ensures data security and PCI compliance.

Also, current request with parameters data.attributes.flow=verify and data.attributes.gateway_options.cardgate.tokenize = true is used for card tokenization (Corefy Gateway Token)

    POST /payout-invoices Payout: Payout invoice – Create a payout invoice with selected services and fields. Payouts can be initiated by token or payment card number. To initiate payout by card token at least one successful payment with tokenization must be done (to obtain a token and use it instead of a card number). In case of payout via payment card number PCI compliance is required for the platform.
POST /gate/tokenization Initiates a tokenization request. If appropriate integration exists a checkout form from the Provider opens. On which user can enter card data to tokenize it in secure way. POST /payment-invoices with data.attributes.flow=verify and data.attributes.gateway_options.cardgate.tokenize = true  
POST /gate/tokenization/view To view the list of available card tokens and associated masked card numbers that are linked to current user organization API returns not expired tokens    
POST /v1​/gate​/methods​/view Get list of available payment providers for transaction with specified parameters POST /payment-prerequest Payments: Payment services – Request to obtain a list of services available for any particular currency with details (icon, name, logo).

The payment pre-request doesn’t filter services by the invoice amount because the user can pay in other currency than the given one.

    POST /payout-prerequest Payout: Payout services – Request to obtain the list of services available for any particular currency.

The payout pre-request filter and show services by the invoice amount.

Is used to check payment status before BP finalization   GET /payment-invoices/{id} Payments: Get payment invoice operation details – Retrieve the details of a payment invoice. The system uses this request to get additional data about the payment from the provider.
Is used to check payout status before BP finalization   GET /payout-invoices/{{id}} Payout: Payout reconciliation by ID – Request to retrieve the details of a payout from Corefy by ID.
Legacy methods to obtain payment services   GET /payment-services Payments: Payment services – Request to obtain the list of available payment services.
    GET /payout-services Payout: Payout services – Request to obtain the list of available payout services.

Corefy API references