PaymentsAI API (0.0.1)
Download OpenAPI specification:Download
Public API documentation for Payments AI
Activate account
Activate public-api account endpoint
Authorizations:
path Parameters
accountId required | string Account ID |
Request Body schema: application/json
secret | string |
Responses
Request samples
- Payload
{- "secret": "secret"
}
Response samples
- 200
- 400
- 401
- 500
{- "type": "object",
- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "name": "string",
- "userType": "string",
- "apiKey": "string",
- "activatedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
Update account's secret
Update public-api account's secret
Authorizations:
path Parameters
accountId required | string Account ID |
Request Body schema: application/json
secret | string |
newSecret | string |
Responses
Request samples
- Payload
{- "secret": "secret12345678910",
- "newSecret": "secret1234567891011"
}
Response samples
- 400
- 401
- 403
- 500
{- "errorCode": "string",
- "statusCode": 400,
- "message": "Bad request",
- "details": "string"
}
Retrieve api key
Authorizations:
path Parameters
accountId required | string Account ID |
Request Body schema: application/json
secret | string |
Responses
Request samples
- Payload
{- "secret": "secret"
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "accountId": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "revokedAt": "2019-08-24T14:15:22Z",
- "rotatedAt": "2019-08-24T14:15:22Z"
}
}
Create api key
Authorizations:
path Parameters
accountId required | string Account ID |
Request Body schema: application/json
secret | string |
Responses
Request samples
- Payload
{- "secret": "secret"
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "accountId": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "revokedAt": "2019-08-24T14:15:22Z",
- "rotatedAt": "2019-08-24T14:15:22Z"
}
}
Rotate api key
Authorizations:
path Parameters
accountId required | string Account ID |
apiKeyId required | string Api Key ID |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "accountId": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "revokedAt": "2019-08-24T14:15:22Z",
- "rotatedAt": "2019-08-24T14:15:22Z"
}
}
Get url that redirects to Payments AI v1
Authorizations:
query Parameters
accountId required | string Example: accountId=24ad6837-d38b-487e-a4d8-8c7131001c17 |
Request Body schema: application/jsonoptional
organizationId | string |
cfWorkspaceHash | string |
isOwner | boolean or null |
object (WebhookMetadata) | |
object (WebhookMetadata) |
Responses
Request samples
- Payload
{- "organizationId": "string",
- "cfWorkspaceHash": "string",
- "isOwner": true,
- "webhookMeta": {
- "url": "string",
- "eventTypes": [
- "string"
], - "taxCategoryId": "string",
- "accountingCode": "string",
- "recognition": {
- "debitAccountId": "string",
- "creditAccountId": "string"
}, - "createdAt": "string",
- "updatedAt": "string"
}, - "sandboxWebhookMeta": {
- "url": "string",
- "eventTypes": [
- "string"
], - "taxCategoryId": "string",
- "accountingCode": "string",
- "recognition": {
- "debitAccountId": "string",
- "creditAccountId": "string"
}, - "createdAt": "string",
- "updatedAt": "string"
}
}
Response samples
- 200
- 400
- 401
- 500
{- "data": {
- "organizationId": "59092f9a-97ce-46ad-97b1-78a4ad808184"
}, - "type": "object"
}
Create url that redirects to Payments AI v2
Authorizations:
path Parameters
organizationId required | string Organization ID |
Request Body schema: application/jsonoptional
isOwner | boolean or null |
Responses
Request samples
- Payload
{- "isOwner": true
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "data": {
- "organizationId": "59092f9a-97ce-46ad-97b1-78a4ad808184"
}, - "type": "object"
}
Create url that redirects to Payments AI v2
Authorizations:
path Parameters
organizationId required | string Organization ID |
Request Body schema: application/jsonoptional
isOwner | boolean or null |
Responses
Request samples
- Payload
{- "isOwner": true
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "data": {
- "organizationId": "59092f9a-97ce-46ad-97b1-78a4ad808184"
}, - "type": "object"
}
Get list of organization customers
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
query Parameters
limit | integer [ 0 .. 100 ] Default: 20 Example: limit=20 pagination limit |
offset | number <integer> >= 0 Example: offset=1 |
search | |
showTestData | boolean |
sortBy | string Enum: "createdAt" "email" "name" "country" "lifetimeRevenue" "lastPaymentTime" |
sortDirection | string Enum: "asc" "desc" |
revenueMin | string <date-time> |
revenueMax | string <date-time> |
createdFrom | string <date-time> |
createdTo | string <date-time> |
countries | Array of strings[ items = 2 characters ] Example: countries=US Array of ISO country codes |
primaryPaymentInstrumentMethods | Array of strings (PaymentMethodEnum) Items Enum: "payment-card" "ach" "cash" "check" "paypal" "AdvCash" "Airpay" "Alfa-click" "Alipay" "Apple Pay" "AstroPay Card" "AstroPay-GO" "bank-transfer" "bank-transfer-2" "bank-transfer-3" "bank-transfer-4" "bank-transfer-5" "bank-transfer-6" "bank-transfer-7" "bank-transfer-8" "bank-transfer-9" "Beeline" "Belfius-direct-net" "bitcoin" "Boleto" "Boleto-2" "Boleto-3" "cash-deposit" "CASHlib" "CashToCode" "CCAvenue" "China UnionPay" "CODVoucher" "Conekta-oxxo" "Conekta-spei" "cryptocurrency" "Cupon-de-pagos" "CyberSource" "domestic-cards" "echeck" "ecoPayz" "ecoVoucher" "EPS" "ePay.bg" "Ethereum" "e-wallet" "ezyEFT" "eZeeWallet" "Flexepin" "Giropay" "GooglePay" "Gpaysafe" "iDebit" "iDEAL" "ING-homepay" "INOVAPAY-pin" "INOVAPAY-wallet" "InstaDebit" "instant-bank-transfer" "Interac-online" "Interac-eTransfer" "Interac-express-connect" "Interac" "invoice" "iWallet" "Jeton" "jpay" "Khelocard" "Klarna" "Litecoin" "loonie" "LPG-online" "LPG-payment-card" "Megafon" "MiFinity-eWallet" "miscellaneous" "Bancontact" "MTS" "MuchBetter" "MyFatoorah" "Neosurf" "Netbanking" "Neteller" "Nordea-Solo" "OchaPay" "online-bank-transfer" "Onlineueberweisen" "oriental-wallet" "OXXO" "PagoEffectivo" "Pagsmile-lottery" "Pagsmile-deposit-express" "PayCash" "Payeer" "PaymentAsia-crypto" "Paysafecard" "PayTabs" "Pay4Fun" "Paymero" "Paymero-QR" "PayULatam" "Perfect-money" "Piastrix" "PIX" "PinPay" "phone" "PhonePe" "POLi" "PostFinance-card" "PostFinance-e-finance" "Przelewy24" "QIWI" "QQPay" "Resurs" "SEPA" "Siirto" "Skrill" "Skrill Rapid Transfer" "SMSVoucher" "Sofort" "SparkPay" "swift-dbt" "Tele2" "Terminaly-RF" "Tether" "ToditoCash-card" "Trustly" "TWINT" "UniCrypt" "UPayCard" "UPI" "VCreditos" "VenusPoint" "voucher" "voucher-2" "voucher-3" "voucher-4" "Webmoney" "Webpay" "Webpay-2" "Webpay Card" "WeChat Pay" "XPay-P2P" "XPay-QR" "Yandex-money" "Zotapay" "Zimpler" |
lastPaymentFrom | string <date-time> |
lastPaymentTo | string <date-time> |
isVip | boolean |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "list",
- "totalCount": 100,
- "paginationMeta": {
- "limit": 10,
- "offset": 10
}, - "data": [
- {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}
]
}
Create a customer
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Request Body schema: application/jsonrequired
firstName | string <= 45 characters |
lastName | string <= 45 characters |
organization | string or null <= 255 characters |
string <email> | |
phoneNumber | string <= 10 characters |
isEnhancedDueDiligenceRequired | boolean Default: false |
object |
Responses
Request samples
- Payload
{- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}
Response samples
- 400
- 401
- 500
{- "errorCode": "string",
- "statusCode": 400,
- "message": "Bad request",
- "details": "string"
}
Get customer details
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
customerId required | string Example: e7aa6809-6d8a-4e34-9bb0-d6897787fa9b |
query Parameters
showTestData | boolean |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "type": "object",
- "data": {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}
}
Update customer details
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
customerId required | string Example: e7aa6809-6d8a-4e34-9bb0-d6897787fa9b |
Request Body schema: application/jsonoptional
name | string <= 91 characters Deprecated |
firstName | string <= 45 characters |
lastName | string <= 45 characters |
string <email> | |
phoneNumber | string <= 10 characters |
organization | string or null <= 255 characters |
tags | Array of strings (CustomerTag) Items Enum: "discounted" "vip" |
object | |
object |
Responses
Request samples
- Payload
{- "name": "string",
- "firstName": "string",
- "lastName": "string",
- "phoneNumber": "string",
- "organization": "string",
- "tags": [
- "discounted"
], - "address": {
- "country": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "region": "string",
- "zip": "string"
}, - "primaryPaymentInstrument": {
- "method": "payment-card",
- "id": "92dcc8b0-0872-4858-9f01-d6ecc724b4a9"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "type": "object",
- "data": {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}
}
Upsert a customer
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
customerId required | string Example: e7aa6809-6d8a-4e34-9bb0-d6897787fa9b |
Request Body schema: application/jsonrequired
firstName | string <= 45 characters |
lastName | string <= 45 characters |
string <email> | |
phoneNumber | string <= 10 characters |
organization | string or null <= 255 characters |
isEnhancedDueDiligenceRequired | boolean Default: false |
object |
Responses
Request samples
- Payload
{- "firstName": "string",
- "lastName": "string",
- "phoneNumber": "string",
- "organization": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string",
- "dateOfBirth": "2019-08-24T14:15:22Z",
- "jobTitle": "string"
}
}
Response samples
- 201
- 400
- 401
- 500
{- "type": "object",
- "data": {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}
}
create organization
Authorizations:
Request Body schema: application/jsonrequired
organizationName required | string <= 60 characters |
website required | string <= 65 characters |
country required | string (CountryCodeEnum) Enum: "AF" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "KH" "CM" "CA" "CV" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IL" "IT" "JM" "JP" "JO" "KZ" "KE" "KI" "KP" "KR" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "MK" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "SH" "KN" "LC" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "SC" "SL" "SG" "SK" "SI" "SB" "SO" "ZA" "GS" "ES" "LK" "SD" "SR" "SJ" "SZ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "US" "UM" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW" "AX" "BQ" "CW" "GG" "IM" "JE" "ME" "BL" "MF" "RS" "SX" "SS" "XK" |
reportCurrency required | string (CurrencyCodesEnum) Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL" |
cfWorkspaceHash required | string |
required | object (WebhookRegistrationMetadata) |
required | object (WebhookRegistrationMetadata) |
Responses
Request samples
- Payload
{- "organizationName": "string",
- "website": "string",
- "country": "AF",
- "reportCurrency": "AED",
- "cfWorkspaceHash": "string",
- "webhookMeta": {
- "url": "string",
- "eventTypes": [
- "string"
]
}, - "sandboxWebhookMeta": {
- "url": "string",
- "eventTypes": [
- "string"
]
}
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "accountId": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "isBillingConnected": false,
- "canDownloadGatewayReports": false,
- "isRegistered": false,
- "registeredAt": "2021-06-07T10:54:17.387Z",
- "business": {
- "name": "Masterborn",
- "dba": "MasterBorn sp. z o.o.",
- "type": "PRIVATE_ORGANIZATION",
- "public": false,
- "address": "Krupnicza",
- "city": "Wrocław",
- "state": "Lower Silesian Voivodeship",
- "zip": "50-075",
- "phone": {
- "countryCode": "48",
- "number": "123456789"
},
}, - "member": {
- "firstName": "John",
- "lastName": "Doe",
- "dateOfBirth": "1990-06-07",
- "phone": {
- "countryCode": "48",
- "number": "123456789"
}, - "address": "Krupnicza",
- "city": "Wrocław",
- "state": "Lower Silesian Voivodeship",
- "zip": "50-075"
}, - "account": {
- "bankState": "CA",
- "method": "CORPORATE_CHECKING",
- "reportCurrency": "string",
- "minimalPayoutAmount": 100000,
- "refundReserve": 100000,
- "numberLastFour": 1234,
- "payoutSchedule": "daily"
}, - "createdAt": "2021-06-07T10:54:17.387Z",
- "updatedAt": "2021-06-07T10:54:17.387Z",
- "deletedAt": "2021-06-07T10:54:17.387Z",
- "isTaxJarConnected": true,
- "taxJarApiKeyLastFour": "1234",
- "defaultGatewayRegion": "string",
- "defaultGatewaySlug": "None",
- "websiteId": "string",
- "hostedOnboardingFormStatus": "not-started"
}
}
get organization details
Authorizations:
path Parameters
organizationId required | string Organization ID |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "accountId": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "isBillingConnected": false,
- "canDownloadGatewayReports": false,
- "isRegistered": false,
- "registeredAt": "2021-06-07T10:54:17.387Z",
- "business": {
- "name": "Masterborn",
- "dba": "MasterBorn sp. z o.o.",
- "type": "PRIVATE_ORGANIZATION",
- "public": false,
- "address": "Krupnicza",
- "city": "Wrocław",
- "state": "Lower Silesian Voivodeship",
- "zip": "50-075",
- "phone": {
- "countryCode": "48",
- "number": "123456789"
},
}, - "member": {
- "firstName": "John",
- "lastName": "Doe",
- "dateOfBirth": "1990-06-07",
- "phone": {
- "countryCode": "48",
- "number": "123456789"
}, - "address": "Krupnicza",
- "city": "Wrocław",
- "state": "Lower Silesian Voivodeship",
- "zip": "50-075"
}, - "account": {
- "bankState": "CA",
- "method": "CORPORATE_CHECKING",
- "reportCurrency": "string",
- "minimalPayoutAmount": 100000,
- "refundReserve": 100000,
- "numberLastFour": 1234,
- "payoutSchedule": "daily"
}, - "createdAt": "2021-06-07T10:54:17.387Z",
- "updatedAt": "2021-06-07T10:54:17.387Z",
- "deletedAt": "2021-06-07T10:54:17.387Z",
- "isTaxJarConnected": true,
- "taxJarApiKeyLastFour": "1234",
- "defaultGatewayRegion": "string",
- "defaultGatewaySlug": "None",
- "websiteId": "string",
- "hostedOnboardingFormStatus": "not-started"
}
}
Get collection of payment instruments
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
customerId required | string Example: f70c64b0-a87d-4e66-9c19-8176c3284182 |
query Parameters
search | string Example: search=John |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "type": "payment-card",
- "billingAddress": {
- "firstName": "John",
- "lastName": "Mock",
- "country": "DE",
- "address1": "Blue st 1",
- "address2": "Blue st 2",
- "city": "Berlin",
- "zip": "99-123"
}, - "bankAccount": {
- "bankName": "pko",
- "lastFourDigits": "1234"
}, - "creditCard": {
- "creditCardLastFourDigits": "1234",
- "brand": "Visa",
- "expireYear": 2034,
- "expireMonth": 12,
- "expireDate": "12/34",
- "stickyGatewaySlug": "default"
}
}
Create payment instrument for customer using token
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
customerId required | string Example: f70c64b0-a87d-4e66-9c19-8176c3284182 |
Request Body schema: application/jsonrequired
token required | string |
Responses
Request samples
- Payload
{- "token": "string"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "type": "payment-card",
- "billingAddress": {
- "firstName": "John",
- "lastName": "Mock",
- "country": "DE",
- "address1": "Blue st 1",
- "address2": "Blue st 2",
- "city": "Berlin",
- "zip": "99-123"
}, - "bankAccount": {
- "bankName": "pko",
- "lastFourDigits": "1234"
}, - "creditCard": {
- "creditCardLastFourDigits": "1234",
- "brand": "Visa",
- "expireYear": 2034,
- "expireMonth": 12,
- "expireDate": "12/34",
- "stickyGatewaySlug": "default"
}
}
Patch payment instrument
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
paymentInstrumentId required | string Example: 92dcc8b0-0872-4858-9f01-d6ecc724b4a9 |
Request Body schema: application/jsonoptional
object | |
object | |
stickyGatewaySlug | string (SupportedGatewaySlugEnum) Enum: "default" "paypal" "klarna" "coinbase" "nmi" "stripe" |
method | string (PaymentMethodEnum) Enum: "payment-card" "ach" "cash" "check" "paypal" "AdvCash" "Airpay" "Alfa-click" "Alipay" "Apple Pay" "AstroPay Card" "AstroPay-GO" "bank-transfer" "bank-transfer-2" "bank-transfer-3" "bank-transfer-4" "bank-transfer-5" "bank-transfer-6" "bank-transfer-7" "bank-transfer-8" "bank-transfer-9" "Beeline" "Belfius-direct-net" "bitcoin" "Boleto" "Boleto-2" "Boleto-3" "cash-deposit" "CASHlib" "CashToCode" "CCAvenue" "China UnionPay" "CODVoucher" "Conekta-oxxo" "Conekta-spei" "cryptocurrency" "Cupon-de-pagos" "CyberSource" "domestic-cards" "echeck" "ecoPayz" "ecoVoucher" "EPS" "ePay.bg" "Ethereum" "e-wallet" "ezyEFT" "eZeeWallet" "Flexepin" "Giropay" "GooglePay" "Gpaysafe" "iDebit" "iDEAL" "ING-homepay" "INOVAPAY-pin" "INOVAPAY-wallet" "InstaDebit" "instant-bank-transfer" "Interac-online" "Interac-eTransfer" "Interac-express-connect" "Interac" "invoice" "iWallet" "Jeton" "jpay" "Khelocard" "Klarna" "Litecoin" "loonie" "LPG-online" "LPG-payment-card" "Megafon" "MiFinity-eWallet" "miscellaneous" "Bancontact" "MTS" "MuchBetter" "MyFatoorah" "Neosurf" "Netbanking" "Neteller" "Nordea-Solo" "OchaPay" "online-bank-transfer" "Onlineueberweisen" "oriental-wallet" "OXXO" "PagoEffectivo" "Pagsmile-lottery" "Pagsmile-deposit-express" "PayCash" "Payeer" "PaymentAsia-crypto" "Paysafecard" "PayTabs" "Pay4Fun" "Paymero" "Paymero-QR" "PayULatam" "Perfect-money" "Piastrix" "PIX" "PinPay" "phone" "PhonePe" "POLi" "PostFinance-card" "PostFinance-e-finance" "Przelewy24" "QIWI" "QQPay" "Resurs" "SEPA" "Siirto" "Skrill" "Skrill Rapid Transfer" "SMSVoucher" "Sofort" "SparkPay" "swift-dbt" "Tele2" "Terminaly-RF" "Tether" "ToditoCash-card" "Trustly" "TWINT" "UniCrypt" "UPayCard" "UPI" "VCreditos" "VenusPoint" "voucher" "voucher-2" "voucher-3" "voucher-4" "Webmoney" "Webpay" "Webpay-2" "Webpay Card" "WeChat Pay" "XPay-P2P" "XPay-QR" "Yandex-money" "Zotapay" "Zimpler" |
useAsBackup | boolean |
Responses
Request samples
- Payload
{- "billingAddress": {
- "country": "DE",
- "firstName": "string",
- "organization": "string",
- "lastName": "string",
- "address": "string",
- "address2": "string",
- "city": "string",
- "region": "string",
- "zip": "string",
- "phoneNumber": "5127101111"
}, - "creditCard": {
- "expireMonth": 12,
- "expireYear": 2051
}, - "stickyGatewaySlug": "default",
- "method": "payment-card",
- "useAsBackup": true
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "type": "payment-card",
- "billingAddress": {
- "firstName": "John",
- "lastName": "Mock",
- "country": "DE",
- "address1": "Blue st 1",
- "address2": "Blue st 2",
- "city": "Berlin",
- "zip": "99-123"
}, - "bankAccount": {
- "bankName": "pko",
- "lastFourDigits": "1234"
}, - "creditCard": {
- "creditCardLastFourDigits": "1234",
- "brand": "Visa",
- "expireYear": 2034,
- "expireMonth": 12,
- "expireDate": "12/34",
- "stickyGatewaySlug": "default"
}
}
Delete payment instrument
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
paymentInstrumentId required | string Example: 92dcc8b0-0872-4858-9f01-d6ecc724b4a9 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "type": "payment-card",
- "billingAddress": {
- "firstName": "John",
- "lastName": "Mock",
- "country": "DE",
- "address1": "Blue st 1",
- "address2": "Blue st 2",
- "city": "Berlin",
- "zip": "99-123"
}, - "bankAccount": {
- "bankName": "pko",
- "lastFourDigits": "1234"
}, - "creditCard": {
- "creditCardLastFourDigits": "1234",
- "brand": "Visa",
- "expireYear": 2034,
- "expireMonth": 12,
- "expireDate": "12/34",
- "stickyGatewaySlug": "default"
}
}
Get plans list
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
query Parameters
limit | integer [ 0 .. 100 ] Default: 20 Example: limit=20 pagination limit |
offset | number <integer> >= 0 Example: offset=1 |
sortDirection | string Enum: "asc" "desc" Example: sortDirection=asc |
sortBy | string Enum: "createdAt" "updatedAt" |
search | string Example: search=John |
updatedFrom | string <date-time> |
updatedTo | string <date-time> |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "type": "list",
- "totalCount": 100,
- "paginationMeta": {
- "limit": 10,
- "offset": 10
}, - "data": [
- {
- "name": "string",
- "currency": "AED",
- "productId": "string",
- "pricing": {
- "price": 0,
- "formula": "string"
}, - "description": "string",
- "richDescription": "string",
- "productOptions": { },
- "currencySign": "string",
- "setup": {
- "approvalLink": "string",
- "price": 0
}, - "isActive": true,
- "revision": 0,
- "isTrialOnly": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
Create a plan
Authorizations:
path Parameters
organizationId required | string Organization ID |
Request Body schema: application/jsonrequired
name | string |
currency | string (CurrencyCodesEnum) Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL" |
productId | string |
object (Pricing) | |
description | string |
richDescription | string |
productOptions | object (ProductOptions) |
currencySign | string |
object (Setup) | |
isActive | boolean |
revision | number |
isTrialOnly | boolean |
createdAt | string <date-time> |
updatedAt | string <date-time> |
Responses
Request samples
- Payload
{- "name": "string",
- "currency": "AED",
- "productId": "string",
- "pricing": {
- "price": 0,
- "formula": "string"
}, - "description": "string",
- "richDescription": "string",
- "productOptions": { },
- "currencySign": "string",
- "setup": {
- "approvalLink": "string",
- "price": 0
}, - "isActive": true,
- "revision": 0,
- "isTrialOnly": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Response samples
- 400
- 401
- 500
{- "errorCode": "string",
- "statusCode": 400,
- "message": "Bad request",
- "details": "string"
}
Get organization plan by ID
Authorizations:
path Parameters
organizationId required | string Organization ID |
planId required | string plan ID |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "name": "string",
- "currency": "AED",
- "productId": "string",
- "pricing": {
- "price": 0,
- "formula": "string"
}, - "description": "string",
- "richDescription": "string",
- "productOptions": { },
- "currencySign": "string",
- "setup": {
- "approvalLink": "string",
- "price": 0
}, - "isActive": true,
- "revision": 0,
- "isTrialOnly": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Upsert a plan
Authorizations:
path Parameters
organizationId required | string Organization ID |
planId required | string plan ID |
Request Body schema: application/jsonrequired
name | string |
currency | string (CurrencyCodesEnum) Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL" |
productId | string |
object (Pricing) | |
description | string |
richDescription | string |
productOptions | object (ProductOptions) |
currencySign | string |
object (Setup) | |
isActive | boolean |
revision | number |
isTrialOnly | boolean |
createdAt | string <date-time> |
updatedAt | string <date-time> |
Responses
Request samples
- Payload
{- "name": "string",
- "currency": "AED",
- "productId": "string",
- "pricing": {
- "price": 0,
- "formula": "string"
}, - "description": "string",
- "richDescription": "string",
- "productOptions": { },
- "currencySign": "string",
- "setup": {
- "approvalLink": "string",
- "price": 0
}, - "isActive": true,
- "revision": 0,
- "isTrialOnly": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Response samples
- 400
- 401
- 404
- 500
{- "errorCode": "string",
- "statusCode": 400,
- "message": "Bad request",
- "details": "string"
}
Get products list
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
query Parameters
limit | integer [ 0 .. 100 ] Default: 20 Example: limit=20 pagination limit |
offset | number <integer> >= 0 Example: offset=1 |
sortDirection | string Enum: "asc" "desc" Example: sortDirection=asc |
sortBy | string Enum: "createdAt" "updatedAt" |
search | string Example: search=John |
updatedFrom | string <date-time> |
updatedTo | string <date-time> |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "type": "list",
- "totalCount": 100,
- "paginationMeta": {
- "limit": 10,
- "offset": 10
}, - "data": [
- {
- "id": "string",
- "name": "string",
- "unitLabel": "string",
- "description": "string",
- "requiresShipping": true,
- "options": [
- "string"
], - "taxCategoryId": "string",
- "accountingCode": "string",
- "recognition": {
- "debitAccountId": "string",
- "creditAccountId": "string"
}, - "createdAt": "string",
- "updatedAt": "string"
}
]
}
Create product
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Request Body schema: application/jsonrequired
required | object (Product) | ||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "type": {
- "id": "string",
- "name": "string",
- "unitLabel": "string",
- "description": "string",
- "requiresShipping": true,
- "options": [
- "string"
], - "taxCategoryId": "string",
- "accountingCode": "string",
- "recognition": {
- "debitAccountId": "string",
- "creditAccountId": "string"
}, - "createdAt": "string",
- "updatedAt": "string"
}
}
Response samples
- 201
- 400
- 401
- 500
{- "id": "string",
- "name": "string",
- "unitLabel": "string",
- "description": "string",
- "requiresShipping": true,
- "options": [
- "string"
], - "taxCategoryId": "string",
- "accountingCode": "string",
- "recognition": {
- "debitAccountId": "string",
- "creditAccountId": "string"
}, - "createdAt": "string",
- "updatedAt": "string"
}
Get organization product by ID
Authorizations:
path Parameters
organizationId required | string Organization ID |
productId required | string product ID |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "id": "string",
- "name": "string",
- "unitLabel": "string",
- "description": "string",
- "requiresShipping": true,
- "options": [
- "string"
], - "taxCategoryId": "string",
- "accountingCode": "string",
- "recognition": {
- "debitAccountId": "string",
- "creditAccountId": "string"
}, - "createdAt": "string",
- "updatedAt": "string"
}
Upsert a product
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
productId required | string product ID |
Request Body schema: application/jsonrequired
required | object (Product) | ||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "type": {
- "id": "string",
- "name": "string",
- "unitLabel": "string",
- "description": "string",
- "requiresShipping": true,
- "options": [
- "string"
], - "taxCategoryId": "string",
- "accountingCode": "string",
- "recognition": {
- "debitAccountId": "string",
- "creditAccountId": "string"
}, - "createdAt": "string",
- "updatedAt": "string"
}
}
Response samples
- 201
- 400
- 401
- 500
{- "id": "string",
- "name": "string",
- "unitLabel": "string",
- "description": "string",
- "requiresShipping": true,
- "options": [
- "string"
], - "taxCategoryId": "string",
- "accountingCode": "string",
- "recognition": {
- "debitAccountId": "string",
- "creditAccountId": "string"
}, - "createdAt": "string",
- "updatedAt": "string"
}
Delete a product
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
productId required | string product ID |
Responses
Response samples
- 400
- 401
- 409
- 500
{- "errorCode": "string",
- "statusCode": 400,
- "message": "Bad request",
- "details": "string"
}
Get list of available payment methods
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "type": "object",
- "data": {
- "paymentMethods": [
- "payment-card"
], - "creditCardBrand": [
- "Visa"
]
}
}
Get transactions list
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
query Parameters
limit | integer [ 0 .. 100 ] Default: 20 Example: limit=20 pagination limit |
offset | number <integer> >= 0 Example: offset=1 |
sortDirection | string Enum: "asc" "desc" Example: sortDirection=asc |
sortBy | string Enum: "createdAt" "updatedAt" "title" "customerName" "date" "paymentType" "gatewayName" |
combinedStatuses | Array of strings (CombinedStatus) Items Enum: "abandoned" "canceled" "declined" "completed" "refunded" "voided" "partially-refunded" "waiting" "timeout" "not-sent" "disputed" "sending" "offsite" |
paymentMethods | Array of strings (PaymentMethodEnum) Items Enum: "payment-card" "ach" "cash" "check" "paypal" "AdvCash" "Airpay" "Alfa-click" "Alipay" "Apple Pay" "AstroPay Card" "AstroPay-GO" "bank-transfer" "bank-transfer-2" "bank-transfer-3" "bank-transfer-4" "bank-transfer-5" "bank-transfer-6" "bank-transfer-7" "bank-transfer-8" "bank-transfer-9" "Beeline" "Belfius-direct-net" "bitcoin" "Boleto" "Boleto-2" "Boleto-3" "cash-deposit" "CASHlib" "CashToCode" "CCAvenue" "China UnionPay" "CODVoucher" "Conekta-oxxo" "Conekta-spei" "cryptocurrency" "Cupon-de-pagos" "CyberSource" "domestic-cards" "echeck" "ecoPayz" "ecoVoucher" "EPS" "ePay.bg" "Ethereum" "e-wallet" "ezyEFT" "eZeeWallet" "Flexepin" "Giropay" "GooglePay" "Gpaysafe" "iDebit" "iDEAL" "ING-homepay" "INOVAPAY-pin" "INOVAPAY-wallet" "InstaDebit" "instant-bank-transfer" "Interac-online" "Interac-eTransfer" "Interac-express-connect" "Interac" "invoice" "iWallet" "Jeton" "jpay" "Khelocard" "Klarna" "Litecoin" "loonie" "LPG-online" "LPG-payment-card" "Megafon" "MiFinity-eWallet" "miscellaneous" "Bancontact" "MTS" "MuchBetter" "MyFatoorah" "Neosurf" "Netbanking" "Neteller" "Nordea-Solo" "OchaPay" "online-bank-transfer" "Onlineueberweisen" "oriental-wallet" "OXXO" "PagoEffectivo" "Pagsmile-lottery" "Pagsmile-deposit-express" "PayCash" "Payeer" "PaymentAsia-crypto" "Paysafecard" "PayTabs" "Pay4Fun" "Paymero" "Paymero-QR" "PayULatam" "Perfect-money" "Piastrix" "PIX" "PinPay" "phone" "PhonePe" "POLi" "PostFinance-card" "PostFinance-e-finance" "Przelewy24" "QIWI" "QQPay" "Resurs" "SEPA" "Siirto" "Skrill" "Skrill Rapid Transfer" "SMSVoucher" "Sofort" "SparkPay" "swift-dbt" "Tele2" "Terminaly-RF" "Tether" "ToditoCash-card" "Trustly" "TWINT" "UniCrypt" "UPayCard" "UPI" "VCreditos" "VenusPoint" "voucher" "voucher-2" "voucher-3" "voucher-4" "Webmoney" "Webpay" "Webpay-2" "Webpay Card" "WeChat Pay" "XPay-P2P" "XPay-QR" "Yandex-money" "Zotapay" "Zimpler" |
search | string Example: search=John |
showTestData | boolean |
subscriptionId | string Example: subscriptionId=bafe3272-c3e1-43be-9ea1-8d48ca204254 |
customerId | string Example: customerId=bafe3272-c3e1-43be-9ea1-8d48ca204254 |
amountMin | number >= 0 Example: amountMin=1.99 |
amountMax | number >= 0 Example: amountMax=1.99 |
dateFrom | string <date-time> |
dateTo | string <date-time> |
paymentType | string (PaymentTypeEnum) Enum: "one-time-payment" "subscription-payment" Example: paymentType=one-time-payment |
currencies | Array of strings[ items = 3 characters ] Example: currencies=USD |
gateways | Array of strings (SupportedGatewaySlugEnum) Items Enum: "default" "paypal" "klarna" "coinbase" "nmi" "stripe" |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "list",
- "totalCount": 100,
- "paginationMeta": {
- "limit": 10,
- "offset": 10
}, - "data": [
- {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "amount": 92.23,
- "refundAmount": 92.23,
- "refundableAmount": 92.23,
- "currency": "USD",
- "status": "completed",
- "result": "abandoned",
- "combinedStatus": "abandoned",
- "date": "2019-08-24T14:15:22Z",
- "type": "3ds-authentication",
- "paymentType": "one-time-payment",
- "paymentInstrument": {
- "id": "381ea960-bc9a-4800-8c02-7815f91bfd40",
- "method": "payment-card",
- "creditCardLastFourDigits": "303472df-f169-4fb3-8600-1a916ebb7e9b",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "name": "John Mock",
- "firstName": "John",
- "lastName": "Mock",
- "email": "1234",
- "brand": "Visa",
- "expireDate": "21/12"
}, - "invoices": [
- {
- "date": "2021-06-07T10:54:17.387Z",
- "amount": 92.23,
- "currency": "USD"
}
], - "gatewayName": "Bluesnap",
- "subscriptionId": "98e1f1ba-92cb-45e3-bd7d-7f116decc09f",
- "redirectUrl": "string",
- "permissionsBundle": {
- "isRefundable": false
}
}
]
}
Create transaction
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Request Body schema: application/jsonrequired
amount | number |
customerId | string <= 50 characters |
currency | string (CurrencyCodesEnum) Enum: "AED" "AFN" "ALL" "AMD" "ANG" "AOA" "ARS" "AUD" "AWG" "AZN" "BAM" "BBD" "BDT" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BRL" "BSD" "BTN" "BWP" "BYN" "BZD" "CAD" "CDF" "CHF" "CLP" "CNY" "COP" "CRC" "CUC" "CUP" "CVE" "CZK" "DJF" "DKK" "DOP" "DZD" "EGP" "ERN" "ETB" "EUR" "FJD" "FKP" "GBP" "GEL" "GHS" "GIP" "GMD" "GNF" "GTQ" "GYD" "HKD" "HNL" "HRK" "HTG" "HUF" "IDR" "ILS" "INR" "IQD" "IRR" "ISK" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAK" "LBP" "LKR" "LRD" "LSL" "LYD" "MAD" "MDL" "MGA" "MKD" "MMK" "MNT" "MOP" "MRU" "MUR" "MVR" "MWK" "MXN" "MYR" "MZN" "NAD" "NGN" "NIO" "NOK" "NPR" "NZD" "OMR" "PAB" "PEN" "PGK" "PHP" "PKR" "PLN" "PYG" "QAR" "RON" "RSD" "RUB" "RWF" "SAR" "SBD" "SCR" "SDG" "SEK" "SGD" "SHP" "SLE" "SLL" "SOS" "SRD" "SSP" "STN" "SVC" "SYP" "SZL" "THB" "TJS" "TMT" "TND" "TOP" "TRY" "TTD" "TWD" "TZS" "UAH" "UGX" "USD" "UYU" "UZS" "VES" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "YER" "ZAR" "ZMW" "ZWL" |
object or object | |
redirectUrl | string <url> <= 1024 characters |
type | string Enum: "sale" "authorize" "setup" |
Responses
Request samples
- Payload
{- "amount": 0,
- "customerId": "string",
- "currency": "AED",
- "paymentInstruction": {
- "token": "string"
}, - "redirectUrl": "string",
- "type": "sale"
}
Response samples
- 201
- 400
- 401
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "amount": 92.23,
- "refundAmount": 92.23,
- "refundableAmount": 92.23,
- "currency": "USD",
- "status": "completed",
- "result": "abandoned",
- "combinedStatus": "abandoned",
- "date": "2019-08-24T14:15:22Z",
- "type": "3ds-authentication",
- "paymentType": "one-time-payment",
- "paymentInstrument": {
- "id": "381ea960-bc9a-4800-8c02-7815f91bfd40",
- "method": "payment-card",
- "creditCardLastFourDigits": "303472df-f169-4fb3-8600-1a916ebb7e9b",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "name": "John Mock",
- "firstName": "John",
- "lastName": "Mock",
- "email": "1234",
- "brand": "Visa",
- "expireDate": "21/12"
}, - "invoices": [
- {
- "date": "2021-06-07T10:54:17.387Z",
- "amount": 92.23,
- "currency": "USD"
}
], - "gatewayName": "Bluesnap",
- "subscriptionId": "98e1f1ba-92cb-45e3-bd7d-7f116decc09f",
- "redirectUrl": "string",
- "permissionsBundle": {
- "isRefundable": false
}
}
}
Get one transaction by id
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
transaction ID required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 transaction ID |
query Parameters
showTestData | boolean |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "object",
- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "amount": 92.23,
- "refundAmount": 92.23,
- "refundableAmount": 92.23,
- "currency": "USD",
- "status": "completed",
- "result": "abandoned",
- "combinedStatus": "abandoned",
- "date": "2019-08-24T14:15:22Z",
- "type": "3ds-authentication",
- "paymentType": "one-time-payment",
- "paymentInstrument": {
- "id": "381ea960-bc9a-4800-8c02-7815f91bfd40",
- "method": "payment-card",
- "creditCardLastFourDigits": "303472df-f169-4fb3-8600-1a916ebb7e9b",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "name": "John Mock",
- "firstName": "John",
- "lastName": "Mock",
- "email": "1234",
- "brand": "Visa",
- "expireDate": "21/12"
}, - "invoices": [
- {
- "date": "2021-06-07T10:54:17.387Z",
- "amount": 92.23,
- "currency": "USD"
}
], - "gatewayName": "Bluesnap",
- "subscriptionId": "98e1f1ba-92cb-45e3-bd7d-7f116decc09f",
- "redirectUrl": "string",
- "permissionsBundle": {
- "isRefundable": false
}
}
}
Get transaction logs
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
transaction ID required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 transaction ID |
query Parameters
showTestData | boolean |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "array",
- "totalCount": 100,
- "data": [
- {
- "status": "amount-adjusted",
- "occurredAt": "2021-07-14T10:53:27+00:00",
- "message": "Transaction approved",
- "transactionId": "2b2500f1-cc35-45f6-a2b1-06ad9f040706",
- "triggeredBy": "app",
- "data": {
- "amount": 99,
- "currency": "USD"
}
}
]
}
Refund transaction
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
transactionId required | string Transaction ID |
Request Body schema: application/jsonoptional
amount | number <float> |
Responses
Request samples
- Payload
{- "amount": 0.1
}
Response samples
- 200
- 400
- 401
- 403
- 409
- 422
- 500
{- "type": "array",
- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "amount": 92.23,
- "refundAmount": 92.23,
- "refundableAmount": 92.23,
- "currency": "USD",
- "status": "completed",
- "result": "abandoned",
- "combinedStatus": "abandoned",
- "date": "2019-08-24T14:15:22Z",
- "type": "3ds-authentication",
- "paymentType": "one-time-payment",
- "paymentInstrument": {
- "id": "381ea960-bc9a-4800-8c02-7815f91bfd40",
- "method": "payment-card",
- "creditCardLastFourDigits": "303472df-f169-4fb3-8600-1a916ebb7e9b",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "name": "John Mock",
- "firstName": "John",
- "lastName": "Mock",
- "email": "1234",
- "brand": "Visa",
- "expireDate": "21/12"
}, - "invoices": [
- {
- "date": "2021-06-07T10:54:17.387Z",
- "amount": 92.23,
- "currency": "USD"
}
], - "gatewayName": "Bluesnap",
- "subscriptionId": "98e1f1ba-92cb-45e3-bd7d-7f116decc09f",
- "redirectUrl": "string",
- "permissionsBundle": {
- "isRefundable": false
}
}
}
Create one-time-order
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Request Body schema: application/jsonrequired
customerId | string <= 50 characters |
Responses
Request samples
- Payload
{- "customerId": "string"
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "organizationId": "7830dd74-86d9-4027-b110-5dfb0b749392",
- "price": 92.23,
- "currency": "USD",
- "status": "connected",
- "name": "Premium membership plan",
- "customer": {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}, - "bilingCycle": {
- "unit": "days",
- "length": 7
}, - "isAutoPay": true,
- "nextCharge": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "delinquencyPeriod": "string",
- "renewalRemindersSentAt": [
- "2019-08-24T14:15:22Z"
], - "items": [
- {
- "price": 92.23,
- "quantity": 93,
- "formula": "fixed-fee",
- "currency": "AED",
- "planId": "string",
- "planName": "string",
- "bilingCycle": {
- "unit": "days",
- "length": 7
}
}
]
}
}
Upsert one time order
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "organizationId": "7830dd74-86d9-4027-b110-5dfb0b749392",
- "price": 92.23,
- "currency": "USD",
- "status": "connected",
- "name": "Premium membership plan",
- "customer": {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}, - "bilingCycle": {
- "unit": "days",
- "length": 7
}, - "isAutoPay": true,
- "nextCharge": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "delinquencyPeriod": "string",
- "renewalRemindersSentAt": [
- "2019-08-24T14:15:22Z"
], - "items": [
- {
- "price": 92.23,
- "quantity": 93,
- "formula": "fixed-fee",
- "currency": "AED",
- "planId": "string",
- "planName": "string",
- "bilingCycle": {
- "unit": "days",
- "length": 7
}
}
]
}
}
Get subscriptions list
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
query Parameters
limit | integer [ 0 .. 100 ] Default: 20 Example: limit=20 pagination limit |
offset | number <integer> >= 0 Example: offset=1 |
sortDirection | string Enum: "asc" "desc" Example: sortDirection=asc |
sortBy | string Enum: "createdAt" "nextCharge" "isAutoPay" "price" "customerName" |
search | string Example: search=John |
createdFrom | string <date-time> |
createdTo | string <date-time> |
nextChargeTo | string <date-time> |
nextChargeFrom | string <date-time> |
renewability | string Enum: "automatic" "manual" |
customerId | string Example: customerId=bafe3272-c3e1-43be-9ea1-8d48ca204254 |
statuses | Array of strings Example: statuses=[object Object] |
currencies | Array of strings[ items = 3 characters ] Example: currencies=USD |
amountMin | number >= 0 Example: amountMin=1.99 |
amountMax | number >= 0 Example: amountMax=1.99 |
showTestData | boolean |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "list",
- "totalCount": 100,
- "paginationMeta": {
- "limit": 10,
- "offset": 10
}, - "data": [
- {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "organizationId": "7830dd74-86d9-4027-b110-5dfb0b749392",
- "price": 92.23,
- "currency": "USD",
- "status": "connected",
- "name": "Premium membership plan",
- "customer": {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}, - "bilingCycle": {
- "unit": "days",
- "length": 7
}, - "isAutoPay": true,
- "nextCharge": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "delinquencyPeriod": "string",
- "renewalRemindersSentAt": [
- "2019-08-24T14:15:22Z"
], - "items": [
- {
- "price": 92.23,
- "quantity": 93,
- "formula": "fixed-fee",
- "currency": "AED",
- "planId": "string",
- "planName": "string",
- "bilingCycle": {
- "unit": "days",
- "length": 7
}
}
]
}
]
}
Create subscription
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Request Body schema: application/jsonrequired
customerId | string <= 50 characters |
isTrialOnly | boolean |
Array of objects | |
paymentInstrumentId | string <= 50 characters |
renewalTime | string <date-time> |
startAt | string <date-time> |
object (TrialSubscription) |
Responses
Request samples
- Payload
{- "customerId": "string",
- "isTrialOnly": true,
- "items": [
- {
- "quantity": 0,
- "plan": {
- "id": "string",
- "name": "string",
- "pricing": "fixed-fee",
- "currency": "AED",
- "productId": "string",
- "recurringInterval": {
- "periodAnchorInstruction": {
- "method": "day-of-month",
- "day": 1,
- "time": "2019-08-24T14:15:22Z"
}, - "unit": "next",
- "length": 1,
- "billingTiming": "prepaid"
}, - "trial": null
}
}
], - "paymentInstrumentId": "string",
- "renewalTime": "2019-08-24T14:15:22Z",
- "startAt": "2019-08-24T14:15:22Z",
- "trial": {
- "enabled": true,
- "endAt": "2019-08-24T14:15:22Z"
}
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "organizationId": "7830dd74-86d9-4027-b110-5dfb0b749392",
- "price": 92.23,
- "currency": "USD",
- "status": "connected",
- "name": "Premium membership plan",
- "customer": {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}, - "bilingCycle": {
- "unit": "days",
- "length": 7
}, - "isAutoPay": true,
- "nextCharge": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "delinquencyPeriod": "string",
- "renewalRemindersSentAt": [
- "2019-08-24T14:15:22Z"
], - "items": [
- {
- "price": 92.23,
- "quantity": 93,
- "formula": "fixed-fee",
- "currency": "AED",
- "planId": "string",
- "planName": "string",
- "bilingCycle": {
- "unit": "days",
- "length": 7
}
}
]
}
}
Get subscription details
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
subscriptionId required | string <uuid> Example: e7aa6809-6d8a-4e34-9bb0-d6897787fa9b |
query Parameters
showTestData | boolean |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "object",
- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "organizationId": "7830dd74-86d9-4027-b110-5dfb0b749392",
- "price": 92.23,
- "currency": "USD",
- "status": "connected",
- "name": "Premium membership plan",
- "customer": {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}, - "bilingCycle": {
- "unit": "days",
- "length": 7
}, - "isAutoPay": true,
- "nextCharge": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "delinquencyPeriod": "string",
- "renewalRemindersSentAt": [
- "2019-08-24T14:15:22Z"
], - "items": [
- {
- "price": 92.23,
- "quantity": 93,
- "formula": "fixed-fee",
- "currency": "AED",
- "planId": "string",
- "planName": "string",
- "bilingCycle": {
- "unit": "days",
- "length": 7
}
}
]
}
}
Upsert subscription
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "data": {
- "id": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "organizationId": "7830dd74-86d9-4027-b110-5dfb0b749392",
- "price": 92.23,
- "currency": "USD",
- "status": "connected",
- "name": "Premium membership plan",
- "customer": {
- "firstName": "string",
- "lastName": "string",
- "organization": "string",
- "phoneNumber": "string",
- "isEnhancedDueDiligenceRequired": false,
- "primaryAddress": {
- "customerAddress": {
- "address1": "string",
- "address2": "string",
- "country": "st",
- "city": "string",
- "region": "string",
- "zip": "string"
}
}
}, - "bilingCycle": {
- "unit": "days",
- "length": 7
}, - "isAutoPay": true,
- "nextCharge": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "delinquencyPeriod": "string",
- "renewalRemindersSentAt": [
- "2019-08-24T14:15:22Z"
], - "items": [
- {
- "price": 92.23,
- "quantity": 93,
- "formula": "fixed-fee",
- "currency": "AED",
- "planId": "string",
- "planName": "string",
- "bilingCycle": {
- "unit": "days",
- "length": 7
}
}
]
}
}
Get list of subscriptions cancellations
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
query Parameters
limit | integer [ 0 .. 100 ] Default: 20 Example: limit=20 pagination limit |
offset | number <integer> >= 0 Example: offset=1 |
sortDirection | string Enum: "asc" "desc" Example: sortDirection=asc |
sortBy | string Enum: "createdAt" "updatedAt" "cancelledAt" "churnedAt" |
showTestData | boolean |
statuses | Array of strings (SubscriptionsCancellationsStatusesEnum) Items Enum: "draft" "confirmed" "completed" "revoked" |
createdFrom | string <date-time> |
createdTo | string <date-time> |
reasons | Array of strings (SubscriptionsCancellationsReasonsEnum) Items Enum: "did-not-use" "did-not-want" "missing-features" "bugs-or-problems" "do-not-remember" "risk-warning" "contract-expired" "too-expensive" "other" "billing-failure" |
cancelledBy | string (SubscriptionsCancellationsCancelledByEnum) Enum: "customer" "merchant" "system" |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "totalCount": 100,
- "paginationMeta": {
- "limit": 10,
- "offset": 10
}, - "data": [
- {
- "id": "sub_cnl_2432e-4e94-b8ba-1658ef3258e2",
- "organizationId": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "subscriptionId": "sub_2432e-4e94-b8ba-1658ef3258e2",
- "proratedInvoiceId": "inv_2432e-4e94-b8ba-1658ef3258e2",
- "appliedInvoiceId": "inv_2432e-4e94-b8ba-1658ef3258e2",
- "cancelledBy": "customer",
- "reason": "did-not-use",
- "description": "string",
- "prorated": true,
- "status": "draft",
- "cancelledAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "churnedAt": "2019-08-24T14:15:22Z",
- "churnTimePolicy": null,
- "lineItems": [
- {
- "type": "debit",
- "description": "string",
- "unitPriceAmount": 0,
- "unitPriceCurrency": "AED",
- "quantity": 0,
- "periodStartsAt": "2019-08-24T14:15:22Z",
- "periodEndsAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "lineItemsSubtotal": {
- "amount": 0,
- "currency": "AED"
}
}
]
}
Create subscription cancellation
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Request Body schema: application/jsonrequired
reason | string (SubscriptionsCancellationsReasonsEnum) Enum: "did-not-use" "did-not-want" "missing-features" "bugs-or-problems" "do-not-remember" "risk-warning" "contract-expired" "too-expensive" "other" "billing-failure" |
cancelAt | string <date-time> |
description | string <= 255 characters |
status | string (SubscriptionsCancellationsStatusesEnum) Enum: "draft" "confirmed" "completed" "revoked" |
Responses
Request samples
- Payload
{- "reason": "did-not-use",
- "cancelAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "status": "draft"
}
Response samples
- 400
- 401
- 500
{- "errorCode": "string",
- "statusCode": 400,
- "message": "Bad request",
- "details": "string"
}
Get one subscription cancellation
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
subscriptionCancellationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Subscription cancellation ID |
query Parameters
showTestData | boolean |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "object",
- "data": {
- "id": "sub_cnl_2432e-4e94-b8ba-1658ef3258e2",
- "organizationId": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "subscriptionId": "sub_2432e-4e94-b8ba-1658ef3258e2",
- "proratedInvoiceId": "inv_2432e-4e94-b8ba-1658ef3258e2",
- "appliedInvoiceId": "inv_2432e-4e94-b8ba-1658ef3258e2",
- "cancelledBy": "customer",
- "reason": "did-not-use",
- "description": "string",
- "prorated": true,
- "status": "draft",
- "cancelledAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "churnedAt": "2019-08-24T14:15:22Z",
- "churnTimePolicy": null,
- "lineItems": [
- {
- "type": "debit",
- "description": "string",
- "unitPriceAmount": 0,
- "unitPriceCurrency": "AED",
- "quantity": 0,
- "periodStartsAt": "2019-08-24T14:15:22Z",
- "periodEndsAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "lineItemsSubtotal": {
- "amount": 0,
- "currency": "AED"
}
}
}
Update subscription cancellation
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
subscriptionCancellationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Subscription cancellation ID |
Request Body schema: application/jsonrequired
subscriptionId | string Subscription id |
description | string <= 255 characters |
reason | string (SubscriptionsCancellationsReasonsEnum) Enum: "did-not-use" "did-not-want" "missing-features" "bugs-or-problems" "do-not-remember" "risk-warning" "contract-expired" "too-expensive" "other" "billing-failure" |
prorated | boolean |
churnedAt | string <date-time> |
churnTimePolicy | string (SubscriptionsCancellationsChurnTimePolicyEnum) Enum: null "now" "at-next-renewal" |
Responses
Request samples
- Payload
{- "subscriptionId": "string",
- "description": "string",
- "reason": "did-not-use",
- "prorated": true,
- "churnedAt": "2019-08-24T14:15:22Z",
- "churnTimePolicy": null
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "object",
- "data": {
- "id": "sub_cnl_2432e-4e94-b8ba-1658ef3258e2",
- "organizationId": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "subscriptionId": "sub_2432e-4e94-b8ba-1658ef3258e2",
- "proratedInvoiceId": "inv_2432e-4e94-b8ba-1658ef3258e2",
- "appliedInvoiceId": "inv_2432e-4e94-b8ba-1658ef3258e2",
- "cancelledBy": "customer",
- "reason": "did-not-use",
- "description": "string",
- "prorated": true,
- "status": "draft",
- "cancelledAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "churnedAt": "2019-08-24T14:15:22Z",
- "churnTimePolicy": null,
- "lineItems": [
- {
- "type": "debit",
- "description": "string",
- "unitPriceAmount": 0,
- "unitPriceCurrency": "AED",
- "quantity": 0,
- "periodStartsAt": "2019-08-24T14:15:22Z",
- "periodEndsAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "lineItemsSubtotal": {
- "amount": 0,
- "currency": "AED"
}
}
}
Delete subscription cancellation
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
subscriptionCancellationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Subscription cancellation ID |
Responses
Response samples
- 204
- 400
- 401
- 403
- 404
- 409
- 500
{- "type": "object",
- "data": {
- "id": "sub_cnl_2432e-4e94-b8ba-1658ef3258e2",
- "organizationId": "c114b68a-432e-4e94-b8ba-1658ef3258e2",
- "subscriptionId": "sub_2432e-4e94-b8ba-1658ef3258e2",
- "proratedInvoiceId": "inv_2432e-4e94-b8ba-1658ef3258e2",
- "appliedInvoiceId": "inv_2432e-4e94-b8ba-1658ef3258e2",
- "cancelledBy": "customer",
- "reason": "did-not-use",
- "description": "string",
- "prorated": true,
- "status": "draft",
- "cancelledAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "churnedAt": "2019-08-24T14:15:22Z",
- "churnTimePolicy": null,
- "lineItems": [
- {
- "type": "debit",
- "description": "string",
- "unitPriceAmount": 0,
- "unitPriceCurrency": "AED",
- "quantity": 0,
- "periodStartsAt": "2019-08-24T14:15:22Z",
- "periodEndsAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "lineItemsSubtotal": {
- "amount": 0,
- "currency": "AED"
}
}
}
Get list of subscription pauses
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
query Parameters
limit | integer [ 0 .. 100 ] Default: 20 Example: limit=20 pagination limit |
offset | number <integer> >= 0 Example: offset=1 |
sortDirection | string Enum: "asc" "desc" Example: sortDirection=asc |
sortBy | string Enum: "createdAt" "updatedAt" |
createdFrom | string <date-time> |
createdTo | string <date-time> |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "totalCount": 100,
- "paginationMeta": {
- "limit": 10,
- "offset": 10
}, - "data": [
- {
- "id": "string",
- "subscriptionId": "string",
- "status": "pending",
- "pausedBy": "customer",
- "description": "string",
- "effectiveAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z"
}
]
}
Create subscription pause
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Request Body schema: application/jsonrequired
subscriptionId | string <= 50 characters Subscription id |
pausedBy | string (SubscriptionsPausePausedByEnum) Enum: "customer" "merchant" |
description | string or null <= 255 characters |
effectiveAt | string or null <date-time> |
endAt | string or null <date-time> |
Responses
Request samples
- Payload
{- "subscriptionId": "string",
- "pausedBy": "customer",
- "description": "string",
- "effectiveAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z"
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "type": "object",
- "data": {
- "id": "string",
- "subscriptionId": "string",
- "status": "pending",
- "pausedBy": "customer",
- "description": "string",
- "effectiveAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z"
}
}
Get subscription pause by Id
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
subscriptionPauseId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Subscription pause ID |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "type": "object",
- "data": {
- "id": "string",
- "subscriptionId": "string",
- "status": "pending",
- "pausedBy": "customer",
- "description": "string",
- "effectiveAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z"
}
}
Update subscription pause
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
subscriptionPauseId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Subscription pause ID |
Request Body schema: application/jsonrequired
subscriptionId | string <= 50 characters Subscription id |
pausedBy | string (SubscriptionsPausePausedByEnum) Enum: "customer" "merchant" |
description | string or null <= 255 characters |
effectiveAt | string or null <date-time> |
endAt | string or null <date-time> |
Responses
Request samples
- Payload
{- "subscriptionId": "string",
- "pausedBy": "customer",
- "description": "string",
- "effectiveAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "object",
- "data": {
- "id": "string",
- "subscriptionId": "string",
- "status": "pending",
- "pausedBy": "customer",
- "description": "string",
- "effectiveAt": "2019-08-24T14:15:22Z",
- "endAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z"
}
}
Delete subscription pause
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
subscriptionPauseId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Subscription pause ID |
Responses
Response samples
- 400
- 401
- 403
- 404
- 409
- 500
{- "errorCode": "string",
- "statusCode": 400,
- "message": "Bad request",
- "details": "string"
}
Get list of subscription reactivations
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
query Parameters
limit | integer [ 0 .. 100 ] Default: 20 Example: limit=20 pagination limit |
offset | number <integer> >= 0 Example: offset=1 |
sortDirection | string Enum: "asc" "desc" Example: sortDirection=asc |
sortBy | string Enum: "createdAt" "updatedAt" |
createdFrom | string <date-time> |
createdTo | string <date-time> |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "totalCount": 100,
- "paginationMeta": {
- "limit": 10,
- "offset": 10
}, - "data": [
- {
- "id": "string",
- "subscriptionId": "string",
- "cancellationId": "string",
- "description": "string",
- "renewalAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z"
}
]
}
Create subscription reactivation
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
Request Body schema: application/jsonrequired
subscriptionId | string <= 50 characters Subscription id |
description | string or null <= 255 characters |
effectiveAt | string or null <date-time> |
renewalAt | string or null <date-time> |
paymentInstrumentId | string |
Responses
Request samples
- Payload
{- "subscriptionId": "string",
- "description": "string",
- "effectiveAt": "2019-08-24T14:15:22Z",
- "renewalAt": "2019-08-24T14:15:22Z",
- "paymentInstrumentId": "string"
}
Response samples
- 201
- 400
- 401
- 403
- 422
- 500
{- "type": "object",
- "data": {
- "id": "string",
- "subscriptionId": "string",
- "cancellationId": "string",
- "description": "string",
- "renewalAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z"
}
}
Get one subscription reactivation
Authorizations:
path Parameters
organizationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Organization ID |
subscriptionReactivationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Subscription reactivation ID |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "type": "object",
- "data": {
- "id": "string",
- "subscriptionId": "string",
- "cancellationId": "string",
- "description": "string",
- "renewalAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z"
}
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "list",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "url": "string",
- "auth": {
- "type": "basic",
- "username": "string",
- "password": "string"
}
}
]
}
Create webhook destination
Authorizations:
Request Body schema: application/jsonrequired
url required | string <url> |
object |
Responses
Request samples
- Payload
{- "url": "string",
- "auth": {
- "type": "basic",
- "username": "string",
- "password": "string"
}
}
Response samples
- 201
- 400
- 401
- 403
- 500
{- "type": "object",
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "url": "string",
- "auth": {
- "type": "basic",
- "username": "string",
- "password": "string"
}
}
}
Get webhook destination
Authorizations:
path Parameters
webhookDestinationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Webhook destination ID |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "object",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "url": "string",
- "auth": {
- "type": "basic",
- "username": "string",
- "password": "string"
}
}
]
}
Update webhook destination
Authorizations:
path Parameters
webhookDestinationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Webhook destination ID |
Request Body schema: application/jsonrequired
url | string <url> |
object |
Responses
Request samples
- Payload
{- "url": "string",
- "auth": {
- "type": "basic",
- "username": "string",
- "password": "string"
}
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "type": "object",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "url": "string",
- "auth": {
- "type": "basic",
- "username": "string",
- "password": "string"
}
}
]
}
Delete webhook destination
Authorizations:
path Parameters
webhookDestinationId required | string Example: 46da78a6-034d-48d3-a28f-870d20b0ba00 Webhook destination ID |
Responses
Response samples
- 400
- 401
- 403
- 500
{- "errorCode": "string",
- "statusCode": 400,
- "message": "Bad request",
- "details": "string"
}