UpGate API documentation (1.2)

UpGate is a world-class payment orchestration platform. Our mission is to simplify payments and make it easier for merchants to reach global customers. We use the latest technologies to help you achieve better conversions and global user monetization.

Download OpenAPI description
Languages
Servers
Mock server

https://docs.upgate.com/_mock/openapi/

Sandbox UpGate API

https://api.sandbox.upgate.com/v1/

Changelog

[1.1.35] - 2025-05-23

Added

  • New response code '2016 Crypto address is invalid'

[1.1.34] - 2025-05-19

Added

[1.1.33] - 2025-04-25

Added

  • New response code '2908 Payment token is not valid'

[1.1.32] - 2025-04-14

Added

  • New payment methods added

[1.1.31] - 2025-04-03

Added

  • New fields rebill_transaction_amount, rebill_transaction_currency_code to transaction product postback & response

[1.1.30] - 2025-04-07

Added

  • New payment methods added

[1.1.29] - 2025-03-05

Added

  • New field customer_selected_country_code to postback payment details

[1.1.28] - 2025-02-24

Added

  • New transaction types: RDR and RDR_REVERSAL

[1.1.27] - 2025-02-17

Added

  • New fields customer_phone_number, customer_email, customer_first_name, customer_last_name, payment_token_type to postback payment details
  • New fields processor_response_text, cascade_attempt, has_been_cascaded to postback transaction details

[1.1.26] - 2025-01-28

Added

  • New response code '2907 Payment type not supported for payment method'

[1.1.25] - 2025-01-27

Changed

  • Updated the page structure

[1.1.24] - 2025-01-15

Added

[1.1.23] - 2024-12-15

Added

  • New response code '2309 Customer blacklisted'

[1.1.22] - 2024-11-26

Added

  • Field version has been added to data in transaction postbacks
  • Field version has been added to data in subscription postbacks

[1.1.21] - 2024-10-16

Removed

  • Payment detail card_token_id has been removed from data.transactions.payment_details in postbacks
  • Payment detail card_token_id has been removed from data.transactions.payment_details in response to synchronous mit-sale and mit-authorize

[1.1.20] - 2024-10-03

Changed

Updated

[1.1.19] - 2024-09-17

Changed

  • Changed max length for field success_url from 2048 to 512
  • Changed max length for field failure_url from 2048 o 512

[1.1.18] - 2024-07-23

Added

  • Added request subscription by transaction ID

[1.1.17] - 2024-04-12

Added

  • Added Subscription state request by subscription id

[1.1.16] - 2024-04-10

Added

  • For callback added fields transaction_amount, transaction_currency_code and product_transaction_price

[1.1.15] - 2024-04-04

Changed

  • Update response codes

[1.1.14] - 2024-02-20

Added

  • Added Direct payment flow section
  • Added Checkout flow section
  • Added Checkout request examples
  • Added description of Embedded flow for Checkout
  • Added new APM payment methods

[1.1.13] - 2023-12-12

Added

  • Added fields shop_name and shop_url
  • For subscription added fields retry_at, retry_count and created_at
  • Added new APM payment methods

Changed

  • Update response codes

[1.1.12] - 2023-09-05

Added

  • Create token endpoint

Changed

  • Update response codes

[1.1.11] - 2023-03-05

Changed

  • For subscription renamed field customer_id to merchant_customer_id
  • For subscription renamed field is_enabled to is_rebill_enabled
  • Changed max length for field success_url from 64 to 2048
  • Changed max length for field failure_url from 64 to 2048
  • Changed max length for field email from 64 to 320
  • Changed that the amount for Authorize can be 0

Removed

  • Required header X-Merchant-ID from all requests

Introduction

Demo payment page

Example

Operations

Examples

Operations

Subscription request

Request

Headers
X-Idempotency-Keystring

The system supports the query deduplication mechanism. Any system-wide merchant's request after the first one with the same X-Idempotency-Key will return an error. For example, if you have retrying mechanism for payouts and you want to avoid double sending, you can put header with value payout_{your_payout_id}

Bodyapplication/jsonrequired
payment_dataobject(subscriptionPaymentData)required
payment_data.​typestringrequired
Enum"AUTHORIZE""RECURRING"
payment_data.​methodsArray of strings

Supported Payment methods can be found here for cards and here for alternative payment methods. Please note that the payment methods can be empty, in this case payment methods would be taken from the back office configuration. In case you are using Google Pay or Apple Pay, Card method needs to be included as well, e.g. "APPLE_PAY", "CARD" or "GOOGLE_PAY", "CARD"

payment_data.​amountnumberrequired
payment_data.​currency_codestring^[A-Z]{3}$required

Currency code (ISO 4217)

payment_data.​forced_3dboolean
payment_data.​shop_namestring[ 1 .. 128 ] characters
payment_data.​shop_urlstring[ 1 .. 128 ] characters^https://
payment_data.​merchant_payment_idstring
customerobjectrequired
customer.​merchant_customer_idstringrequired
customer.​emailstring
customer.​languagestring^[a-z]{2}-[a-z]{2}$
customer.​country_codestring^[A-Z]{2}$

Country Code (ISO 3166-2)

callbackobjectrequired

Specifies the URLs to which the customer will be redirected after completing a payment transaction. The success_url is used for redirection upon successful payment, and the failure_url is used in case of payment failure.

callback.​success_urlstring[ 1 .. 512 ] charactersrequired
callback.​failure_urlstring[ 1 .. 512 ] charactersrequired
productsArray of objects(subscriptionProduct)required
products[].​merchant_product_idstring[ 1 .. 128 ] characters
products[].​typestringrequired
Value"SUBSCRIPTION"
products[].​pricenumberrequired
products[].​namestringrequired
products[].​descriptionstring
products[].​chargeobjectrequired
products[].​charge.​valueinteger(int32)>= 1
products[].​charge.​intervalstring
Value"DAY"
products[].​trialobject
additional_infoobject
payment_form_overrideobject(paymentFormOverride)

Customizing Payment Form Appearance. All these parameters will override existing configuration in Upgate back office if any

curl -i -X POST \
  https://docs.upgate.com/_mock/openapi/checkout \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: YOUR_API_KEY_HERE' \
  -H 'X-Idempotency-Key: string' \
  -d '{
    "payment_data": {
      "merchant_payment_id": "P_001",
      "methods": [
        "CARD",
        "MBWAY"
      ],
      "type": "RECURRING",
      "amount": 9.99,
      "currency_code": "EUR"
    },
    "customer": {
      "merchant_customer_id": "U_001"
    },
    "callback": {
      "success_url": "https://example.com/success",
      "failure_url": "https://example.com/failure"
    },
    "products": [
      {
        "type": "SUBSCRIPTION",
        "name": "Test product name",
        "description": "Test product description",
        "price": 9.99,
        "charge": {
          "value": 30,
          "interval": "DAY"
        }
      }
    ]
  }'

Responses

OK

Bodyapplication/json
idstringrequired
created_atstringrequired
merchant_idstringrequired
sessionobject(session)required
session.​created_atstring[ 1 .. 64 ] charactersrequired

UTC date time format

session.​expires_atstring[ 1 .. 64 ] charactersrequired

UTC date time format

session.​redirect_urlstring[ 1 .. 2048 ] charactersrequired
payment_dataobject(subscriptionPaymentData)required
payment_data.​typestringrequired
Enum"AUTHORIZE""RECURRING"
payment_data.​methodsArray of strings

Supported Payment methods can be found here for cards and here for alternative payment methods. Please note that the payment methods can be empty, in this case payment methods would be taken from the back office configuration. In case you are using Google Pay or Apple Pay, Card method needs to be included as well, e.g. "APPLE_PAY", "CARD" or "GOOGLE_PAY", "CARD"

payment_data.​amountnumberrequired
payment_data.​currency_codestring^[A-Z]{3}$required

Currency code (ISO 4217)

payment_data.​forced_3dboolean
payment_data.​shop_namestring[ 1 .. 128 ] characters
payment_data.​shop_urlstring[ 1 .. 128 ] characters^https://
payment_data.​merchant_payment_idstring
customerobjectrequired
customer.​merchant_customer_idstringrequired
customer.​emailstring
customer.​languagestring^[a-z]{2}-[a-z]{2}$
customer.​country_codestring^[A-Z]{2}$

Country Code (ISO 3166-2)

callbackobjectrequired

Specifies the URLs to which the customer will be redirected after completing a payment transaction. The success_url is used for redirection upon successful payment, and the failure_url is used in case of payment failure.

callback.​success_urlstring[ 1 .. 512 ] charactersrequired
callback.​failure_urlstring[ 1 .. 512 ] charactersrequired
productsArray of objects(subscriptionProduct)required
products[].​merchant_product_idstring[ 1 .. 128 ] characters
products[].​typestringrequired
Value"SUBSCRIPTION"
products[].​pricenumberrequired
products[].​namestringrequired
products[].​descriptionstring
products[].​chargeobjectrequired
products[].​charge.​valueinteger(int32)>= 1
products[].​charge.​intervalstring
Value"DAY"
products[].​trialobject
additional_infoobject
payment_form_overrideobject(paymentFormOverride)

Customizing Payment Form Appearance. All these parameters will override existing configuration in Upgate back office if any

Response
application/json
{ "id": "2E2CL5R3KC7K3", "created_at": "2022-04-15T10:54:03.633Z", "merchant_id": "upgatetests", "payment_data": { "merchant_payment_id": "P_001", "methods": [], "type": "RECURRING", "amount": 9.99, "currency_code": "EUR" }, "customer": { "merchant_customer_id": "U_001" }, "callback": { "success_url": "https://example.com/success", "failure_url": "https://example.com/failure" }, "products": [ {} ], "session": { "created_at": "2024-02-15T13:38:47.173Z", "expires_at": "2024-02-15T13:53:47.173Z", "redirect_url": "https://hub.sandbox.upgate.com/redirect/?sessionId=S_001" } }

Callbacks

Checkout notification
post

Update subscription by merchant product id

Request

Query
merchant_product_idstringrequired
Example: merchant_product_id=2JZGULPNK27K2
Headers
X-Idempotency-Keystring

The system supports the query deduplication mechanism. Any system-wide merchant's request after the first one with the same X-Idempotency-Key will return an error. For example, if you have retrying mechanism for payouts and you want to avoid double sending, you can put header with value payout_{your_payout_id}

Bodyapplication/jsonrequired
is_rebill_enabledbooleanrequired
curl -i -X PATCH \
  'https://docs.upgate.com/_mock/openapi/subscription?merchant_product_id=2JZGULPNK27K2' \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: YOUR_API_KEY_HERE' \
  -H 'X-Idempotency-Key: string' \
  -d '{
    "is_rebill_enabled": true
  }'

Responses

OK

Bodyapplication/json
typestring
Value"SUBSCRIPTION"
dataobject
Response
application/json
{ "type": "SUBSCRIPTION", "data": { "subscription_id": "2JWZGUKDK2DK2", "created_at": "2023-02-15T16:11:50.694Z", "subscription_status": "ACTIVE", "expires_at": "2023-03-13T16:11:50.694Z", "merchant_id": "UpGate", "payment_id": "2E2CL5R3KC7K3", "product_id": "2JZGULPNK27K2", "merchant_product_id": "R_001", "merchant_payment_id": "P_001", "merchant_customer_id": "777", "payment_method": "CARD", "currency_code": "USD", "amount": "10.01", "is_trial": false, "charge_interval": "DAY", "charge_interval_value": 11, "is_rebill_enabled": true, "retry_at": "2023-03-13T16:11:50.694Z", "retry_count": 0, "retry_total_count": 2 } }

Get subscription by transaction ID

Request

Query
transaction_idstring
Example: transaction_id=2U5T2MIX22EK3
pageinteger(int32)>= 1
Default 1
Example: page=1
sizeinteger(int32)[ 1 .. 100 ]
Default 100
Example: size=100
curl -i -X GET \
  'https://docs.upgate.com/_mock/openapi/subscription?page=1&size=100&transaction_id=2U5T2MIX22EK3' \
  -H 'X-Api-Key: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
typestringrequired
Value"SUBSCRIPTION"
dataArray of objects(subscription)required
data[].​subscription_idstring[ 1 .. 64 ] characters
data[].​created_atstring

UTC date time format

data[].​subscription_statusstring[ 1 .. 64 ] characters
data[].​expires_atstring

UTC date time format

data[].​merchant_idstring[ 1 .. 64 ] characters
data[].​merchant_product_idstring[ 1 .. 64 ] characters
data[].​merchant_payment_idstring[ 1 .. 64 ] characters
data[].​merchant_customer_idstring[ 1 .. 64 ] characters
data[].​payment_methodstring
Value"CARD"
data[].​currency_codestring[ 1 .. 64 ] characters
data[].​amountstring[ 1 .. 64 ] characters
data[].​transaction_currency_codestring[ 1 .. 64 ] characters
data[].​transaction_amountstring[ 1 .. 64 ] characters
data[].​transaction_fee_currency_codestring[ 1 .. 64 ] characters
data[].​transaction_fee_amountstring[ 1 .. 64 ] characters
data[].​is_trialboolean
data[].​charge_intervalstring
Value"DAY"
data[].​charge_interval_valuenumber
data[].​is_rebill_enabledboolean
data[].​trial_intervalstring
Value"DAY"
data[].​trial_interval_valuenumber
data[].​payment_idstring
Example: "2JWZGTNKS67K2"
data[].​product_idstring
Example: "2JWZGTNKSG7K2"
data[].​retry_atstring

UTC date time format

data[].​retry_countnumber
data[].​retry_total_countnumber

Total count of attempts to rebill

data[].​shop_namestring

Shop name from original payment

data[].​shop_urlstring

Shop URL from original payment

metaobject(metaPageInfo)required
meta.​pageNumberinteger(int32)required
meta.​pageSizeinteger(int32)required
Response
application/json
{ "type": "SUBSCRIPTION", "data": [ {}, {} ], "meta": { "pageNumber": 1, "pageSize": 100 } }

Google Pay™

Override theme

Other request examples

Operations

Embedded flow