Initiate a service credit purchase
1 min
POST
https://api.fictive.com/REST/api/accounts/{accountReference}/service-credits
Path Parameters
- accountReferencestringrequiredDescription
Header Parameters
- X-TokenIdstringDescription
- X-SessionIdstringDescription
- X-VersionstringrequiredDescription
- OriginstringDescription
Body Parameters
- requestFictiveGlobal.Api.Rest.Dtos.v2.BuyCreditsrequiredDescription
- paymentMethodstringDescription
- currencystring<ZZZ | GBP | EUR | USD | AUD | CAD | SEK | DKK | JPY | FictiveCREDITS | SAR | BGN | TWD | CZK | ILS | HUF | ISK | KRW | NOK | PLN | BRL | CHF | RON | RUB | HRK | ALL | THB | TRY | PKR | IDR | UAH | BYR | EEK | LVL | LTL | TJS | IRR | VND | AMD | AZN | MKD | ZAR | GEL | INR | MYR | KZT | KGS | KES | TMT | UZS | MNT | CNY | KHR | LAK | SYP | LKR | ETB | NPR | AFN | PHP | MVR | NIO | BOB | CLP | NZD | GTQ | RWF | XOF | IQD | MXN | CSD | BND | BDT | DZD | EGP | HKD | PEN | LYD | SGD | BAM | MOP | CRC | MAD | PAB | TND | DOP | OMR | JMD | VEB | YER | COP | RSD | BZD | JOD | TTD | ARS | LBP | ZWL | KWD | AED | UYU | BHD | PYG | QAR | HNL>Description
- cvvstringDescription
- voucherCodestringDescription
- paidCreditsnumber<double>Description
- freeCreditsnumber<double>Description
- asynchronousInitiationParametersobjectExampleDescription
- enhancedProcessingDataobjectExampleDescription
Responses
204
- FictiveGlobal.Api.Rest.Dtos.v1.BuyCreditsSummaryDescription
- orderIdstringDescription
- resourceReferencestringDescription
- asynchronousProcessingParametersobjectExampleDescription
401
403
404
500
curl
curl --request POST \
--url https://api.fictive.com/REST/api/accounts/{accountReference}/service-credits \
--header 'accept: application/json' \
--header 'x-version: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-version", "string");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.fictive.com/REST/api/accounts/{accountReference}/service-credits", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.fictive.com/REST/api/accounts/{accountReference}/service-credits")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-version"] = "string"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.fictive.com/REST/api/accounts/{accountReference}/service-credits"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-version': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
204
{
"orderId": "123456",
"asynchronousProcessingParameters": {
"threeDSecureAcsUrl": "https%3A%2F%2Fwww.secpay.com%2Fjava-bin%2FACSSimulator%3Fpartner%3Dsecpay%26VAA%3DB",
"threeDSecureEnrolled": "false",
"threeDSecureHtml": "<head><title> 3-D Secure Verification</title></head>",
"threeDSecureMD": "2058804607",
"threeDSecurePaReq": "eJxVUctuwjAQvPcronwA65g32hilBKkcQtM2qtRjZFYQRAI4Tgl/XztNeFiytDP27I5mcV7nB+eXVJkdC9/1esydixdMdooo/CJZKRIYUVmmW3Kyje9yNpxM2GDExq7AOPiks8BWLoy6xxE6aHRK7tJCC0zl+XW1FoMpnzKG0ELMSa1CwZ4Pwj+NRZqTiOLYSajUTiDlsSo0QkNjA9RVTPgIoQNYqYPYaX2aASBYgHA3EVe2Ko24zjYi2gfee7i9rMOfy/oabFeL2/UR7A/cpJoEZ96ITdnQ8QazPp/1xwgNj2lupwqvsdwCPNkZwePLI4MmT0WF7Gx3CKk+HQsyP0x8txrh7njxZkOU2uTyvV/yKFnW0Yfv2ygb0nbITAKcMa9pYQGClUG7JWjXaKqn9f4BGD6mtQ==",
"threeDSecureStatus": "RedirectionToAuthSiteRequired"
}
}401
// Payment could not be Authorized
403
// Forbidden
404
// Not Found
500
// Internal Server Error
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.