Purchase Subscription with Existing Card
POST https://api-sandbox.coinflow.cash/api/subscription/{merchantId}/subscribers/token Content-Type: application/json
Purchase a subscription with an existing credit card
Reference: /api-reference/api-reference/subscription/create-subscription-token
Authentication
x-coinflow-auth-session-keyheader (required) — The session key generated for the end user - see /api-reference/api-reference/authentication/get-session-keyx-coinflow-auth-walletheader (required) — The web3 wallet of the end user - see /api-reference/api-reference/authentication/get-session-keyx-coinflow-auth-blockchainheader (required) — The blockchain associated with the end user - see /api-reference/api-reference/authentication/get-session-key
Request
Path parameters
merchantId(string, required)
Headers
x-device-id(string, optional) — - (Optional) If you are using Coinflow Chargeback Protection, you must pass the device id of the customer’s device.
Body (application/json)
planCode(string, required) — The code of the plan to use for the subscriptiontoken(string, required) — Token for the card to be used for the subscriptioncustomerInfo(object or object, optional)- SplitNameCustomerInfo
firstName(string, required)lastName(string, required)verificationId(string, optional)displayName(string, optional)address(string, optional)city(string, optional)state(string, optional)zip(string, optional)country(string, optional)ip(string, optional)lat(string, optional)lng(string, optional)dob(string, optional) — Date of birth in YYYY-MM-DD formatemail(string, optional)
- NameCustomerInfo
verificationId(string, optional)displayName(string, optional)address(string, optional)city(string, optional)state(string, optional)zip(string, optional)country(string, optional)ip(string, optional)lat(string, optional)lng(string, optional)dob(string, optional) — Date of birth in YYYY-MM-DD formatemail(string, optional)name(string, optional)
- SplitNameCustomerInfo
webhookInfo(object, optional)example(string, optional)
chargebackProtectionData(list of object or object or object or object or object or object or object or object, optional) — Cart item details required for Coinflow Chargeback Protection. Required if the merchant uses chargeback protection.- Pick_nftCartItem.Exclude_keyofnftCartItem.sellingPrice-or-itemClass__
productName(string, required) — The name of the related productproductType(enum, required)- Allowed values:
inGameProduct,gameOfSkill,dataStorage,computingResources,sportsTicket,eSportsTicket,musicTicket,conferenceTicket,virtualSportsTicket,virtualESportsTicket,virtualMusicTicket,virtualConferenceTicket,alcohol,DLC,subscription,fundACause,realEstate,computingContract,digitalArt,topUp,ownershipContract,inGameCurrency,digitalCollectibles,digitalCollectiblesMarketplace,digitalGiftingMarketplace,sweepstakes,virtualSportsEvents,contractInvoicing,onlineCasino,cryptoOnramp,gaming,travelDocuments,musicStreaming,digitalContent,eBooks,digitalSubscriptionContent
- Allowed values:
quantity(double, required) — The number of units soldlistPrice(object, optional) — The item’s list pricecurrency(string, optional)valueInCurrency(double, optional)
rawProductData(object, optional)example(string, optional)
seller(object, optional)id(string, optional) — Id of the selleremail(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: LoislastName(string, optional) — Last name Example: Loisdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$rawSellerData(object, optional) — Construct a type with a set of properties K of type T
transactionHistory(list of object, optional)txType(string, required)chain(string, required)paymentAmount(string, required)paymentToken(string, required)to(string, required)from(string, required)registryContract(string, required)assetID(string, required)txTime(string, required)blockNumber(double, required)txHash(string, required)
- Pick_GiftCardCartItem.Exclude_keyofGiftCardCartItem.listPrice__
sellingPrice(object, required)currency(string, required)valueInCurrency(double, required)
itemClass(enum, required)- Allowed values:
giftCard
- Allowed values:
productType(enum, required)- Allowed values:
giftCard
- Allowed values:
quantity(double, required) — The number of units soldid(string, required) — The cart items’s unique IDitemFulfillment(enum, required) — How the product was fulfilled.- Allowed values:
digital,physical
- Allowed values:
brand(string, optional) — The name of the brandrawProductData(object, optional) — Construct a type with a set of properties K of type Tseller(object, optional)id(string, optional) — Id of the selleremail(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: LoislastName(string, optional) — Last name Example: Loisdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$rawSellerData(object, optional) — Construct a type with a set of properties K of type T
sku(string, optional) — The stock-keeping unit (SKU) numbercategories(list of string, optional) — The category in the site/app in which the item was classified (e.g., fashion)isGift(boolean, optional)recipientInfo(object, optional)accountId(string, optional) — The ID of the account that will receive the purchased goodsdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$email(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: Loisgender(string, optional) — Gender Example: femalelastName(string, optional) — Last name Example: Loismessage(string, optional) — The message that the recipient will receivephoneInfo(object, optional) — Phone information structurecountryCode(string, required) — The country code (leading+is optional) Example: 42 Pattern: ^+?[0-9]+$phone(string, required) — The phone number without the country code or hyphens Example: 2025550169 Pattern: ^[0-9]+$carrier(string, optional) — The mobile carrier Example: T-Mobile
shippingAddress(object, optional) — Address structurecountry(string, optional) — Country code specified as a two letter code according to ISO 3166 Alpha-2 Between 2 and 2 characters Example: US Pattern: ^[A-Z]$state(string, optional) — The state or province Example: PAcity(string, optional) — The city or locality Example: Pittsburghstreet(string, optional) — The street name Example: Baker StpostalCode(string, optional) — The address postal code
wallet(object, optional) — The crypto wallet that will receive the fundscustodialType(enum, required) — The type of the wallet Allowed values: custodial, nonCustodial, unknown Example: custodial- Allowed values:
custodial,nonCustodial,unknown
- Allowed values:
blockchain(string, required) — The blockchain on which the transaction was made Example: BTC Pattern: ^[A-Z0-9-]+$address(string, required) — The crypto wallet address that will receive the funds
expectedDeliveryDelay(double, optional) — The expected delay in delivery, in hoursisPresetAmount(boolean, optional) — Represents whether the item amount is taken from a preset list, e.g. 25, 50, 100, etc. or whether it was a different amount, e.g. 27
- CryptoCartItem
itemClass(enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: crypto Example: crypto- Allowed values:
crypto
- Allowed values:
units(string, required) — The amount in the crypto currency which is specified in thecryptoCurrencyproperty Example: 1.04112 Pattern: ^[0-9]+(.[0-9]+)?$cryptoCurrency(string, required) — The crypto-currency symbol (uppercase) Example: BTC Pattern: ^[A-Z0-9-]+$unitPrice(object, required) — The price per 1 unitcurrency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USDvalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90
recipientInfo(object, required)accountId(string, optional) — The ID of the account that will receive the purchased goodsdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$email(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: Loisgender(string, optional) — Gender Example: femalelastName(string, optional) — Last name Example: Loismessage(string, optional) — The message that the recipient will receivephoneInfo(object, optional) — Phone information structurecountryCode(string, required) — The country code (leading+is optional) Example: 42 Pattern: ^+?[0-9]+$phone(string, required) — The phone number without the country code or hyphens Example: 2025550169 Pattern: ^[0-9]+$carrier(string, optional) — The mobile carrier Example: T-Mobile
shippingAddress(object, optional) — Address structurecountry(string, optional) — Country code specified as a two letter code according to ISO 3166 Alpha-2 Between 2 and 2 characters Example: US Pattern: ^[A-Z]$state(string, optional) — The state or province Example: PAcity(string, optional) — The city or locality Example: Pittsburghstreet(string, optional) — The street name Example: Baker StpostalCode(string, optional) — The address postal code
wallet(object, optional) — The crypto wallet that will receive the fundscustodialType(enum, required) — The type of the wallet Allowed values: custodial, nonCustodial, unknown Example: custodial- Allowed values:
custodial,nonCustodial,unknown
- Allowed values:
blockchain(string, required) — The blockchain on which the transaction was made Example: BTC Pattern: ^[A-Z0-9-]+$address(string, required) — The crypto wallet address that will receive the funds
id(string, optional) — The cart items’s unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6rawProductData(object, optional)example(string, optional)
expectedDeliveryDelay(double, optional) — The expected delay in delivery, in hours Min value: 0seller(object, optional)id(string, optional) — Id of the selleremail(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: LoislastName(string, optional) — Last name Example: Loisdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$rawSellerData(object, optional) — Construct a type with a set of properties K of type T
- MoneyTopUpCartItem
itemClass(enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: moneyTopUp Example: moneyTopUp- Allowed values:
moneyTopUp
- Allowed values:
sellingPrice(object, required) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
topUpAmount(object, required) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
quantity(double, required) — Quantity Example: 2isPresetAmount(boolean, required) — Represents whether the item amount is taken from a preset list, e.g. 25, 50, 100, etc. or whether it was a different amount, e.g. 27id(string, optional) — The cart items’s unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6rawProductData(object, optional) — Construct a type with a set of properties K of type TrecipientInfo(object, optional)accountId(string, optional) — The ID of the account that will receive the purchased goodsdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$email(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: Loisgender(string, optional) — Gender Example: femalelastName(string, optional) — Last name Example: Loismessage(string, optional) — The message that the recipient will receivephoneInfo(object, optional) — Phone information structurecountryCode(string, required) — The country code (leading+is optional) Example: 42 Pattern: ^+?[0-9]+$phone(string, required) — The phone number without the country code or hyphens Example: 2025550169 Pattern: ^[0-9]+$carrier(string, optional) — The mobile carrier Example: T-Mobile
shippingAddress(object, optional) — Address structurecountry(string, optional) — Country code specified as a two letter code according to ISO 3166 Alpha-2 Between 2 and 2 characters Example: US Pattern: ^[A-Z]$state(string, optional) — The state or province Example: PAcity(string, optional) — The city or locality Example: Pittsburghstreet(string, optional) — The street name Example: Baker StpostalCode(string, optional) — The address postal code
wallet(object, optional) — The crypto wallet that will receive the fundscustodialType(enum, required) — The type of the wallet Allowed values: custodial, nonCustodial, unknown Example: custodial- Allowed values:
custodial,nonCustodial,unknown
- Allowed values:
blockchain(string, required) — The blockchain on which the transaction was made Example: BTC Pattern: ^[A-Z0-9-]+$address(string, required) — The crypto wallet address that will receive the funds
- TravelCartItem
itemClass(enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: travel Example: travel- Allowed values:
travel
- Allowed values:
sellingPrice(object, required) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
lodging(object, required) — The lodging details of the travel bookingreservationId(string, required) — Hotel reservation id Example: X36Q9Cnights(double, required) — The number of nights booked in the reservation Min value: 1 Example: 2checkInDate(string, required) — The check-in date Example: 2022-05-02checkInHour(string, required) — The hour of day in which the check-in is done Example: 18 Pattern: ^([01][0-9]|2[0-3])$hotel(object, required) — The booked hotel detailsname(string, required) — The name of the hotel Example: The Plaza Hotelcountry(string, required) — The two-letter code of the country in which the hotel is located Example: US Pattern: ^[A-Z]$city(string, required) — The city in which the hotel is located Example: New York
wereExtrasPurchased(boolean, required) — Indicates whether extras were purchased in the reservationisRefundable(boolean, required) — Indicates whether the reservation is refundablehighestRoomType(string, required) — The most luxurious room booked in the reservation Example: Presidential SuitenumberOfRooms(double, required) — The number of rooms booked in the reservation Min value: 1 Example: 2numberOfGuests(double, required) — The number of guests in the reservation Min value: 1 Example: 4numberOfKids(double, required) — The number of kids, out of the number of guests in the reservation Min value: 0 Example: 2
pnr(string, required) — The flight ticket’s PNR code Example: X36Q9Ctrip(object, required) — The trip details of the travel bookingnumberOfFlights(double, required) — The number of flights in the trip Min value: 1 Example: 2numberOfCheckedBags(double, required) — The number of checked bags Min value: 0 Example: 1firstWayDestination(string, required) — The first-way destination’s three-letter IATA airport code Example: JFK Pattern: ^[A-Z]$isRoundTrip(boolean, required) —trueif the trip is a round-trip Example: truehighestClass(enum, required) —luxuriousif the highest bought travel class in the trip is a luxury class (business/first),economyotherwise Example: luxurious- Allowed values:
economy,luxurious
- Allowed values:
isFlexibleTicket(boolean, required) — True if the trip ticket is a flexible ticket Example: truewereExtrasPurchased(boolean, required) — True if extras were included in the trip purchase Example: true
firstFlight(object, required) — The first flight details of the tripnumberOfTravelers(double, required) — The number of travelers in the first flight Min value: 1 Example: 2departureTime(double, required) — The timestamp of the departure, in milliseconds since the unix epoch Example: 1551398400000departureAirport(string, required) — The first-flight departure airport’s three-letter IATA code Example: JFK Pattern: ^[A-Z]$duration(double, required) — The first-flight duration, in hours Min value: 0 Example: 3.5flightNumber(string, required) — The alphanumeric flight code Example: BA2491A Pattern: ^[A-Z0-9]+$
id(string, optional) — The cart items’s unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6rawProductData(object, optional)example(string, optional)
listPrice(object, optional) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
recipientInfo(object, optional)accountId(string, optional) — The ID of the account that will receive the purchased goodsdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$email(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: Loisgender(string, optional) — Gender Example: femalelastName(string, optional) — Last name Example: Loismessage(string, optional) — The message that the recipient will receivephoneInfo(object, optional) — Phone information structurecountryCode(string, required) — The country code (leading+is optional) Example: 42 Pattern: ^+?[0-9]+$phone(string, required) — The phone number without the country code or hyphens Example: 2025550169 Pattern: ^[0-9]+$carrier(string, optional) — The mobile carrier Example: T-Mobile
shippingAddress(object, optional) — Address structurecountry(string, optional) — Country code specified as a two letter code according to ISO 3166 Alpha-2 Between 2 and 2 characters Example: US Pattern: ^[A-Z]$state(string, optional) — The state or province Example: PAcity(string, optional) — The city or locality Example: Pittsburghstreet(string, optional) — The street name Example: Baker StpostalCode(string, optional) — The address postal code
wallet(object, optional) — The crypto wallet that will receive the fundscustodialType(enum, required) — The type of the wallet Allowed values: custodial, nonCustodial, unknown Example: custodial- Allowed values:
custodial,nonCustodial,unknown
- Allowed values:
blockchain(string, required) — The blockchain on which the transaction was made Example: BTC Pattern: ^[A-Z0-9-]+$address(string, required) — The crypto wallet address that will receive the funds
- FlightTicketCartItem
itemClass(enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: flightTicket Example: flightTicket- Allowed values:
flightTicket
- Allowed values:
sellingPrice(object, required) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
pnr(string, required) — The flight ticket’s PNR code Example: X36Q9Ctrip(object, required) — The trip details of the travel bookingnumberOfFlights(double, required) — The number of flights in the trip Min value: 1 Example: 2numberOfCheckedBags(double, required) — The number of checked bags Min value: 0 Example: 1firstWayDestination(string, required) — The first-way destination’s three-letter IATA airport code Example: JFK Pattern: ^[A-Z]$isRoundTrip(boolean, required) —trueif the trip is a round-trip Example: truehighestClass(enum, required) —luxuriousif the highest bought travel class in the trip is a luxury class (business/first),economyotherwise Example: luxurious- Allowed values:
economy,luxurious
- Allowed values:
isFlexibleTicket(boolean, required) — True if the trip ticket is a flexible ticket Example: truewereExtrasPurchased(boolean, required) — True if extras were included in the trip purchase Example: true
firstFlight(object, required) — The first flight details of the tripnumberOfTravelers(double, required) — The number of travelers in the first flight Min value: 1 Example: 2departureTime(double, required) — The timestamp of the departure, in milliseconds since the unix epoch Example: 1551398400000departureAirport(string, required) — The first-flight departure airport’s three-letter IATA code Example: JFK Pattern: ^[A-Z]$duration(double, required) — The first-flight duration, in hours Min value: 0 Example: 3.5flightNumber(string, required) — The alphanumeric flight code Example: BA2491A Pattern: ^[A-Z0-9]+$
id(string, optional) — The cart items’s unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6rawProductData(object, optional)example(string, optional)
listPrice(object, optional) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
recipientInfo(object, optional)accountId(string, optional) — The ID of the account that will receive the purchased goodsdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$email(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: Loisgender(string, optional) — Gender Example: femalelastName(string, optional) — Last name Example: Loismessage(string, optional) — The message that the recipient will receivephoneInfo(object, optional) — Phone information structurecountryCode(string, required) — The country code (leading+is optional) Example: 42 Pattern: ^+?[0-9]+$phone(string, required) — The phone number without the country code or hyphens Example: 2025550169 Pattern: ^[0-9]+$carrier(string, optional) — The mobile carrier Example: T-Mobile
shippingAddress(object, optional) — Address structurecountry(string, optional) — Country code specified as a two letter code according to ISO 3166 Alpha-2 Between 2 and 2 characters Example: US Pattern: ^[A-Z]$state(string, optional) — The state or province Example: PAcity(string, optional) — The city or locality Example: Pittsburghstreet(string, optional) — The street name Example: Baker StpostalCode(string, optional) — The address postal code
wallet(object, optional) — The crypto wallet that will receive the fundscustodialType(enum, required) — The type of the wallet Allowed values: custodial, nonCustodial, unknown Example: custodial- Allowed values:
custodial,nonCustodial,unknown
- Allowed values:
blockchain(string, required) — The blockchain on which the transaction was made Example: BTC Pattern: ^[A-Z0-9-]+$address(string, required) — The crypto wallet address that will receive the funds
- FlightUpgradeCartItem
itemClass(enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: flightUpgrade Example: flightUpgrade- Allowed values:
flightUpgrade
- Allowed values:
sellingPrice(object, required) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
upgradeType(enum, required) — The type of upgrade Example: changes- Allowed values:
changes,fareIncrease,baggage,seats,insurance,other
- Allowed values:
id(string, optional) — The cart items’s unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6rawProductData(object, optional)example(string, optional)
listPrice(object, optional) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
recipientInfo(object, optional)accountId(string, optional) — The ID of the account that will receive the purchased goodsdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$email(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: Loisgender(string, optional) — Gender Example: femalelastName(string, optional) — Last name Example: Loismessage(string, optional) — The message that the recipient will receivephoneInfo(object, optional) — Phone information structurecountryCode(string, required) — The country code (leading+is optional) Example: 42 Pattern: ^+?[0-9]+$phone(string, required) — The phone number without the country code or hyphens Example: 2025550169 Pattern: ^[0-9]+$carrier(string, optional) — The mobile carrier Example: T-Mobile
shippingAddress(object, optional) — Address structurecountry(string, optional) — Country code specified as a two letter code according to ISO 3166 Alpha-2 Between 2 and 2 characters Example: US Pattern: ^[A-Z]$state(string, optional) — The state or province Example: PAcity(string, optional) — The city or locality Example: Pittsburghstreet(string, optional) — The street name Example: Baker StpostalCode(string, optional) — The address postal code
wallet(object, optional) — The crypto wallet that will receive the fundscustodialType(enum, required) — The type of the wallet Allowed values: custodial, nonCustodial, unknown Example: custodial- Allowed values:
custodial,nonCustodial,unknown
- Allowed values:
blockchain(string, required) — The blockchain on which the transaction was made Example: BTC Pattern: ^[A-Z0-9-]+$address(string, required) — The crypto wallet address that will receive the funds
pnr(string, optional) — The flight ticket’s PNR code Example: X36Q9Cdescription(string, optional) — The upgrade description, required when the upgrade type isother
- LodgingCartItem
reservationId(string, required) — Hotel reservation id Example: X36Q9Cnights(double, required) — The number of nights booked in the reservation Min value: 1 Example: 2checkInDate(string, required) — The check-in date Example: 2022-05-02checkInHour(string, required) — The hour of day in which the check-in is done Example: 18 Pattern: ^([01][0-9]|2[0-3])$hotel(object, required) — The booked hotel detailsname(string, required) — The name of the hotel Example: The Plaza Hotelcountry(string, required) — The two-letter code of the country in which the hotel is located Example: US Pattern: ^[A-Z]$city(string, required) — The city in which the hotel is located Example: New York
wereExtrasPurchased(boolean, required) — Indicates whether extras were purchased in the reservationisRefundable(boolean, required) — Indicates whether the reservation is refundablehighestRoomType(string, required) — The most luxurious room booked in the reservation Example: Presidential SuitenumberOfRooms(double, required) — The number of rooms booked in the reservation Min value: 1 Example: 2numberOfGuests(double, required) — The number of guests in the reservation Min value: 1 Example: 4numberOfKids(double, required) — The number of kids, out of the number of guests in the reservation Min value: 0 Example: 2itemClass(enum, required) — Denotes the cart item class. The item schema is chosen based on this value. Allowed value: lodging Example: lodging- Allowed values:
lodging
- Allowed values:
sellingPrice(object, required) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
id(string, optional) — The cart items’s unique ID Example: 5de33332-546a-4171-8988-2a43d2bfe9c6rawProductData(object, optional)example(string, optional)
listPrice(object, optional) — Common currency amount structurevalueInCurrency(double, required) — The amount in the currency, which is specified in thecurrencyproperty Example: 90currency(string, required) — Currency specified as a three letter code according to ISO 4217 Example: USD
recipientInfo(object, optional)accountId(string, optional) — The ID of the account that will receive the purchased goodsdob(string, optional) — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$email(string, optional, nullable) — Email Example: lois.lane@dailyplanet.comfirstName(string, optional) — First name Example: Loisgender(string, optional) — Gender Example: femalelastName(string, optional) — Last name Example: Loismessage(string, optional) — The message that the recipient will receivephoneInfo(object, optional) — Phone information structurecountryCode(string, required) — The country code (leading+is optional) Example: 42 Pattern: ^+?[0-9]+$phone(string, required) — The phone number without the country code or hyphens Example: 2025550169 Pattern: ^[0-9]+$carrier(string, optional) — The mobile carrier Example: T-Mobile
shippingAddress(object, optional) — Address structurecountry(string, optional) — Country code specified as a two letter code according to ISO 3166 Alpha-2 Between 2 and 2 characters Example: US Pattern: ^[A-Z]$state(string, optional) — The state or province Example: PAcity(string, optional) — The city or locality Example: Pittsburghstreet(string, optional) — The street name Example: Baker StpostalCode(string, optional) — The address postal code
wallet(object, optional) — The crypto wallet that will receive the fundscustodialType(enum, required) — The type of the wallet Allowed values: custodial, nonCustodial, unknown Example: custodial- Allowed values:
custodial,nonCustodial,unknown
- Allowed values:
blockchain(string, required) — The blockchain on which the transaction was made Example: BTC Pattern: ^[A-Z0-9-]+$address(string, required) — The crypto wallet address that will receive the funds
- Pick_nftCartItem.Exclude_keyofnftCartItem.sellingPrice-or-itemClass__
feePercentage(double, optional) — If this purchase is for a seller/submerchant where the marketplace takes a fee, this is the % fee which is taken from the subtotal amount.fixedFee(object, optional)cents(integer, required)
authentication3DS(object or object or object, optional) — 3DS Card Authorization Data On initial payment submission - Device3DSInfo needed: 3DS device information - required if 3DS is enabled After card challenge complete: 3DS challenge transaction id - required after prompted for challenge- Device3DSInfo
colorDepth(double, required)screenHeight(double, required)screenWidth(double, required)timeZone(double, required)versionInfo(list of object, optional)transactionId(string, required)directoryServer(string, required)version(string, required)url(string, optional)
- External3DSInfo
transactionId(string, required)cavv(string, required)eci(string, required)dsTransactionId(string, required)acsTransactionId(string, required)version(string, required)
- ConcludeChallenge
transactionId(string, required)
- Device3DSInfo
threeDsChallengePreference(enum, optional)- Allowed values:
NoPreference,Frictionless,Challenge
- Allowed values:
accountFundingTransaction(object, optional) — Used for Account Funding TransactionsrecipientAftInfo(object, optional)firstName(string, required)lastName(string, required)address1(string, required)city(string, required)postalCode(string, required)countryCode(string, required)state(string, optional)dateOfBirth(string, optional) — Recipients Date Of Birth in YYYMMDD format.phoneNumber(string, optional)documentReference(string, optional)
address(object, optional) — The address field is not needed here unless explicitly given instructions to do so.country(string, required)city(string, required)address1(string, required)state(string, optional)zip(string, optional)
Response
200
Ok
string
Examples
Request
{
"planCode": "string",
"token": "string"
}
Response
"string"
SDK Code
import requests
url = "https://api-sandbox.coinflow.cash/api/subscription/merchantId/subscribers/token"
payload = {
"planCode": "string",
"token": "string"
}
headers = {
"x-coinflow-auth-session-key": "<apiKey>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = 'https://api-sandbox.coinflow.cash/api/subscription/merchantId/subscribers/token';
const options = {
method: 'POST',
headers: {'x-coinflow-auth-session-key': '<apiKey>', 'Content-Type': 'application/json'},
body: '{"planCode":"string","token":"string"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.coinflow.cash/api/subscription/merchantId/subscribers/token"
payload := strings.NewReader("{\n \"planCode\": \"string\",\n \"token\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-coinflow-auth-session-key", "<apiKey>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://api-sandbox.coinflow.cash/api/subscription/merchantId/subscribers/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-coinflow-auth-session-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"planCode\": \"string\",\n \"token\": \"string\"\n}"
response = http.request(request)
puts response.read_body
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse<String> response = Unirest.post("https://api-sandbox.coinflow.cash/api/subscription/merchantId/subscribers/token")
.header("x-coinflow-auth-session-key", "<apiKey>")
.header("Content-Type", "application/json")
.body("{\n \"planCode\": \"string\",\n \"token\": \"string\"\n}")
.asString();
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-sandbox.coinflow.cash/api/subscription/merchantId/subscribers/token', [
'body' => '{
"planCode": "string",
"token": "string"
}',
'headers' => [
'Content-Type' => 'application/json',
'x-coinflow-auth-session-key' => '<apiKey>',
],
]);
echo $response->getBody();
using RestSharp;
var client = new RestClient("https://api-sandbox.coinflow.cash/api/subscription/merchantId/subscribers/token");
var request = new RestRequest(Method.POST);
request.AddHeader("x-coinflow-auth-session-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"planCode\": \"string\",\n \"token\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import Foundation
let headers = [
"x-coinflow-auth-session-key": "<apiKey>",
"Content-Type": "application/json"
]
let parameters = [
"planCode": "string",
"token": "string"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/subscription/merchantId/subscribers/token")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()