Skip to content

Logo

AnSpacePay

The fastest and most complete payment platform on the market

Supports in this guide: Payments, Payouts

Provider website: anspacepay.com


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

  1. Get your credentials (from AnSpacePay)
  2. Connect in Dashboard
  3. Send an API request

Prerequisites: get from AnSpacePay

Contact your AnSpacePay account manager to get your account verified and receive the following credentials. The same credentials are used for both Payments and Payouts on one Provider account.

  • Username -> Corefy field username.
  • Password -> Corefy field password.
  • Application token -> Corefy field application_token.
  • Security token -> Corefy field security_token -> used for payouts.

BRL only, via PIX.


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

Connect Provider account in Corefy Dashboard

Step 1 - Open connection form

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

Step 2 - Fill in fields and select settings

  • Username
  • Password
  • Application token
  • Security token
  • Test Mode -> (enable if you are using sandbox credentials)

Success

You have connected AnSpacePay Provider account!


First request to Corefy API (MIN)

What it does: creates a payment-invoice. Two PIX methods are available on this connection: pix redirects the customer to a hosted page to complete the payment, while pix_qr returns QR code requisites directly in the response for you to display yourself.

Payment - MIN

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "f1e9791f-3319-4298-85aa-57348c173230",
      "service": "pix_brl_hpp",
      "currency": "BRL",
      "amount": 151,
      "customer": {
        "reference_id": "56dba9a1-1433-42d6-8513-e28563a35aed",
        "name": "John Doe"
      },
      "service_fields": {
        "cpf_number": "87397163769"
      }
    }
  }
}

Important

  • customer.name is required.
  • service_fields.cpf_number (the customer's Brazilian tax ID, CPF) is required for both pix and pix_qr.

Payment - MAX

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "124058c9-cab1-44d2-b660-55dbdb1ff67b",
      "service": "pix_brl_hpp",
      "currency": "BRL",
      "amount": 152,
      "customer": {
        "reference_id": "f1fd757b-08d5-40ed-8c6e-7c3985681ef0",
        "name": "John Doe",
        "email": "test@mail.com",
        "address": {
          "full_address": "Baker street 221B",
          "country": "GB",
          "region": "London",
          "city": "London",
          "street": "Baker",
          "post_code": "12345"
        }
      },
      "service_fields": {
        "cpf_number": "87397163769"
      }
    }
  }
}

For the QR flow, use "service": "pix_qr_brl_invoice" with the same customer and service_fields structure; the response returns QR code requisites for you to render instead of a redirect link.


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)

  • GENERAL_DEFAULT_VALUE -> internal fallback value used by Corefy; not mapped to a specific request field. Leave unset unless your account manager instructs otherwise.

AnSpacePay does not support refunds.


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

This connector uses the same Provider account you connected above - there is no separate connection step for Payouts.

First request to Corefy API (MIN)

What it does: creates a payout-invoice and sends funds to a PIX key.

Payout - MIN

POST /api/payout-invoices

{
  "data": {
    "type": "payout-invoice",
    "attributes": {
      "reference_id": "5da36d3e-e9eb-419f-8786-326bcbeaa6fd",
      "service": "pix_brl",
      "currency": "BRL",
      "amount": 100,
      "fields": {
        "cpf_number": "87397163769",
        "beneficiary_name": "John",
        "beneficiary_lastname": "Doe",
        "pix_key": "john.doe@mail.com"
      }
    }
  }
}

Important

fields.cpf_number, fields.beneficiary_name, fields.beneficiary_lastname, and fields.pix_key are all required.


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

AnSpacePay does not support refunds.


Additional info

  1. Callbacks and active reconciliation are both supported for Payments and Payouts.
  2. No refunds - this connector does not implement refunds on either Payments or Payouts.
  3. No recurring - this connector does not support saving/charging a token through Corefy.
  4. If you need to whitelist IPs on AnSpacePay's side, ask your account manager and provide Corefy's IP list from the integration docs.

FAQ / Troubleshooting

  • Invalid credentials / auth error -> verify the credentials and environment (test_mode)
  • Payment fails with a CPF error -> service_fields.cpf_number is required for every payment, valid Brazilian CPF format
  • Payout fails with a missing field error -> all four payout fields (cpf_number, beneficiary_name, beneficiary_lastname, pix_key) are required, none are optional
  • Currency or service is not supported -> only BRL via PIX is available

Question

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