Another payment method

POST
/api/v3/buyers/{buyerId}/another-payment-method
lts

This endpoint allows the buyer to use a different payment method they already have to purchase new subscriptions or to renew, upgrade, or downgrade existing subscriptions. This means the buyer can purchase multiple new subscriptions and also renew, upgrade, or downgrade multiple existing subscriptions within a single request.

Header parameters
Attribute
Requirement
Description
x-public-key
mandatory
a public key that identifies the merchant account (there can be several for one merchant)
x-buyer-ip
mandatory
is responsible for information about the buyer's IP address
x-date
mandatory
is responsible for the date and time of sending the request
x-token
mandatory
generated on the merchant side
x-source
mandatory
identifier of the type of service that is the initiator of the request
x-id
mandatory
service identifier from which the current request is made
x-google-analytics-client-id
optional
client identifier for Google Analytics
Request parameters
There are rules for creating the request that must be followed:
  1. You cannot perform upgrade, renew, and downgrade simultaneously for the same subscription (subscriptions must be unique).
  2. The set of parameters for purchase differs from those for upgrade, renew, and downgrade.
  3. A single request may contain all actions at once: purchase, upgrade, renew, downgrade.
Attribute
Type
Requirement
Description
Standard
buyerId
string
mandatory
Unique identifier of the buyer in the system.
uuid
currency
string
optional
Specifies the currency in which the prices should be returned.
ISO 4217 Alphabetic
sequence
string
optional
Internal user ID
only digits
(16-19 length)
isMobile
bool
mandatory
Indicates whether the request is for the mobile version.
Its value affects the precheckAutocharge settings.
-
products
array of objects
mandatory
Array of data describing actions performed on the subscription(s)
-
metaData
object
optional
Object of type “key-value”, to transmit the internal meta-information of the merchant
(this data is not used by the backend and is transmitted when sending various events on the order)
-
Response parameters
Regardless of the initial request type (purchase, upgrade, renew, downgrade), the response for each of these requests has a single unified format.
Attribute
Type
Description
data
object
Contains information about the order.
Note: If the request contains a product that does not exist in the database, you will receive an error 404 – Product not found by merchant and code.
meta
array
Provides metadata about the response
{
    "data": {
        "url": "http://pay-front-mspy-com.minikube/initial-billing/IV72ry27",
        "params": {
            "metaData": {
                "someKey": "value"
            },
            "sequence": "9876543234567898765",
            "discount": null,
            "coupon": null,
            "googleAnalyticsClientId": "ga1234566543"
        }
    },
    "meta": []
}
Errors and interpretation

The list of possible errors for this endpoint, along with their types and interpretation, is provided in the general reference: Endpoint response errors.