Skip to content

Logo

Smilepayz

Supports in this guide: Payments | Payouts

Provider website: smilepayz.com


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

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

Choose account type

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

  • If you do redirect payments (customer redirected to the Smilepayz hosted payment page) -> choose Provider account
  • If you do payouts to bank accounts -> choose Provider account

The same Smilepayz credentials are used for both flows.

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


Prerequisites: get from Smilepayz

Get the following values for your Smilepayz project/account:

  • Merchant ID -> Corefy field merchant_id -> example: 20001 -> where to find: Smilepayz backoffice / issued by Smilepayz manager
  • Secret -> Corefy field secret -> example: a1b2c3d4e5f6a7b8c9d0 -> used together with the private key to sign every request -> where to find: Smilepayz backoffice / issued by Smilepayz manager
  • Merchant Private Key -> Corefy field private_key -> format: RSA private key (PKCS#8), raw Base64 or PEM -> used to sign every request sent to Smilepayz -> where to find: Smilepayz backoffice / issued by Smilepayz manager

Important

Smilepayz credentials cannot be rotated, and these fields cannot be edited after the connection is created. If a value is wrong, create a new connection. Sandbox and production use different Merchant IDs and keys.


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

Connect Provider account in Corefy Dashboard

Step 1 - Open connection form

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

Step 2 - Fill in fields and select settings

  • Merchant ID -> merchant_id
  • Secret -> secret
  • Merchant Private Key -> private_key
  • Test Mode -> (enable if you are using sandbox credentials)
  • API URL -> api_url (optional, overrides the default Smilepayz sandbox/production host; leave empty unless your Smilepayz manager gave you a different host)

Choose Currency and Features. You can set these parameters according to available currencies and features for your Smilepayz account, but it is necessary to check details of the connection with your Corefy account manager.

Success

You have connected Smilepayz Provider account!


First request to Corefy API (MIN)

What it does: creates a payment-invoice. The customer is redirected to the Smilepayz hosted payment page and chooses the bank there.

Payment - MIN

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "service": "bank_transfer_aggregated_pen_hpp",
      "currency": "PEN",
      "amount": 100
    }
  }
}

Payment - MAX

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "service": "bank_transfer_aggregated_pen_hpp",
      "currency": "PEN",
      "amount": 100,
      "description": "Order 12345",
      "customer": {
        "reference_id": "cus_123",
        "name": "John Doe",
        "email": "johndoe@example.com",
        "phone": "51900000000"
      },
      "service_fields": {
        "document_type": "NID",
        "document_id": "12345678"
      }
    }
  }
}

  • description is shown to the payer; it is cut to 64 characters. If it is not sent, the payment ID is used.
  • service_fields.document_type must be one of the Smilepayz values: NID (National ID), FID (Foreigner ID), PP (Passport), TIN (Tax Identification Number). It is sent as is, so use exactly these codes.
  • service_fields.document_id is the document number matching document_type.

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 (1)

  • finalize_after_hours - after how many hours an expired payment is closed as failed
finalize_after_hours

What it does: Smilepayz reports a payment as EXPIRED when the payer does not complete it in time, but EXPIRED is not a final status on the Smilepayz side, so Corefy keeps such a payment pending. When this option is set, a payment that is still EXPIRED on a status check and was created more than the given number of hours ago is closed as failed (resolution: expired).

When to use: set it if you do not want expired payments to stay pending. The Smilepayz payment window is one hour, so the value should be larger than that.

Default: not set (expired payments stay pending)

Allowed values: a whole number of hours, e.g. 24

Note

If you are not sure which value to set, please contact our support team!


Payouts processing (connect Provider account, create payout-invoice)

Connect Provider account in Corefy Dashboard

Step 1 - Open connection form

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

Step 2 - Fill in fields (provider -> Corefy)

  • Merchant ID -> merchant_id
  • Secret -> secret
  • Merchant Private Key -> private_key
  • Test Mode -> (enable if you are using sandbox credentials)
  • API URL -> api_url (optional, overrides the default Smilepayz sandbox/production host)

Success

You have connected Smilepayz Provider account!


First request to Corefy API

What it does: creates a payout-invoice (bank transfer in PEN to a bank account in Peru).

Actual

POST /api/payout-invoices

{
  "data": {
    "type": "payout-invoice",
    "attributes": {
      "service": "bank_transfer_pen",
      "currency": "PEN",
      "amount": 100,
      "fields": {
        "bank_account": "19100000000000",
        "account_type": "CHECKING",
        "cci_key": "00219100000000000000",
        "beneficiary_full_name": "John Doe",
        "beneficiary_email": "johndoe@example.com",
        "beneficiary_phone": "51900000000",
        "document_type": "NID",
        "document_id": "12345678"
      }
    }
  }
}

All eight fields are required by Smilepayz. If one of them is missing, Smilepayz declines the payout.

  • bank_account - beneficiary bank account number, up to 32 characters
  • account_type - CHECKING (current/checking account) or SAVINGS (savings account)
  • cci_key - CCI, the 20-digit Peruvian interbank account code
  • beneficiary_full_name, beneficiary_email, beneficiary_phone - beneficiary details (phone in local format)
  • document_type - NID (National ID), FID (Foreigner ID), PP (Passport) or TIN (Tax Identification Number)
  • document_id - document number matching document_type

account_type and document_type are sent as is, so use exactly these codes. The optional description is cut to 64 characters; if it is not sent, the payout ID is used.


Additional info

  1. Smilepayz covers Peru only: payments and payouts are in PEN.

  2. Callback URLs are sent to Smilepayz automatically in every request, nothing needs to be set up in the Smilepayz backoffice. When a notification arrives, Corefy requests the current status from Smilepayz and updates the transaction from that response.

  3. Payouts: every supported Peruvian bank is a separate payout route under the same bank_transfer_pen service. Supported banks: BCP, SCOTIABANK_PE, INTERBANK, BBVA, SULLANA, PIURA, HUANCAYO, CUSCO, MAYNAS, METROPOLITANA, MUNICIPALICA, TACNA, TRUJILLO, AREQUIPA, BANBIF, GNB, COMERCIO, CREDISCOTIA, NATION, FALABELLA, PICHINCHA, AZTECA_PE, RIPLEY, MIBANCO, CENCOSUD, SANTANDER_PE, CITIBANK_PE, ICBC_PE. Enable the routes of the banks you want to pay out to in your payout routing settings in Corefy Dashboard; the enabled route defines the beneficiary bank sent to Smilepayz.

  4. Final statuses on the Smilepayz side are SUCCESS and FAILED. INIT, PROCESSING and EXPIRED are kept as pending. For payments, expired ones can be closed automatically with the finalize_after_hours option.


FAQ / Troubleshooting

  • Invalid credentials / auth error -> check that Merchant ID, Secret and Merchant Private Key belong to the same environment, and that Test Mode matches it (sandbox vs production)
  • Currency or service is not supported -> Smilepayz works with PEN only; confirm allowed services in your Smilepayz account and in Corefy
  • Payout declined with a validation error (e.g. "Api Cash account is required") -> send all eight payout fields, and use the exact account_type / document_type codes listed above
  • Payment stays pending after the payer left the page -> the payment expired on the Smilepayz side; set finalize_after_hours to close such payments automatically
  • Not sure which account type to use? -> ask your Corefy account manager

Question

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