Skip to content

Logo

AstroPay

EMPOWER YOUR LIFESTYLE

Website: astropay.com

Merchant account: merchants.astropay.com

Set up Account

To create an account you only need an active mobile phone number. When you register, you will enter your phone number on the app.astropay.com/auth/enter-phone and you will receive a verification code by SMS and that's it!

Step 2: Get required credentials

Credentials that have to be issued:

  • API Key
  • Secret Key

Log into your Merchant account at the merchants.astropay.com. Go to the 'Credentials' → 'API Key' .

Credentials

Get credentials:

  • API Key - Generate new API key
  • Secret Key - Click on the "Send Secret Key By Email" button at the right top corner on the Merchant API Key page

Connect Provider Account

Step 1. Connect Provider account at the Corefy Dashboard

Press Connect at AstroPay Provider Overview page in 'New connection' section and choose Provider account option to open Connection form.

Connect

Enter credentials:

  • api_key → API Key
  • secret_key → Secret Key

Success

You have connected AstroPay Provider account!

API examples:

Data set to create a transaction

POST /api/commerce/payment-invoices HTTP/1.0

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "service": "pix_qr_brl_invoice",
      "commerce_account": "Hello World",
      "currency": "BRL",
      "amount": 12,
      "flow": "charge",
      "gateway_options": {
        "cardgate": {
          "tokenize": ""
        }
      },
      "customer": {
        "reference_id": "37d82640-6b4b-4175-b051-f13b5b76c8cb",
        "name": "John Doe",
        "email": "[email protected]",
        "phone": "+551234456789",
        "date_of_birth": "2000-05-25",
        "address": {
          "country": "BR"
        }
      },
      "test_mode": true,
      "options": {
        "allow_partially": false,
        "bypass_hpp": false,
        "send_operation_context_on_return": false
      },
      "reference_id": "7ede4873-f088-4337-8075-685c103a80d9",
      "service_fields": {
        "cpf_number": "12345678909"
      }
    }
  }
}

Additional information

Constants

Constants

If some parameters are not sent in the transaction creation request, they will take the values from the set constants.

Here is a list of constants with their corresponding parameters:

  • REFERENCE_ID → customer [reference_id]
  • COUNTRY → customer [address] [country]
  • EMAIL → customer [email]
  • NAME→ customer [name]
  • PHONE → customer [phone]
  • MCC → product [mcc]
  • MERCHANT_CODE → product [merchant_code]
  • CATEGORY → product [category]
  • DESCRIPTION → product [description]

Provider Options

Provider_Options

  • finalize_by_protocol

    • The provider does not guarantee the finality of the fail status because in their system it can later change to success and if the merchant does not agree with this logic then there is no need to enable this option.
      • Then we (Corefy) will stop failing payments but the merchant will not receive transaction status discrepancies.
    • If a merchant wants to fail decline which the provider does not guarantee then you need to enable this option.
  • ignore_provider_amount

    • this option will work a such way =>

      • If this option will be enabled => we will not check the amount and the currency values ( but we can finalize the deposit/withdrawal transaction automatically ), which we will receive from AstroPay ( when we will use the method for finalization of the deposit/withdrawal transaction ), because AstroPay can return other currency and amount values, which will be different from those - which we will send in the request to create a deposit/withdrawal (for example, we will send 10 BRL, but from AstroPay we will receive the data in currency of the merchant account , for example => 1.9 USD - if in the merchant account configured currency USD ) - because of this, we will not be able to correctly check the amount of the transaction for its correct finalization, however, according to the data provided by AstroPay - the user will not be able to change the amount or pay less than the value of the amount, which we will send in the request to AstroPay - therefore, we can be sure that if we create a deposit of 100 BRL - the payer will be able to pay only this 100 BRL.

      • If this option will be disabled => we will not finalize the deposit transaction automatically - in cases where we will create a deposit transaction with currency BRL , but in the response from AstroPay will receive the data of the deposit transaction in the different currency ( for example in currency = USD ) => according to this difference - we can not check the amount of deposit transaction correctly with data, which AstroPay will return to us - so a such deposit/withdrawal transactions need to finalize manually.

Still looking for help connecting your AstroPay account?

Please contact our support team!