Payment

Payment order creation

/api/v3/payment/create POST

!Matters needing attention

In some countries, the payment completion status is not linked to the order amount. When the order status is "PAID", it does not mean that the order amount (amount field) has been completely sold. Please refer to the actual transaction amount (paidAmount field). For details, please consult the staff

request parameter

body parameters(application/json)

{
  "merOrderNo": "20220408123109677",  // Merchant order number
  "currency": "MXN",   // Currency
  "payMethod": "xxx", // Payment method (ask staff for details)
  "amount": 1,   // Amount
  "extra":{}, // Extension parameters, different currencies are slightly different, see the extra parameters section for details
  "returnUrl": "https://www.starpago.com/",  // Payment success or failure jump address
  "notifyUrl": "https://www.starpago.com/",  // Message notification callback address
}
curl --location -g --request POST 'https://api.starpago.com/api/v3/payment/create' \
--header 'User-Agent: apiHttp' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWQiOjEwMCwidHlwZSI6Im1lcmNoYW50IiwiaXNzIjoic3RhcnBhZ28iLCJleHAiOjE3MjU0NTY0NzN9.TTWj2Ctem2qfPhLtvpx4XG5lrXUH4veQD7dsQb0B9SI' \
--header 'Content-Type: application/json' \
--data-raw '{
    "merOrderNo": "20220408123109677",
    "currency": "MXN",
    "payMethod": "xxx",
    "amount": 1,
    "extra": {
        "repeat": true
      },
    "returnUrl": "https://www.starpago.com/",
    "notifyUrl": "https://www.starpago.com/",
}'

Returning Responses

{
    "code": 0,
    "data": {
      "amount": 1, // Order amount
      "params": {
        "clabe": "123456789012345678",
        "url": "https://h5.starpago.com/payment/94230311013500999186060015"
      }, // Different currencies have slightly different content responses, please refer to the actual response
      "status": "PENDING",
      "orderNo": "94230311013500999186060015",
      "currency": "MXN",
      "payMethod": "xxx",
      "createTime": 1678498652499,
      "merOrderNo": "orderxxx",
      "updateTime": 1678498652719,
    },
    "msg": "请求成功"
}

Payment order query

/api/v3/payment/query GET

request parameter

url parameters

{
  "orderNo": "orderNo****", // order number
  "merOrderNo": "merOrderNo*****" // merchant order number (This order number will be reused for some currencies, please do not use it to determine unique data)
}
curl --location -g --request GET 'https://api.starpago.com/api/v3/payment/query?orderNo=20220408123109677' \
--header 'User-Agent: apiHttp' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWQiOjEwMCwidHlwZSI6Im1lcmNoYW50IiwiaXNzIjoic3RhcnBhZ28iLCJleHAiOjE3MjU0NTY0NzN9.TTWj2Ctem2qfPhLtvpx4XG5lrXUH4veQD7dsQb0B9SI'

Returning Responses

{
    "code": 0,
    "data": {
        "amount": 1, // order amount
        "paidAmount": 0, // The actual transaction amount, please refer to this amount for processing
        "tradeCharge": 0, // Transaction Fees, This value is invalid until the transaction is completed.
        "tradeNo": "xxx", // Channel transaction number(not fixed)
        "params": {
            "clabe": "123456789012345678",
            "url": "https://h5.starpago.com/payment/94230311013500999186060015"
        }, // Different currencies have slightly different content responses, please refer to the actual response
        "status": "PENDING",
        "orderNo": "94230311013500999186060015",
        "currency": "MXN",
        "payMethod": "xxx",
        "createTime": 1678498652499,
        "merOrderNo": "orderxxx",
        "updateTime": 1678498652719,
        "payer": {}, // Payer information (non-fixed)
    },
    "msg": "请求成功"
}

Payin Extra Parameters

(BRL) Brazil

// payMethod: PIX
{
  "payerCPF": "xxx", // Payer CPF
  "payerName": "xxx", // Payer Name
}

(COP) Colombia

// payMethod: PSE
{
  "customerName": "xxx", // Customer Name
  "customerPhone": "xxx", // Customer's mobile phone number (10 digits)
  "customerEmail": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user type. Allowed values: CC, TI, CE, PA, NIT
  "bankCode": "xxx", // Bank code
}

// payMethod: NEQUI
{
  "customerName": "xxx", // Customer Name
  "customerPhone": "xxx", // Customer's mobile phone number (10 digits)
  "customerEmail": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user type. Allowed values: CC, TI, CE, PA, NIT
  "accountNo": "xxx", // NEQUI Wallet Account
}

// payMethod: BREB
{
  "customerName": "xxx", // Nome do cliente
  "customerPhone": "xxx", // Número de celular do cliente (10 dígitos)
  "customerEmail": "xxx", // E-mail do cliente
  "documentNumber": "xxx", // número de identificação do usuário
  "documentType": "xxx", // tipo de usuário. Valores permitidos: CC, TI, CE, PA, NIT
}

(MXN) Mexico

// payMethod: CLABE
{
  "repeat": false, // Whether to receive payment repeatedly (bool value)
  "minAmount": 0, // [Optional] Minimum allowable payment amount
  "maxAmount": 0 // [Optional] Maximum allowable payment amount
}

// payMethod: OXXO
{} // No data available, can be ignored

// payMethod: CASH
{} // No data available, can be ignored

(CLP) Chile

// payMethod: WEBPAY
{
  "customerName": "xxx", // Customer Name
  "customerEmail": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. RUT: Tax number, PAS: Passport
}

// payMethod: KHIPU
{
  "customerName": "xxx", // Customer Name
  "customerEmail": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. RUT: Tax number, PAS: Passport
}

// payMethod: MACH
{
  "customerName": "xxx", // Customer Name
  "customerEmail": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. RUT: Tax number, PAS: Passport
}

// payMethod: PAGO46
{
  "customerName": "xxx", // Customer Name
  "customerEmail": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. RUT: Tax number, PAS: Passport
}

(PEN) Peru

// payMethod: BANKTRANSFER
{
  "customerName": "xxx", // Customer Name
  "customerPhone": "xxx", // Customer's mobile phone number (9 digits)
  "customerEmail": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. DNI: ID card, CE: Foreigner ID card, RUC: Tax number, PAS: Passport
}

// payMethod: CASH
{
  "customerName": "xxx", // Customer Name
  "customerPhone": "xxx", // Customer's mobile phone number (9 digits)
  "customerEmail": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. DNI: ID card, CE: Foreigner ID card, RUC: Tax number, PAS: Passport
}

// payMethod: EWALLET
{
  "customerName": "xxx", // Customer Name
  "customerPhone": "xxx", // Customer's mobile phone number (9 digits)
  "customerEmail": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. DNI: ID card, CE: Foreigner ID card, RUC: Tax number, PAS: Passport
}

(TRY) Turkey

// payMethod: BANKTRANSFER
{
  "customerId": "xxx", // Customer ID
  "customerName": "xxx", // Customer Name
  "customerPhone": "xxx", // Customer's mobile phone number
  "customerEmail": "xxx", // Customer Email
}

// payMethod: EWALLET
{
  "customerId": "xxx", // Customer ID
  "customerName": "xxx", // Customer Name
  "customerPhone": "xxx", // Customer's mobile phone number
  "customerEmail": "xxx", // Customer Email
}

// payMethod: CREDITCARD_EU
{
  "cardNo": "5555555555554444", // Card number
  "cardType": "MASTERCARD", // Card type. Only MASTERCARD is supported for TRY
  "cardCcv": "123", // Card security code (3 digits)
  "cardExpMonth": "12", // Card expiry month, format MM
  "cardExpYear": "2029", // Card expiry year, format YYYY
  "firstName": "xxx", // Cardholder first name
  "lastName": "xxx", // Cardholder last name
  "country": "TR", // Country code, ISO 3166-1 alpha-2
  "city": "xxx", // City
  "address": "xxx", // Billing address
  "phone": "xxx", // Customer's mobile phone number
  "postcode": "xxx", // Postal code
  "email": "xxx", // Customer Email
  "userIp": "xxx", // Customer IP address
  "userAgent": "xxx" // Customer browser User-Agent
}

// payMethod: CREDITCARD_NON_EU
{
  "cardNo": "5555555555554444", // Card number
  "cardType": "MASTERCARD", // Card type. Only MASTERCARD is supported for TRY
  "cardCcv": "123", // Card security code (3 digits)
  "cardExpMonth": "12", // Card expiry month, format MM
  "cardExpYear": "2029", // Card expiry year, format YYYY
  "firstName": "xxx", // Cardholder first name
  "lastName": "xxx", // Cardholder last name
  "country": "TR", // Country code, ISO 3166-1 alpha-2
  "city": "xxx", // City
  "address": "xxx", // Billing address
  "phone": "xxx", // Customer's mobile phone number
  "postcode": "xxx", // Postal code
  "email": "xxx", // Customer Email
  "userIp": "xxx", // Customer IP address
  "userAgent": "xxx" // Customer browser User-Agent
}

(ARS) Argentina

// payMethod: BANKTRANSFER
{
  "firstName": "xxx", // Customer FirstName
  "lastName": "xxx", // Customer LastName
  "email": "xxx", // Customer Email
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. DNI: ID card, CUIT: Tax number
}

// payMethod: QRIS
{
  "firstName": "xxx", // Customer FirstName
  "lastName": "xxx", // Customer LastName
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number (10 digits)
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. DNI: ID card, CUIT: Tax number
}

// payMethod: CVU
{
  "firstName": "xxx", // Customer FirstName
  "lastName": "xxx", // Customer LastName
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number (10 digits)
  "documentNumber": "xxx", // user identification number
  "documentType": "xxx", // user identification type. DNI: ID card, CUIT: Tax number
}

(USD) America

// payMethod: CASHAPP
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "ipAddress": "xxx", // Customer's ip address. 
  "uid": "xxx", // [Optional] Customer ID. 
}

// payMethod: CREDITCARD
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "ipAddress": "xxx", // Customer's ip address. 
  "uid": "xxx", // [Optional] Customer ID. 
}

// payMethod: APPLEPAY
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "ipAddress": "xxx", // Customer's ip address. 
  "uid": "xxx", // [Optional] Customer ID. 
}

// payMethod: GOOGLEPAY
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "ipAddress": "xxx", // Customer's ip address. 
  "uid": "xxx", // [Optional] Customer ID. 
}

(USDT)

// payMethod: USDT-TRC20
{
  "uid": "xxx" // User unique id
}

// payMethod: USDT-ERC20
{
  "uid": "xxx" // User unique id
}

// payMethod: USDT-BEP20
{
  "uid": "xxx" // User unique id
}

(RUB) Russia

// payMethod: P2P
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "document": "xxx", // Customer ID information
  "ipAddress": "xxx", // Customer's ip address. 
} 

// payMethod: SBP
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "document": "xxx", // Customer ID information
  "ipAddress": "xxx", // Customer's ip address. 
} 

// payMethod: TPAY
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "document": "xxx", // Customer ID information
  "ipAddress": "xxx", // Customer's ip address. 
} 

// payMethod: SBERPAY
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "document": "xxx", // Customer ID information
  "ipAddress": "xxx", // Customer's ip address. 
} 

// payMethod: VTBPAY
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "document": "xxx", // Customer ID information
  "ipAddress": "xxx", // Customer's ip address. 
} 

// payMethod: ALFAPAY
{
  "name": "xxx", // Customer name
  "email": "xxx", // Customer Email
  "phone": "xxx", // Customer's mobile phone number
  "document": "xxx", // Customer ID information
  "ipAddress": "xxx", // Customer's ip address. 
} 

(EUR) EU

// payMethod: CREDITCARD_EU
{
  "cardNo": "5555555555554444", // Card number
  "cardType": "MASTERCARD", // Card type
  "cardCcv": "123", // Card security code (3 digits)
  "cardExpMonth": "12", // Card expiry month, format MM
  "cardExpYear": "2029", // Card expiry year, format YYYY
  "firstName": "xxx", // Cardholder first name
  "lastName": "xxx", // Cardholder last name
  "country": "EU", // Country code, ISO 3166-1 alpha-2
  "city": "xxx", // City
  "address": "xxx", // Billing address
  "phone": "xxx", // Customer's mobile phone number
  "postcode": "xxx", // Postal code
  "email": "xxx", // Customer Email
  "userIp": "xxx", // Customer IP address
  "userAgent": "xxx" // Customer browser User-Agent
}

// payMethod: CREDITCARD_NON_EU
{
  "cardNo": "5555555555554444", // Card number
  "cardType": "MASTERCARD", // Card type
  "cardCcv": "123", // Card security code (3 digits)
  "cardExpMonth": "12", // Card expiry month, format MM
  "cardExpYear": "2029", // Card expiry year, format YYYY
  "firstName": "xxx", // Cardholder first name
  "lastName": "xxx", // Cardholder last name
  "country": "EU", // Country code, ISO 3166-1 alpha-2
  "city": "xxx", // City
  "address": "xxx", // Billing address
  "phone": "xxx", // Customer's mobile phone number
  "postcode": "xxx", // Postal code
  "email": "xxx", // Customer Email
  "userIp": "xxx", // Customer IP address
  "userAgent": "xxx" // Customer browser User-Agent
}

USD exchange rate query

/api/v3/payment/usdRate GET

request parameter

url parameters

{
  "currency": "BRL", // currency type
  "payMethod": "payMethod",  // mode of payment
}
curl --location -g --request GET 'https://api.starpago.com/api/v3/payment/usdRate?currency=BRL&payMethod=payMethod' \
--header 'User-Agent: apiHttp' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWQiOjEwMCwidHlwZSI6Im1lcmNoYW50IiwiaXNzIjoic3RhcnBhZ28iLCJleHAiOjE3MjU0NTY0NzN9.TTWj2Ctem2qfPhLtvpx4XG5lrXUH4veQD7dsQb0B9SI'

Returning Responses

{
    "code": 0,
    "message": "success",
    "data": {
        "usdRate": 18.774663
    }
}