Updated open api spec
This commit is contained in:
parent
597b973dda
commit
c0e603a08b
|
|
@ -12626,6 +12626,25 @@ paths:
|
||||||
- payments
|
- payments
|
||||||
summary: "Create payment"
|
summary: "Create payment"
|
||||||
description: "Adds an Payment to the system"
|
description: "Adds an Payment to the system"
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: php
|
||||||
|
label: php
|
||||||
|
source: |
|
||||||
|
$ninja = new InvoiceNinja("YOUR-TOKEN");
|
||||||
|
|
||||||
|
$payment = $ninja->payments->create([
|
||||||
|
'client_id' => 'x2fd23',
|
||||||
|
'amount' => 100,
|
||||||
|
'date' => '2021-01-01',
|
||||||
|
'transaction_reference' => '1234567890',
|
||||||
|
'type_id' => 1,
|
||||||
|
'invoices' => [
|
||||||
|
[
|
||||||
|
'invoice_id' => 'jd78Dhjs',
|
||||||
|
'amount' => 100,
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]);
|
||||||
operationId: storePayment
|
operationId: storePayment
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||||
|
|
@ -12639,12 +12658,12 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
requestBody:
|
requestBody:
|
||||||
description: "The payment request"
|
description: "The payment request can be as simple as a client id and amount, or as complex as a full payment with invoices and associated credits that should be applied."
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/Payment"
|
$ref: "#/components/schemas/PaymentRequest"
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "Returns the saved Payment object"
|
description: "Returns the saved Payment object"
|
||||||
|
|
@ -16042,43 +16061,652 @@ components:
|
||||||
type: object
|
type: object
|
||||||
|
|
||||||
PaymentType:
|
PaymentType:
|
||||||
type: integer
|
type: string
|
||||||
description: |
|
description: The payment type used to complete this payment
|
||||||
Payment type identifier:
|
example: "1"
|
||||||
- 4: ACH
|
enum:
|
||||||
- 27: Alipay
|
- "1"
|
||||||
- 7: American Express
|
- "2"
|
||||||
- 1: Bank Transfer
|
- "3"
|
||||||
- 16: Carte Blanche
|
- "4"
|
||||||
- 2: Cash
|
- "5"
|
||||||
- 15: Check
|
- "6"
|
||||||
- 32: Credit
|
- "7"
|
||||||
- 12: Credit Card Other
|
- "8"
|
||||||
- 31: Cryptocurrency
|
- "9"
|
||||||
- 3: Debit
|
- "10"
|
||||||
- 9: Diners Card
|
- "11"
|
||||||
- 8: Discover Card
|
- "12"
|
||||||
- 10: EuroCard
|
- "13"
|
||||||
- 30: GoCardless
|
- "14"
|
||||||
- 14: Google Wallet
|
- "15"
|
||||||
- 18: JCB
|
- "16"
|
||||||
- 19: Laser
|
- "17"
|
||||||
- 20: Maestro
|
- "18"
|
||||||
- 6: MasterCard
|
- "19"
|
||||||
- 26: Money Order
|
- "20"
|
||||||
- 11: Nova
|
- "21"
|
||||||
- 13: PayPal
|
- "22"
|
||||||
- 29: SEPA Direct Debit
|
- "23"
|
||||||
- 28: Sofort
|
- "24"
|
||||||
- 21: Solo
|
- "25"
|
||||||
- 24: Swish
|
- "26"
|
||||||
- 22: Switch
|
- "27"
|
||||||
- 17: UnionPay
|
- "28"
|
||||||
- 25: Venmo
|
- "29"
|
||||||
- 5: Visa Card
|
- "30"
|
||||||
- 33: Zelle
|
- "31"
|
||||||
- 23: iZettle
|
- "32"
|
||||||
|
- "33"
|
||||||
|
x-enumDescriptions:
|
||||||
|
"1": Bank Transfer
|
||||||
|
"2": Cash
|
||||||
|
"3": Debit
|
||||||
|
"4": ACH
|
||||||
|
"5": Visa Card
|
||||||
|
"6": MasterCard
|
||||||
|
"7": American Express
|
||||||
|
"8": Discover Card
|
||||||
|
"9": Diners Card
|
||||||
|
"10": EuroCard
|
||||||
|
"11": Nova
|
||||||
|
"12": Credit Card Other
|
||||||
|
"13": PayPal
|
||||||
|
"14": Google Wallet
|
||||||
|
"15": Check
|
||||||
|
"16": Carte Blanche
|
||||||
|
"17": UnionPay
|
||||||
|
"18": JCB
|
||||||
|
"19": Laser
|
||||||
|
"20": Maestro
|
||||||
|
"21": Solo
|
||||||
|
"22": Switch
|
||||||
|
"23": iZettle
|
||||||
|
"24": Swish
|
||||||
|
"25": Venmo
|
||||||
|
"26": Money Order
|
||||||
|
"27": Alipay
|
||||||
|
"28": Sofort
|
||||||
|
"29": SEPA Direct Debit
|
||||||
|
"30": GoCardless
|
||||||
|
"31": Cryptocurrency
|
||||||
|
"32": Credit
|
||||||
|
"33": Zelle
|
||||||
|
|
||||||
|
CurrencyType:
|
||||||
|
oneOf:
|
||||||
|
- type: integer
|
||||||
|
title: "Currency Types"
|
||||||
|
description: |
|
||||||
|
Available currency types:
|
||||||
|
- 1: US Dollar
|
||||||
|
- 2: British Pound
|
||||||
|
- 3: Euro
|
||||||
|
- 4: South African Rand
|
||||||
|
- 5: Danish Krone
|
||||||
|
- 6: Israeli Shekel
|
||||||
|
- 7: Swedish Krona
|
||||||
|
- 8: Kenyan Shilling
|
||||||
|
- 9: Canadian Dollar
|
||||||
|
- 10: Philippine Peso
|
||||||
|
- 11: Indian Rupee
|
||||||
|
- 12: Australian Dollar
|
||||||
|
- 13: Singapore Dollar
|
||||||
|
- 14: Norske Kroner
|
||||||
|
- 15: New Zealand Dollar
|
||||||
|
- 16: Vietnamese Dong
|
||||||
|
- 17: Swiss Franc
|
||||||
|
- 18: Guatemalan Quetzal
|
||||||
|
- 19: Malaysian Ringgit
|
||||||
|
- 20: Brazilian Real
|
||||||
|
- 21: Thai Baht
|
||||||
|
- 22: Nigerian Naira
|
||||||
|
- 23: Argentine Peso
|
||||||
|
- 24: Bangladeshi Taka
|
||||||
|
- 25: United Arab Emirates Dirham
|
||||||
|
- 26: Hong Kong Dollar
|
||||||
|
- 27: Indonesian Rupiah
|
||||||
|
- 28: Mexican Peso
|
||||||
|
- 29: Egyptian Pound
|
||||||
|
- 30: Colombian Peso
|
||||||
|
- 31: West African Franc
|
||||||
|
- 32: Chinese Renminbi
|
||||||
|
- 33: Rwandan Franc
|
||||||
|
- 34: Tanzanian Shilling
|
||||||
|
- 35: Netherlands Antillean Guilder
|
||||||
|
- 36: Trinidad and Tobago Dollar
|
||||||
|
- 37: East Caribbean Dollar
|
||||||
|
- 38: Ghanaian Cedi
|
||||||
|
- 39: Bulgarian Lev
|
||||||
|
- 40: Aruban Florin
|
||||||
|
- 41: Turkish Lira
|
||||||
|
- 42: Romanian New Leu
|
||||||
|
- 43: Croatian Kuna
|
||||||
|
- 44: Saudi Riyal
|
||||||
|
- 45: Japanese Yen
|
||||||
|
- 46: Maldivian Rufiyaa
|
||||||
|
- 47: Costa Rican Colón
|
||||||
|
- 48: Pakistani Rupee
|
||||||
|
- 49: Polish Zloty
|
||||||
|
- 50: Sri Lankan Rupee
|
||||||
|
- 51: Czech Koruna
|
||||||
|
- 52: Uruguayan Peso
|
||||||
|
- 53: Namibian Dollar
|
||||||
|
- 54: Tunisian Dinar
|
||||||
|
- 55: Russian Ruble
|
||||||
|
- 56: Mozambican Metical
|
||||||
|
- 57: Omani Rial
|
||||||
|
- 58: Ukrainian Hryvnia
|
||||||
|
- 59: Macanese Pataca
|
||||||
|
- 60: Taiwan New Dollar
|
||||||
|
- 61: Dominican Peso
|
||||||
|
- 62: Chilean Peso
|
||||||
|
- 63: Icelandic Króna
|
||||||
|
- 64: Papua New Guinean Kina
|
||||||
|
- 65: Jordanian Dinar
|
||||||
|
- 66: Myanmar Kyat
|
||||||
|
- 67: Peruvian Sol
|
||||||
|
- 68: Botswana Pula
|
||||||
|
- 69: Hungarian Forint
|
||||||
|
- 70: Ugandan Shilling
|
||||||
|
- 71: Barbadian Dollar
|
||||||
|
- 72: Brunei Dollar
|
||||||
|
- 73: Georgian Lari
|
||||||
|
- 74: Qatari Riyal
|
||||||
|
- 75: Honduran Lempira
|
||||||
|
- 76: Surinamese Dollar
|
||||||
|
- 77: Bahraini Dinar
|
||||||
|
- 78: Venezuelan Bolivars
|
||||||
|
- 79: South Korean Won
|
||||||
|
- 80: Moroccan Dirham
|
||||||
|
- 81: Jamaican Dollar
|
||||||
|
- 82: Angolan Kwanza
|
||||||
|
- 83: Haitian Gourde
|
||||||
|
- 84: Zambian Kwacha
|
||||||
|
- 85: Nepalese Rupee
|
||||||
|
- 86: CFP Franc
|
||||||
|
- 87: Mauritian Rupee
|
||||||
|
- 88: Cape Verdean Escudo
|
||||||
|
- 89: Kuwaiti Dinar
|
||||||
|
- 90: Algerian Dinar
|
||||||
|
- 91: Macedonian Denar
|
||||||
|
- 92: Fijian Dollar
|
||||||
|
- 93: Bolivian Boliviano
|
||||||
|
- 94: Albanian Lek
|
||||||
|
- 95: Serbian Dinar
|
||||||
|
- 96: Lebanese Pound
|
||||||
|
- 97: Armenian Dram
|
||||||
|
- 98: Azerbaijan Manat
|
||||||
|
- 99: Bosnia and Herzegovina Convertible Mark
|
||||||
|
- 100: Belarusian Ruble
|
||||||
|
- 101: Gibraltar Pound
|
||||||
|
- 102: Moldovan Leu
|
||||||
|
- 103: Kazakhstani Tenge
|
||||||
|
- 104: Ethiopian Birr
|
||||||
|
- 105: Gambia Dalasi
|
||||||
|
- 106: Paraguayan Guarani
|
||||||
|
- 107: Malawi Kwacha
|
||||||
|
- 108: Zimbabwean Dollar
|
||||||
|
- 109: Cambodian Riel
|
||||||
|
- 110: Vanuatu Vatu
|
||||||
|
- 111: Cuban Peso
|
||||||
|
- 112: Cayman Island Dollar
|
||||||
|
- 113: Swazi lilangeni
|
||||||
|
- 114: BZ Dollar
|
||||||
|
- 115: Libyan Dinar
|
||||||
|
- 116: Silver Troy Ounce
|
||||||
|
- 117: Gold Troy Ounce
|
||||||
|
- 118: Nicaraguan Córdoba
|
||||||
|
- 119: Malagasy ariary
|
||||||
|
- 120: Tongan Pa anga
|
||||||
|
- 121: Lao kip
|
||||||
|
- 122: Bhutan Ngultrum
|
||||||
|
- 123: Mauritanian Ouguiya
|
||||||
|
- 124: Bermudian Dollar
|
||||||
|
- 125: Central African CFA Franc
|
||||||
|
- 126: Congolese Franc
|
||||||
|
- 127: Djiboutian Franc
|
||||||
|
- 128: Eritrean Nakfa
|
||||||
|
- 129: Falkland Islands Pound
|
||||||
|
- 130: Guinean Franc
|
||||||
|
- 131: Iraqi Dinar
|
||||||
|
- 132: Lesotho Loti
|
||||||
|
- 133: Mongolian Tugrik
|
||||||
|
- 134: Seychellois Rupee
|
||||||
|
- 135: Solomon Islands Dollar
|
||||||
|
- 136: Somali Shilling
|
||||||
|
- 137: South Sudanese Pound
|
||||||
|
- 138: Sudanese Pound
|
||||||
|
- 139: Tajikistani Somoni
|
||||||
|
- 140: Turkmenistani Manat
|
||||||
|
- 141: Uzbekistani Som
|
||||||
|
- 142: Samoan Tala
|
||||||
|
|
||||||
|
LanguageType:
|
||||||
|
oneOf:
|
||||||
|
- type: integer
|
||||||
|
title: "Language Types"
|
||||||
|
description: |
|
||||||
|
Available language types:
|
||||||
|
- 1: English - United States
|
||||||
|
- 2: Italian
|
||||||
|
- 3: German
|
||||||
|
- 4: French
|
||||||
|
- 5: Portuguese - Brazilian
|
||||||
|
- 6: Dutch
|
||||||
|
- 7: Spanish
|
||||||
|
- 8: Norwegian
|
||||||
|
- 9: Danish
|
||||||
|
- 10: Japanese
|
||||||
|
- 11: Swedish
|
||||||
|
- 12: Spanish - Spain
|
||||||
|
- 13: French - Canada
|
||||||
|
- 14: Lithuanian
|
||||||
|
- 15: Polish
|
||||||
|
- 16: Czech
|
||||||
|
- 17: Croatian
|
||||||
|
- 18: Albanian
|
||||||
|
- 19: Greek
|
||||||
|
- 20: English - United Kingdom
|
||||||
|
- 21: Portuguese - Portugal
|
||||||
|
- 22: Slovenian
|
||||||
|
- 23: Finnish
|
||||||
|
- 24: Romanian
|
||||||
|
- 25: Turkish - Turkey
|
||||||
|
- 26: Thai
|
||||||
|
- 27: Macedonian
|
||||||
|
- 28: Chinese - Taiwan
|
||||||
|
- 29: Russian (Russia)
|
||||||
|
- 30: Arabic
|
||||||
|
- 31: Persian
|
||||||
|
- 32: Latvian
|
||||||
|
- 33: Serbian
|
||||||
|
- 34: Slovak
|
||||||
|
- 35: Estonian
|
||||||
|
- 36: Bulgarian
|
||||||
|
- 37: Hebrew
|
||||||
|
- 38: Khmer
|
||||||
|
- 39: Hungarian
|
||||||
|
- 40: French - Swiss
|
||||||
|
- 41: Lao
|
||||||
|
- 42: Vietnamese
|
||||||
|
|
||||||
|
TimezoneType:
|
||||||
|
oneOf:
|
||||||
|
- type: integer
|
||||||
|
title: "Timezone Types"
|
||||||
|
description: |
|
||||||
|
Available timezone types:
|
||||||
|
- 1: Pacific/Midway
|
||||||
|
- 2: Pacific/Pago_Pago
|
||||||
|
- 3: Pacific/Honolulu
|
||||||
|
- 4: America/Anchorage
|
||||||
|
- 5: America/Los_Angeles
|
||||||
|
- 6: America/Tijuana
|
||||||
|
- 7: America/Phoenix
|
||||||
|
- 8: America/Denver
|
||||||
|
- 9: America/Chihuahua
|
||||||
|
- 10: America/Mazatlan
|
||||||
|
- 11: America/Mexico_City
|
||||||
|
- 12: America/Monterrey
|
||||||
|
- 13: America/Regina
|
||||||
|
- 14: America/Chicago
|
||||||
|
- 15: America/New_York
|
||||||
|
- 16: America/Indiana/Indianapolis
|
||||||
|
- 17: America/Bogota
|
||||||
|
- 18: America/Lima
|
||||||
|
- 19: America/Caracas
|
||||||
|
- 20: America/Halifax
|
||||||
|
- 21: America/La_Paz
|
||||||
|
- 22: America/Santiago
|
||||||
|
- 23: America/St_Johns
|
||||||
|
- 24: America/Argentina/Buenos_Aires
|
||||||
|
- 25: America/Godthab
|
||||||
|
- 26: America/Sao_Paulo
|
||||||
|
- 27: Atlantic/Stanley
|
||||||
|
- 28: Atlantic/Azores
|
||||||
|
- 29: Atlantic/Cape_Verde
|
||||||
|
- 30: Africa/Casablanca
|
||||||
|
- 31: Europe/Dublin
|
||||||
|
- 32: Europe/Lisbon
|
||||||
|
- 33: Europe/London
|
||||||
|
- 34: Africa/Monrovia
|
||||||
|
- 35: Europe/Amsterdam
|
||||||
|
- 36: Europe/Belgrade
|
||||||
|
- 37: Europe/Berlin
|
||||||
|
- 38: Europe/Bratislava
|
||||||
|
- 39: Europe/Brussels
|
||||||
|
- 40: Europe/Budapest
|
||||||
|
- 41: Europe/Copenhagen
|
||||||
|
- 42: Europe/Ljubljana
|
||||||
|
- 43: Europe/Madrid
|
||||||
|
- 44: Europe/Paris
|
||||||
|
- 45: Europe/Prague
|
||||||
|
- 46: Europe/Rome
|
||||||
|
- 47: Europe/Sarajevo
|
||||||
|
- 48: Europe/Skopje
|
||||||
|
- 49: Europe/Stockholm
|
||||||
|
- 50: Europe/Vienna
|
||||||
|
- 51: Europe/Warsaw
|
||||||
|
- 52: Europe/Zagreb
|
||||||
|
- 53: Europe/Athens
|
||||||
|
- 54: Europe/Bucharest
|
||||||
|
- 55: Africa/Cairo
|
||||||
|
- 56: Africa/Harare
|
||||||
|
- 57: Europe/Helsinki
|
||||||
|
- 58: Asia/Jerusalem
|
||||||
|
- 59: Europe/Kiev
|
||||||
|
- 60: Europe/Minsk
|
||||||
|
- 61: Europe/Riga
|
||||||
|
- 62: Europe/Sofia
|
||||||
|
- 63: Europe/Tallinn
|
||||||
|
- 64: Europe/Vilnius
|
||||||
|
- 65: Europe/Istanbul
|
||||||
|
- 66: Asia/Baghdad
|
||||||
|
- 67: Asia/Kuwait
|
||||||
|
- 68: Africa/Nairobi
|
||||||
|
- 69: Asia/Riyadh
|
||||||
|
- 70: Asia/Tehran
|
||||||
|
- 71: Europe/Moscow
|
||||||
|
- 72: Asia/Baku
|
||||||
|
- 73: Europe/Volgograd
|
||||||
|
- 74: Asia/Muscat
|
||||||
|
- 75: Asia/Tbilisi
|
||||||
|
- 76: Asia/Yerevan
|
||||||
|
- 77: Asia/Kabul
|
||||||
|
- 78: Asia/Karachi
|
||||||
|
- 79: Asia/Tashkent
|
||||||
|
- 80: Asia/Kolkata
|
||||||
|
- 81: Asia/Kathmandu
|
||||||
|
- 82: Asia/Yekaterinburg
|
||||||
|
- 83: Asia/Almaty
|
||||||
|
- 84: Asia/Dhaka
|
||||||
|
- 85: Asia/Novosibirsk
|
||||||
|
- 86: Asia/Bangkok
|
||||||
|
- 87: Asia/Ho_Chi_Minh
|
||||||
|
- 88: Asia/Jakarta
|
||||||
|
- 89: Asia/Krasnoyarsk
|
||||||
|
- 90: Asia/Chongqing
|
||||||
|
- 91: Asia/Hong_Kong
|
||||||
|
- 92: Asia/Kuala_Lumpur
|
||||||
|
- 93: Australia/Perth
|
||||||
|
- 94: Asia/Singapore
|
||||||
|
- 95: Asia/Taipei
|
||||||
|
- 96: Asia/Ulaanbaatar
|
||||||
|
- 97: Asia/Urumqi
|
||||||
|
- 98: Asia/Irkutsk
|
||||||
|
- 99: Asia/Seoul
|
||||||
|
- 100: Asia/Tokyo
|
||||||
|
- 101: Australia/Adelaide
|
||||||
|
- 102: Australia/Darwin
|
||||||
|
- 103: Asia/Yakutsk
|
||||||
|
- 104: Australia/Brisbane
|
||||||
|
- 110: Australia/Sydney
|
||||||
|
- 106: Pacific/Guam
|
||||||
|
- 107: Australia/Hobart
|
||||||
|
- 108: Australia/Melbourne
|
||||||
|
- 109: Pacific/Port_Moresby
|
||||||
|
- 111: Asia/Vladivostok
|
||||||
|
- 112: Asia/Magadan
|
||||||
|
- 113: Pacific/Auckland
|
||||||
|
- 114: Pacific/Fiji
|
||||||
|
- 115: Asia/Dubai
|
||||||
|
|
||||||
|
CountryType:
|
||||||
|
oneOf:
|
||||||
|
- type: integer
|
||||||
|
title: "Country Types"
|
||||||
|
description: |
|
||||||
|
Available country types:
|
||||||
|
- 4: Afghanistan (AF/AFG)
|
||||||
|
- 8: Albania (AL/ALB)
|
||||||
|
- 10: Antarctica (AQ/ATA)
|
||||||
|
- 12: Algeria (DZ/DZA)
|
||||||
|
- 16: American Samoa (AS/ASM)
|
||||||
|
- 20: Andorra (AD/AND)
|
||||||
|
- 24: Angola (AO/AGO)
|
||||||
|
- 28: Antigua and Barbuda (AG/ATG)
|
||||||
|
- 31: Azerbaijan (AZ/AZE)
|
||||||
|
- 32: Argentina (AR/ARG)
|
||||||
|
- 36: Australia (AU/AUS)
|
||||||
|
- 40: Austria (AT/AUT)
|
||||||
|
- 44: Bahamas (BS/BHS)
|
||||||
|
- 48: Bahrain (BH/BHR)
|
||||||
|
- 50: Bangladesh (BD/BGD)
|
||||||
|
- 51: Armenia (AM/ARM)
|
||||||
|
- 52: Barbados (BB/BRB)
|
||||||
|
- 56: Belgium (BE/BEL)
|
||||||
|
- 60: Bermuda (BM/BMU)
|
||||||
|
- 64: Bhutan (BT/BTN)
|
||||||
|
- 68: Bolivia, Plurinational State of (BO/BOL)
|
||||||
|
- 70: Bosnia and Herzegovina (BA/BIH)
|
||||||
|
- 72: Botswana (BW/BWA)
|
||||||
|
- 74: Bouvet Island (BV/BVT)
|
||||||
|
- 76: Brazil (BR/BRA)
|
||||||
|
- 84: Belize (BZ/BLZ)
|
||||||
|
- 86: British Indian Ocean Territory (IO/IOT)
|
||||||
|
- 90: Solomon Islands (SB/SLB)
|
||||||
|
- 92: Virgin Islands, British (VG/VGB)
|
||||||
|
- 96: Brunei Darussalam (BN/BRN)
|
||||||
|
- 100: Bulgaria (BG/BGR)
|
||||||
|
- 104: Myanmar (MM/MMR)
|
||||||
|
- 108: Burundi (BI/BDI)
|
||||||
|
- 112: Belarus (BY/BLR)
|
||||||
|
- 116: Cambodia (KH/KHM)
|
||||||
|
- 120: Cameroon (CM/CMR)
|
||||||
|
- 124: Canada (CA/CAN)
|
||||||
|
- 132: Cape Verde (CV/CPV)
|
||||||
|
- 136: Cayman Islands (KY/CYM)
|
||||||
|
- 140: Central African Republic (CF/CAF)
|
||||||
|
- 144: Sri Lanka (LK/LKA)
|
||||||
|
- 148: Chad (TD/TCD)
|
||||||
|
- 152: Chile (CL/CHL)
|
||||||
|
- 156: China (CN/CHN)
|
||||||
|
- 158: Taiwan (TW/TWN)
|
||||||
|
- 162: Christmas Island (CX/CXR)
|
||||||
|
- 166: Cocos (Keeling) Islands (CC/CCK)
|
||||||
|
- 170: Colombia (CO/COL)
|
||||||
|
- 174: Comoros (KM/COM)
|
||||||
|
- 175: Mayotte (YT/MYT)
|
||||||
|
- 178: Congo (CG/COG)
|
||||||
|
- 180: Congo, the Democratic Republic of the (CD/COD)
|
||||||
|
- 184: Cook Islands (CK/COK)
|
||||||
|
- 188: Costa Rica (CR/CRI)
|
||||||
|
- 191: Croatia (HR/HRV)
|
||||||
|
- 192: Cuba (CU/CUB)
|
||||||
|
- 196: Cyprus (CY/CYP)
|
||||||
|
- 203: Czech Republic (CZ/CZE)
|
||||||
|
- 204: Benin (BJ/BEN)
|
||||||
|
- 208: Denmark (DK/DNK)
|
||||||
|
- 212: Dominica (DM/DMA)
|
||||||
|
- 214: Dominican Republic (DO/DOM)
|
||||||
|
- 218: Ecuador (EC/ECU)
|
||||||
|
- 222: El Salvador (SV/SLV)
|
||||||
|
- 226: Equatorial Guinea (GQ/GNQ)
|
||||||
|
- 231: Ethiopia (ET/ETH)
|
||||||
|
- 232: Eritrea (ER/ERI)
|
||||||
|
- 233: Estonia (EE/EST)
|
||||||
|
- 234: Faroe Islands (FO/FRO)
|
||||||
|
- 238: Falkland Islands (Malvinas) (FK/FLK)
|
||||||
|
- 239: South Georgia and the South Sandwich Islands (GS/SGS)
|
||||||
|
- 242: Fiji (FJ/FJI)
|
||||||
|
- 246: Finland (FI/FIN)
|
||||||
|
- 248: Åland Islands (AX/ALA)
|
||||||
|
- 250: France (FR/FRA)
|
||||||
|
- 254: French Guiana (GF/GUF)
|
||||||
|
- 258: French Polynesia (PF/PYF)
|
||||||
|
- 260: French Southern Territories (TF/ATF)
|
||||||
|
- 262: Djibouti (DJ/DJI)
|
||||||
|
- 266: Gabon (GA/GAB)
|
||||||
|
- 268: Georgia (GE/GEO)
|
||||||
|
- 270: Gambia (GM/GMB)
|
||||||
|
- 275: Palestine (PS/PSE)
|
||||||
|
- 276: Germany (DE/DEU)
|
||||||
|
- 288: Ghana (GH/GHA)
|
||||||
|
- 292: Gibraltar (GI/GIB)
|
||||||
|
- 296: Kiribati (KI/KIR)
|
||||||
|
- 300: Greece (GR/GRC)
|
||||||
|
- 304: Greenland (GL/GRL)
|
||||||
|
- 308: Grenada (GD/GRD)
|
||||||
|
- 312: Guadeloupe (GP/GLP)
|
||||||
|
- 316: Guam (GU/GUM)
|
||||||
|
- 320: Guatemala (GT/GTM)
|
||||||
|
- 324: Guinea (GN/GIN)
|
||||||
|
- 328: Guyana (GY/GUY)
|
||||||
|
- 332: Haiti (HT/HTI)
|
||||||
|
- 334: Heard Island and McDonald Islands (HM/HMD)
|
||||||
|
- 336: Holy See (Vatican City State) (VA/VAT)
|
||||||
|
- 340: Honduras (HN/HND)
|
||||||
|
- 344: Hong Kong (HK/HKG)
|
||||||
|
- 348: Hungary (HU/HUN)
|
||||||
|
- 352: Iceland (IS/ISL)
|
||||||
|
- 356: India (IN/IND)
|
||||||
|
- 360: Indonesia (ID/IDN)
|
||||||
|
- 364: Iran, Islamic Republic of (IR/IRN)
|
||||||
|
- 368: Iraq (IQ/IRQ)
|
||||||
|
- 372: Ireland (IE/IRL)
|
||||||
|
- 376: Israel (IL/ISR)
|
||||||
|
- 380: Italy (IT/ITA)
|
||||||
|
- 384: Côte d'Ivoire (CI/CIV)
|
||||||
|
- 388: Jamaica (JM/JAM)
|
||||||
|
- 392: Japan (JP/JPN)
|
||||||
|
- 398: Kazakhstan (KZ/KAZ)
|
||||||
|
- 400: Jordan (JO/JOR)
|
||||||
|
- 404: Kenya (KE/KEN)
|
||||||
|
- 408: Korea, Democratic People's Republic of (KP/PRK)
|
||||||
|
- 410: Korea, Republic of (KR/KOR)
|
||||||
|
- 414: Kuwait (KW/KWT)
|
||||||
|
- 417: Kyrgyzstan (KG/KGZ)
|
||||||
|
- 418: Lao People's Democratic Republic (LA/LAO)
|
||||||
|
- 422: Lebanon (LB/LBN)
|
||||||
|
- 426: Lesotho (LS/LSO)
|
||||||
|
- 428: Latvia (LV/LVA)
|
||||||
|
- 430: Liberia (LR/LBR)
|
||||||
|
- 434: Libya (LY/LBY)
|
||||||
|
- 438: Liechtenstein (LI/LIE)
|
||||||
|
- 440: Lithuania (LT/LTU)
|
||||||
|
- 442: Luxembourg (LU/LUX)
|
||||||
|
- 446: Macao (MO/MAC)
|
||||||
|
- 450: Madagascar (MG/MDG)
|
||||||
|
- 454: Malawi (MW/MWI)
|
||||||
|
- 458: Malaysia (MY/MYS)
|
||||||
|
- 462: Maldives (MV/MDV)
|
||||||
|
- 466: Mali (ML/MLI)
|
||||||
|
- 470: Malta (MT/MLT)
|
||||||
|
- 474: Martinique (MQ/MTQ)
|
||||||
|
- 478: Mauritania (MR/MRT)
|
||||||
|
- 480: Mauritius (MU/MUS)
|
||||||
|
- 484: Mexico (MX/MEX)
|
||||||
|
- 492: Monaco (MC/MCO)
|
||||||
|
- 496: Mongolia (MN/MNG)
|
||||||
|
- 498: Moldova, Republic of (MD/MDA)
|
||||||
|
- 499: Montenegro (ME/MNE)
|
||||||
|
- 500: Montserrat (MS/MSR)
|
||||||
|
- 504: Morocco (MA/MAR)
|
||||||
|
- 508: Mozambique (MZ/MOZ)
|
||||||
|
- 512: Oman (OM/OMN)
|
||||||
|
- 516: Namibia (NA/NAM)
|
||||||
|
- 520: Nauru (NR/NRU)
|
||||||
|
- 524: Nepal (NP/NPL)
|
||||||
|
- 528: Netherlands (NL/NLD)
|
||||||
|
- 531: Curaçao (CW/CUW)
|
||||||
|
- 533: Aruba (AW/ABW)
|
||||||
|
- 534: Sint Maarten (Dutch part) (SX/SXM)
|
||||||
|
- 535: Bonaire, Sint Eustatius and Saba (BQ/BES)
|
||||||
|
- 540: New Caledonia (NC/NCL)
|
||||||
|
- 548: Vanuatu (VU/VUT)
|
||||||
|
- 554: New Zealand (NZ/NZL)
|
||||||
|
- 558: Nicaragua (NI/NIC)
|
||||||
|
- 562: Niger (NE/NER)
|
||||||
|
- 566: Nigeria (NG/NGA)
|
||||||
|
- 570: Niue (NU/NIU)
|
||||||
|
- 574: Norfolk Island (NF/NFK)
|
||||||
|
- 578: Norway (NO/NOR)
|
||||||
|
- 580: Northern Mariana Islands (MP/MNP)
|
||||||
|
- 581: United States Minor Outlying Islands (UM/UMI)
|
||||||
|
- 583: Micronesia, Federated States of (FM/FSM)
|
||||||
|
- 584: Marshall Islands (MH/MHL)
|
||||||
|
- 585: Palau (PW/PLW)
|
||||||
|
- 586: Pakistan (PK/PAK)
|
||||||
|
- 591: Panama (PA/PAN)
|
||||||
|
- 598: Papua New Guinea (PG/PNG)
|
||||||
|
- 600: Paraguay (PY/PRY)
|
||||||
|
- 604: Peru (PE/PER)
|
||||||
|
- 608: Philippines (PH/PHL)
|
||||||
|
- 612: Pitcairn (PN/PCN)
|
||||||
|
- 616: Poland (PL/POL)
|
||||||
|
- 620: Portugal (PT/PRT)
|
||||||
|
- 624: Guinea-Bissau (GW/GNB)
|
||||||
|
- 626: Timor-Leste (TL/TLS)
|
||||||
|
- 630: Puerto Rico (PR/PRI)
|
||||||
|
- 634: Qatar (QA/QAT)
|
||||||
|
- 638: Réunion (RE/REU)
|
||||||
|
- 642: Romania (RO/ROU)
|
||||||
|
- 643: Russian Federation (RU/RUS)
|
||||||
|
- 646: Rwanda (RW/RWA)
|
||||||
|
- 652: Saint Barthélemy (BL/BLM)
|
||||||
|
- 654: Saint Helena, Ascension and Tristan da Cunha (SH/SHN)
|
||||||
|
- 659: Saint Kitts and Nevis (KN/KNA)
|
||||||
|
- 660: Anguilla (AI/AIA)
|
||||||
|
- 662: Saint Lucia (LC/LCA)
|
||||||
|
- 663: Saint Martin (French part) (MF/MAF)
|
||||||
|
- 666: Saint Pierre and Miquelon (PM/SPM)
|
||||||
|
- 670: Saint Vincent and the Grenadines (VC/VCT)
|
||||||
|
- 674: San Marino (SM/SMR)
|
||||||
|
- 678: Sao Tome and Principe (ST/STP)
|
||||||
|
- 682: Saudi Arabia (SA/SAU)
|
||||||
|
- 686: Senegal (SN/SEN)
|
||||||
|
- 688: Serbia (RS/SRB)
|
||||||
|
- 690: Seychelles (SC/SYC)
|
||||||
|
- 694: Sierra Leone (SL/SLE)
|
||||||
|
- 702: Singapore (SG/SGP)
|
||||||
|
- 703: Slovakia (SK/SVK)
|
||||||
|
- 704: Viet Nam (VN/VNM)
|
||||||
|
- 705: Slovenia (SI/SVN)
|
||||||
|
- 706: Somalia (SO/SOM)
|
||||||
|
- 710: South Africa (ZA/ZAF)
|
||||||
|
- 716: Zimbabwe (ZW/ZWE)
|
||||||
|
- 724: Spain (ES/ESP)
|
||||||
|
- 728: South Sudan (SS/SSD)
|
||||||
|
- 729: Sudan (SD/SDN)
|
||||||
|
- 732: Western Sahara (EH/ESH)
|
||||||
|
- 740: Suriname (SR/SUR)
|
||||||
|
- 744: Svalbard and Jan Mayen (SJ/SJM)
|
||||||
|
- 748: Swaziland (SZ/SWZ)
|
||||||
|
- 752: Sweden (SE/SWE)
|
||||||
|
- 756: Switzerland (CH/CHE)
|
||||||
|
- 760: Syrian Arab Republic (SY/SYR)
|
||||||
|
- 762: Tajikistan (TJ/TJK)
|
||||||
|
- 764: Thailand (TH/THA)
|
||||||
|
- 768: Togo (TG/TGO)
|
||||||
|
- 772: Tokelau (TK/TKL)
|
||||||
|
- 776: Tonga (TO/TON)
|
||||||
|
- 780: Trinidad and Tobago (TT/TTO)
|
||||||
|
- 784: United Arab Emirates (AE/ARE)
|
||||||
|
- 788: Tunisia (TN/TUN)
|
||||||
|
- 792: Turkey (TR/TUR)
|
||||||
|
- 795: Turkmenistan (TM/TKM)
|
||||||
|
- 796: Turks and Caicos Islands (TC/TCA)
|
||||||
|
- 798: Tuvalu (TV/TUV)
|
||||||
|
- 800: Uganda (UG/UGA)
|
||||||
|
- 804: Ukraine (UA/UKR)
|
||||||
|
- 807: Macedonia, the former Yugoslav Republic of (MK/MKD)
|
||||||
|
- 818: Egypt (EG/EGY)
|
||||||
|
- 826: United Kingdom (GB/GBR)
|
||||||
|
- 831: Guernsey (GG/GGY)
|
||||||
|
- 832: Jersey (JE/JEY)
|
||||||
|
- 833: Isle of Man (IM/IMN)
|
||||||
|
- 834: Tanzania, United Republic of (TZ/TZA)
|
||||||
|
- 840: United States (US/USA)
|
||||||
|
- 850: Virgin Islands, U.S. (VI/VIR)
|
||||||
|
- 854: Burkina Faso (BF/BFA)
|
||||||
|
- 858: Uruguay (UY/URY)
|
||||||
|
- 860: Uzbekistan (UZ/UZB)
|
||||||
|
- 862: Venezuela, Bolivarian Republic of (VE/VEN)
|
||||||
|
- 876: Wallis and Futuna (WF/WLF)
|
||||||
|
- 882: Samoa (WS/WSM)
|
||||||
|
- 887: Yemen (YE/YEM)
|
||||||
|
- 894: Zambia (ZM/ZMB)
|
||||||
Meta:
|
Meta:
|
||||||
properties:
|
properties:
|
||||||
pagination:
|
pagination:
|
||||||
|
|
@ -16413,6 +17041,7 @@ components:
|
||||||
type: number
|
type: number
|
||||||
format: integer
|
format: integer
|
||||||
example: '1'
|
example: '1'
|
||||||
|
$ref: '#/components/schemas/CountryType'
|
||||||
custom_value1:
|
custom_value1:
|
||||||
description: 'A custom field for storing additional information'
|
description: 'A custom field for storing additional information'
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -21334,6 +21963,58 @@ components:
|
||||||
```
|
```
|
||||||
example: '1'
|
example: '1'
|
||||||
|
|
||||||
|
PaymentRequest:
|
||||||
|
properties:
|
||||||
|
client_id:
|
||||||
|
description: 'The client hashed id'
|
||||||
|
type: string
|
||||||
|
example: Opnel5aKBz
|
||||||
|
client_contact_id:
|
||||||
|
description: 'The client contact hashed id'
|
||||||
|
type: string
|
||||||
|
example: Opnel5aKBz
|
||||||
|
user_id:
|
||||||
|
description: 'The user hashed id'
|
||||||
|
type: string
|
||||||
|
example: Opnel5aKBz
|
||||||
|
type_id:
|
||||||
|
$ref: '#/components/schemas/PaymentType'
|
||||||
|
date:
|
||||||
|
description: 'The Payment date'
|
||||||
|
type: string
|
||||||
|
example: 1-1-2014
|
||||||
|
transaction_reference:
|
||||||
|
description: 'The transaction reference as defined by the payment gateway'
|
||||||
|
type: string
|
||||||
|
example: xcsSxcs124asd
|
||||||
|
assigned_user_id:
|
||||||
|
description: 'The assigned user hashed id'
|
||||||
|
type: string
|
||||||
|
example: Opnel5aKBz
|
||||||
|
private_notes:
|
||||||
|
description: 'The private notes of the payment'
|
||||||
|
type: string
|
||||||
|
example: 'The payment was refunded due to error'
|
||||||
|
amount:
|
||||||
|
description: 'The amount of this payment'
|
||||||
|
type: number
|
||||||
|
example: 10
|
||||||
|
invoices:
|
||||||
|
description: ''
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/InvoicePaymentable'
|
||||||
|
credits:
|
||||||
|
description: ''
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/CreditPaymentable'
|
||||||
|
number:
|
||||||
|
description: 'The payment number - is a unique alpha numeric number per payment per company'
|
||||||
|
type: string
|
||||||
|
example: PAY_101
|
||||||
|
type: object
|
||||||
|
|
||||||
RecurringQuote:
|
RecurringQuote:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
|
|
|
||||||
|
|
@ -310,47 +310,84 @@
|
||||||
type: object
|
type: object
|
||||||
|
|
||||||
PaymentType:
|
PaymentType:
|
||||||
type: integer
|
type: string
|
||||||
description: |
|
description: The payment type used to complete this payment
|
||||||
The payment type used to complete this payment:
|
example: "1"
|
||||||
- 4: ACH
|
enum:
|
||||||
- 27: Alipay
|
- "1"
|
||||||
- 7: American Express
|
- "2"
|
||||||
- 1: Bank Transfer
|
- "3"
|
||||||
- 16: Carte Blanche
|
- "4"
|
||||||
- 2: Cash
|
- "5"
|
||||||
- 15: Check
|
- "6"
|
||||||
- 32: Credit
|
- "7"
|
||||||
- 12: Credit Card Other
|
- "8"
|
||||||
- 31: Cryptocurrency
|
- "9"
|
||||||
- 3: Debit
|
- "10"
|
||||||
- 9: Diners Card
|
- "11"
|
||||||
- 8: Discover Card
|
- "12"
|
||||||
- 10: EuroCard
|
- "13"
|
||||||
- 30: GoCardless
|
- "14"
|
||||||
- 14: Google Wallet
|
- "15"
|
||||||
- 18: JCB
|
- "16"
|
||||||
- 19: Laser
|
- "17"
|
||||||
- 20: Maestro
|
- "18"
|
||||||
- 6: MasterCard
|
- "19"
|
||||||
- 26: Money Order
|
- "20"
|
||||||
- 11: Nova
|
- "21"
|
||||||
- 13: PayPal
|
- "22"
|
||||||
- 29: SEPA Direct Debit
|
- "23"
|
||||||
- 28: Sofort
|
- "24"
|
||||||
- 21: Solo
|
- "25"
|
||||||
- 24: Swish
|
- "26"
|
||||||
- 22: Switch
|
- "27"
|
||||||
- 17: UnionPay
|
- "28"
|
||||||
- 25: Venmo
|
- "29"
|
||||||
- 5: Visa Card
|
- "30"
|
||||||
- 33: Zelle
|
- "31"
|
||||||
- 23: iZettle
|
- "32"
|
||||||
|
- "33"
|
||||||
|
x-enumDescriptions:
|
||||||
|
"1": Bank Transfer
|
||||||
|
"2": Cash
|
||||||
|
"3": Debit
|
||||||
|
"4": ACH
|
||||||
|
"5": Visa Card
|
||||||
|
"6": MasterCard
|
||||||
|
"7": American Express
|
||||||
|
"8": Discover Card
|
||||||
|
"9": Diners Card
|
||||||
|
"10": EuroCard
|
||||||
|
"11": Nova
|
||||||
|
"12": Credit Card Other
|
||||||
|
"13": PayPal
|
||||||
|
"14": Google Wallet
|
||||||
|
"15": Check
|
||||||
|
"16": Carte Blanche
|
||||||
|
"17": UnionPay
|
||||||
|
"18": JCB
|
||||||
|
"19": Laser
|
||||||
|
"20": Maestro
|
||||||
|
"21": Solo
|
||||||
|
"22": Switch
|
||||||
|
"23": iZettle
|
||||||
|
"24": Swish
|
||||||
|
"25": Venmo
|
||||||
|
"26": Money Order
|
||||||
|
"27": Alipay
|
||||||
|
"28": Sofort
|
||||||
|
"29": SEPA Direct Debit
|
||||||
|
"30": GoCardless
|
||||||
|
"31": Cryptocurrency
|
||||||
|
"32": Credit
|
||||||
|
"33": Zelle
|
||||||
|
|
||||||
CurrencyType:
|
CurrencyType:
|
||||||
type: integer
|
oneOf:
|
||||||
|
- type: integer
|
||||||
|
title: "Currency Types"
|
||||||
description: |
|
description: |
|
||||||
The currency type used to complete this payment:
|
Available currency types:
|
||||||
- 1: US Dollar
|
- 1: US Dollar
|
||||||
- 2: British Pound
|
- 2: British Pound
|
||||||
- 3: Euro
|
- 3: Euro
|
||||||
|
|
@ -495,9 +532,11 @@
|
||||||
- 142: Samoan Tala
|
- 142: Samoan Tala
|
||||||
|
|
||||||
LanguageType:
|
LanguageType:
|
||||||
type: integer
|
oneOf:
|
||||||
|
- type: integer
|
||||||
|
title: "Language Types"
|
||||||
description: |
|
description: |
|
||||||
The language type used to complete this payment:
|
Available language types:
|
||||||
- 1: English - United States
|
- 1: English - United States
|
||||||
- 2: Italian
|
- 2: Italian
|
||||||
- 3: German
|
- 3: German
|
||||||
|
|
@ -542,9 +581,11 @@
|
||||||
- 42: Vietnamese
|
- 42: Vietnamese
|
||||||
|
|
||||||
TimezoneType:
|
TimezoneType:
|
||||||
type: integer
|
oneOf:
|
||||||
|
- type: integer
|
||||||
|
title: "Timezone Types"
|
||||||
description: |
|
description: |
|
||||||
The timezone type used to complete this payment:
|
Available timezone types:
|
||||||
- 1: Pacific/Midway
|
- 1: Pacific/Midway
|
||||||
- 2: Pacific/Pago_Pago
|
- 2: Pacific/Pago_Pago
|
||||||
- 3: Pacific/Honolulu
|
- 3: Pacific/Honolulu
|
||||||
|
|
@ -661,9 +702,11 @@
|
||||||
- 115: Asia/Dubai
|
- 115: Asia/Dubai
|
||||||
|
|
||||||
CountryType:
|
CountryType:
|
||||||
type: integer
|
oneOf:
|
||||||
|
- type: integer
|
||||||
|
title: "Country Types"
|
||||||
description: |
|
description: |
|
||||||
The country id constants available:
|
Available country types:
|
||||||
- 4: Afghanistan (AF/AFG)
|
- 4: Afghanistan (AF/AFG)
|
||||||
- 8: Albania (AL/ALB)
|
- 8: Albania (AL/ALB)
|
||||||
- 10: Antarctica (AQ/ATA)
|
- 10: Antarctica (AQ/ATA)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
PaymentRequest:
|
||||||
|
properties:
|
||||||
|
client_id:
|
||||||
|
description: 'The client hashed id'
|
||||||
|
type: string
|
||||||
|
example: Opnel5aKBz
|
||||||
|
client_contact_id:
|
||||||
|
description: 'The client contact hashed id'
|
||||||
|
type: string
|
||||||
|
example: Opnel5aKBz
|
||||||
|
user_id:
|
||||||
|
description: 'The user hashed id'
|
||||||
|
type: string
|
||||||
|
example: Opnel5aKBz
|
||||||
|
type_id:
|
||||||
|
$ref: '#/components/schemas/PaymentType'
|
||||||
|
date:
|
||||||
|
description: 'The Payment date'
|
||||||
|
type: string
|
||||||
|
example: 1-1-2014
|
||||||
|
transaction_reference:
|
||||||
|
description: 'The transaction reference as defined by the payment gateway'
|
||||||
|
type: string
|
||||||
|
example: xcsSxcs124asd
|
||||||
|
assigned_user_id:
|
||||||
|
description: 'The assigned user hashed id'
|
||||||
|
type: string
|
||||||
|
example: Opnel5aKBz
|
||||||
|
private_notes:
|
||||||
|
description: 'The private notes of the payment'
|
||||||
|
type: string
|
||||||
|
example: 'The payment was refunded due to error'
|
||||||
|
amount:
|
||||||
|
description: 'The amount of this payment'
|
||||||
|
type: number
|
||||||
|
example: 10
|
||||||
|
invoices:
|
||||||
|
description: ''
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/InvoicePaymentable'
|
||||||
|
credits:
|
||||||
|
description: ''
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/CreditPaymentable'
|
||||||
|
number:
|
||||||
|
description: 'The payment number - is a unique alpha numeric number per payment per company'
|
||||||
|
type: string
|
||||||
|
example: PAY_101
|
||||||
|
type: object
|
||||||
|
|
||||||
|
|
@ -84,6 +84,25 @@
|
||||||
- payments
|
- payments
|
||||||
summary: "Create payment"
|
summary: "Create payment"
|
||||||
description: "Adds an Payment to the system"
|
description: "Adds an Payment to the system"
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: php
|
||||||
|
label: php
|
||||||
|
source: |
|
||||||
|
$ninja = new InvoiceNinja("YOUR-TOKEN");
|
||||||
|
|
||||||
|
$payment = $ninja->payments->create([
|
||||||
|
'client_id' => 'x2fd23',
|
||||||
|
'amount' => 100,
|
||||||
|
'date' => '2021-01-01',
|
||||||
|
'transaction_reference' => '1234567890',
|
||||||
|
'type_id' => 1,
|
||||||
|
'invoices' => [
|
||||||
|
[
|
||||||
|
'invoice_id' => 'jd78Dhjs',
|
||||||
|
'amount' => 100,
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]);
|
||||||
operationId: storePayment
|
operationId: storePayment
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||||
|
|
@ -97,12 +116,12 @@
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
requestBody:
|
requestBody:
|
||||||
description: "The payment request"
|
description: "The payment request can be as simple as a client id and amount, or as complex as a full payment with invoices and associated credits that should be applied."
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/Payment"
|
$ref: "#/components/schemas/PaymentRequest"
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "Returns the saved Payment object"
|
description: "Returns the saved Payment object"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue