Online Payments

An easy step-by-step payment integration for any sale type.

Ingresse payment platform is full of features to allow any entertainment-related solution to process sales for any type of product. In opting to use our payment API, you will be able to make usage of our Wallet services, as Antifraud related products too.

Implementing The Checkout

Payments at Ingresse are processed in a minimum of two steps:

  1. Start a transaction that will indicate the products list and minimal information about the transaction to be processed. This method will return the available payment methods to you.
  2. Pay a transaction that will actually process the payment.

Each step below is tracked down by our platform and keeps you informed via our webhooks allowing you to keep track of new purchases and transaction updates.

πŸ“˜

Ingresse Webhooks

You can request to activate a webhook to your platform through our support platform.

1. Starting a Transaction

To start transaction you only need to provide the list of products that are represented by the extras attribute.

curl -X POST \
  'https://api.ingresse.com/shop?publickey={{YOUR_API_KEY}}&usertoken={{THE_USER_TOKEN}}' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "extras": [
        {
					"externalId": {{EXTERNAL_ID}},
					"name": {{PRODUCT_NAME}},
					"quantity": {{QUANTITY}},
					"unitPrice": {{PRICE}}
    		}
    ]
}'
AttributeDescription
{{QUANTITY}}Total items ordered for the specific external ID.
{{EXTERNAL_ID}}The ID used in your system to identify the product.
{{PRODUCT_NAME}}The item name as a way to describe the product.
{{PRICE}}The price for one product. Ingresse will handle the total price calculation for you.

After submitting the start transaction, you are going to receive a transaction ID that must be used in the payment step, and the list of available payment methods.

2. Paying the Transaction

With a transaction ID from the last step, now you are ready to submit a payment request. You can read all the features related to payment by reading our Whitelabel Store Payments ](ref:pay-a-transaction) documentation. In the example below, we are going to show you how to submit a payment with a credit card in its simplest way.

curl -X POST \
  'https://api.ingresse.com/shop?publickey={{API_KEY}}&usertoken={{USER_TOKEN}}' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
  "method": "creditCard",
  "document": "44774339806",
  "creditCard": {
    "installments" : 1,
    "number" : "4111111111111111",
    "holder" : "john doe",
    "expiration" : "09/29",
    "cvv" : "332"
  },
  "customer": {
    "externalId": "1",
    "name": "john Doe",
    "address": {
      "street": "Rua Joaquim Floriano",
      "number": 820,
      "district": "New Places",
      "zipcode": "123456789",
      "city": "Sao Paulo",
      "state": "SP",
      "country": "BR"
    }
  }
}'
var creditCard = Request.Shop.CreditCard()
creditCard.number = "{{CARD_NUMBER}}"
creditCard.holderName = "{{CARD_HOLDER_NAME}}"
creditCard.expiracyMonth = "{{CARD_EXPIRACY_MONTH}}"
creditCard.expiracyYear = "{{CARD_EXPIRACY_YEAR}}"
creditCard.cvv = "{{CARD_SECURITY_CODE}}"
creditCard.birthDate = "{{CARD_HOLDER_BIRTH_DATE}}"

var request = Request.Shop.Payment()
request.userId = "{{USER_ID}}"
request.transactionId = "{{TRANSACTION_ID}}"
request.creditcard = creditCard
request.installments = "{{INSTALLMENTS}}"
request.paymentMethod = "CartaoCredito"
request.document = "{{CPF_DOCUMENT_FORMAT}}"
request.ingeprefsPayload = ingeprefsPayload

var manager = IngresseSDKManager.shared.service.payment
manager.doPayment(request: request,
                  userToken: "{{USER_TOKEN}}",
                  onSuccess: { (response: Response.Shop.Payment) in
                             // code in case of success
                             },
                  onError: { (error: APIError) in 
                           // code in case of error
                           })

If you conclude successfully all the steps above, after this last step you are going to receive an approved transaction return and your order is complete. The user informed in the transaction will be notified about its new tickets and your sales reports updated.

πŸ“˜

Sales Postbacks

It is highly recommended to you to register a payment postback with us. During the payment process, we go through external payment services that may delay the answer.

With a postback registered with us, we can let you know when the payment is finally processed in case we lose any communication with any of these services and a timeout occurs.