# Authorize transaction POST https://api-sandbox.payabli.com/api/v2/MoneyIn/authorize Content-Type: application/json Authorize a card transaction. This returns an authorization code and reserves funds for the merchant. Authorized transactions aren't flagged for settlement until captured. This is the v2 version of the `api/MoneyIn/authorize` endpoint, and returns the unified response format. See [Pay In unified response codes reference](/guides/pay-in-unified-response-codes-reference) for more information. **Note**: Only card transactions can be authorized. This endpoint can't be used for ACH transactions. Reference: https://docs.payabli.com/developers/api-reference/moneyinV2/authorize-a-transaction ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Authorize card transaction (v2) version: endpoint_moneyIn.authorizev2 paths: /v2/MoneyIn/authorize: post: operationId: authorizev-2 summary: Authorize card transaction (v2) description: >- Authorize a card transaction. This returns an authorization code and reserves funds for the merchant. Authorized transactions aren't flagged for settlement until captured. This is the v2 version of the `api/MoneyIn/authorize` endpoint, and returns the unified response format. See [Pay In unified response codes reference](/guides/pay-in-unified-response-codes-reference) for more information. **Note**: Only card transactions can be authorized. This endpoint can't be used for ACH transactions. tags: - - subpackage_moneyIn parameters: - name: forceCustomerCreation in: query required: false schema: $ref: '#/components/schemas/type_:ForceCustomerCreation' - name: requestToken in: header required: true schema: type: string - name: idempotencyKey in: header required: false schema: $ref: '#/components/schemas/type_:IdempotencyKey' responses: '201': description: Ok content: application/json: schema: $ref: >- #/components/schemas/type___v2moneyInTypes__:V2TransactionResponseWrapper '400': description: >- Bad request error for v2 Money In auth endpoint (HTTP 400). Returned when request validation fails. Follows RFC 7807 Problem Details format with Payabli-specific unified response codes. See the [Pay In unified response codes reference](/developers/references/pay-in-unified-response-codes-reference) for the complete list of codes. content: {} '401': description: Unauthorized request. content: {} '402': description: >- Auth or sale decline error for v2 Money In endpoints (HTTP 402). Returned when an authorization or sale operation is declined for a transaction. Uses unified response codes starting with 'D'. See the [Pay In unified response codes reference](/guides/pay-in-unified-response-codes-reference) for the complete list of codes. content: {} '500': description: >- Internal server error for v2 Money In endpoints (HTTP 500). Returned when an unexpected error occurs. Follows RFC 7807 Problem Details format. content: {} requestBody: content: application/json: schema: $ref: '#/components/schemas/type_moneyIn:TransRequestBody' components: schemas: type_:ForceCustomerCreation: type: boolean type_:IdempotencyKey: type: string type_:Accountid: type: string type_:AdditionalData: type: object additionalProperties: type: object additionalProperties: description: Any type type_:BillingAddressNullable: type: string type_:BillingAddressAddtlNullable: type: string type_:BillingCityNullable: type: string type_:BillingCountryNullable: type: string type_:Email: type: string format: email type_:PhoneNumber: type: string type_:BillingStateNullable: type: string type_:BillingZip: type: string type_:CustomerId: type: integer format: int64 type_:CustomerNumberNullable: type: string type_:Identifierfields: type: array items: type: string type_:Shippingaddress: type: string type_:Shippingaddressadditional: type: string type_:Shippingcity: type: string type_:Shippingcountry: type: string type_:Shippingstate: type: string type_:Shippingzip: type: string type_:PayorDataRequest: type: object properties: additionalData: $ref: '#/components/schemas/type_:AdditionalData' billingAddress1: $ref: '#/components/schemas/type_:BillingAddressNullable' billingAddress2: $ref: '#/components/schemas/type_:BillingAddressAddtlNullable' billingCity: $ref: '#/components/schemas/type_:BillingCityNullable' billingCountry: $ref: '#/components/schemas/type_:BillingCountryNullable' billingEmail: $ref: '#/components/schemas/type_:Email' billingPhone: $ref: '#/components/schemas/type_:PhoneNumber' billingState: $ref: '#/components/schemas/type_:BillingStateNullable' billingZip: $ref: '#/components/schemas/type_:BillingZip' description: >- Customer's billing ZIP code. For Pay In functions, this field supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian postal codes. For example: "37615-1234" or "37615". company: type: string description: Customer's company name. customerId: $ref: '#/components/schemas/type_:CustomerId' customerNumber: $ref: '#/components/schemas/type_:CustomerNumberNullable' firstName: type: string description: Customer/Payor first name. identifierFields: $ref: '#/components/schemas/type_:Identifierfields' lastName: type: string description: Customer/Payor last name. shippingAddress1: $ref: '#/components/schemas/type_:Shippingaddress' shippingAddress2: $ref: '#/components/schemas/type_:Shippingaddressadditional' shippingCity: $ref: '#/components/schemas/type_:Shippingcity' shippingCountry: $ref: '#/components/schemas/type_:Shippingcountry' shippingState: $ref: '#/components/schemas/type_:Shippingstate' shippingZip: $ref: '#/components/schemas/type_:Shippingzip' type_:Entrypointfield: type: string type_:AdditionalDataMap: type: object additionalProperties: type: string type_:FileContentFtype: type: string enum: - value: pdf - value: doc - value: docx - value: jpg - value: jpeg - value: png - value: gif - value: txt type_:FileContent: type: object properties: fContent: type: string description: >- Content of file, Base64-encoded. Ignored if furl is specified. Max upload size is 30 MB. filename: type: string description: The name of the attached file. ftype: $ref: '#/components/schemas/type_:FileContentFtype' description: The MIME type of the file (if content is provided) furl: type: string description: Optional URL provided to show or download the file remotely type_:Attachments: type: array items: $ref: '#/components/schemas/type_:FileContent' type_:Discount: type: number format: double type_:DutyAmount: type: number format: double type_:FreightAmount: type: number format: double type_:Frequency: type: string enum: - value: onetime - value: weekly - value: every2weeks - value: every6months - value: monthly - value: every3months - value: annually type_:InvoiceAmount: type: number format: double type_:Datenullable: type: string format: date type_:InvoiceNumber: type: string type_:Invoicestatus: type: integer type_:InvoiceType: type: integer type_:ItemCommodityCode: type: string type_:ItemDescription: type: string type_:ItemProductCode: type: string type_:ItemProductName: type: string type_:ItemUnitofMeasure: type: string type_:BillItem: type: object properties: itemCategories: type: array items: type: string description: Array of tags classifying item or product. itemCommodityCode: $ref: '#/components/schemas/type_:ItemCommodityCode' itemCost: type: number format: double description: Item or product price per unit. itemDescription: $ref: '#/components/schemas/type_:ItemDescription' itemMode: type: integer description: >- Internal class of item or product: value '0' is only for invoices , '1' for bills and, '2' common for both. itemProductCode: $ref: '#/components/schemas/type_:ItemProductCode' itemProductName: $ref: '#/components/schemas/type_:ItemProductName' itemQty: type: integer description: Quantity of item or product. itemTaxAmount: type: number format: double description: Tax amount applied to item or product. itemTaxRate: type: number format: double description: Tax rate applied to item or product. itemTotalAmount: type: number format: double description: Total amount in item or product. itemUnitOfMeasure: $ref: '#/components/schemas/type_:ItemUnitofMeasure' required: - itemCost type_:BillDataPaymentTerms: type: string enum: - value: PIA - value: CIA - value: UR - value: NET10 - value: NET20 - value: NET30 - value: NET45 - value: NET60 - value: NET90 - value: EOM - value: MFI - value: 5MFI - value: 10MFI - value: 15MFI - value: 20MFI - value: 2/10NET30 - value: UF - value: 10UF - value: 20UF - value: 25UF - value: 50UF type_:PurchaseOrder: type: string type_:ShippingFromZip: type: string type_:SummaryCommodityCode: type: string type_:Tax: type: number format: double type_:TermsConditions: type: string type_:BillData: type: object properties: AdditionalData: $ref: '#/components/schemas/type_:AdditionalDataMap' attachments: $ref: '#/components/schemas/type_:Attachments' company: type: string description: Company name of the recipient of the invoice. discount: $ref: '#/components/schemas/type_:Discount' dutyAmount: $ref: '#/components/schemas/type_:DutyAmount' firstName: type: string description: First name of the recipient of the invoice. freightAmount: $ref: '#/components/schemas/type_:FreightAmount' frequency: $ref: '#/components/schemas/type_:Frequency' description: Frequency of scheduled invoice. invoiceAmount: $ref: '#/components/schemas/type_:InvoiceAmount' invoiceDate: $ref: '#/components/schemas/type_:Datenullable' description: 'Invoice date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.' invoiceDueDate: $ref: '#/components/schemas/type_:Datenullable' description: >- Invoice due date in one of the accepted formats: YYYY-MM-DD, MM/DD/YYYY. invoiceEndDate: $ref: '#/components/schemas/type_:Datenullable' description: >- Indicate the date to finish a scheduled invoice cycle (`invoiceType`` = 1) in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY. invoiceNumber: $ref: '#/components/schemas/type_:InvoiceNumber' description: Invoice number. Identifies the invoice under a paypoint. invoiceStatus: $ref: '#/components/schemas/type_:Invoicestatus' invoiceType: $ref: '#/components/schemas/type_:InvoiceType' items: type: array items: $ref: '#/components/schemas/type_:BillItem' description: Array of line items included in the invoice. lastName: type: string description: Last name of the recipient of the invoice. notes: type: string description: Notes included in the invoice. paymentTerms: $ref: '#/components/schemas/type_:BillDataPaymentTerms' purchaseOrder: $ref: '#/components/schemas/type_:PurchaseOrder' shippingAddress1: $ref: '#/components/schemas/type_:Shippingaddress' shippingAddress2: $ref: '#/components/schemas/type_:Shippingaddressadditional' shippingCity: $ref: '#/components/schemas/type_:Shippingcity' shippingCountry: $ref: '#/components/schemas/type_:Shippingcountry' shippingEmail: $ref: '#/components/schemas/type_:Email' description: Shipping recipient's contact email address. shippingFromZip: $ref: '#/components/schemas/type_:ShippingFromZip' shippingPhone: type: string description: Recipient phone number. shippingState: $ref: '#/components/schemas/type_:Shippingstate' shippingZip: $ref: '#/components/schemas/type_:Shippingzip' summaryCommodityCode: $ref: '#/components/schemas/type_:SummaryCommodityCode' tax: $ref: '#/components/schemas/type_:Tax' termsConditions: $ref: '#/components/schemas/type_:TermsConditions' type_:IpAddress: type: string type_:Orderdescription: type: string type_:OrderId: type: string type_:PaymentCategories: type: object properties: amount: type: number format: double description: Price/cost per unit of item or category. description: type: string description: Description of item or category label: type: string description: Name of item or category. qty: type: integer default: 1 description: Quantity of item or category required: - amount - label type_:SplitFundingContent: type: object properties: accountId: type: string description: The accountId for the account the split should be sent to. amount: type: number format: double description: Amount from the transaction to sent to this recipient. description: type: string description: A description for the split. recipientEntryPoint: type: string description: The entrypoint the split should be sent to. type_:SplitFunding: type: array items: $ref: '#/components/schemas/type_:SplitFundingContent' type_:PaymentDetail: type: object properties: categories: type: array items: $ref: '#/components/schemas/type_:PaymentCategories' description: >- Array of payment categories/line items describing the amount to be paid. **Note**: These categories are for information only and aren't validated against the total amount provided. checkImage: type: object additionalProperties: description: Any type description: Object containing image of paper check. checkNumber: type: string description: >- A check number to be used in the ach transaction. **Required** for payment method = 'check'. currency: type: string description: >- The currency for the transaction, `USD` or `CAD`. If your paypoint is configured for CAD, you must send the `CAD` value in this field, otherwise it defaults to USD, which will cause the transaction to fail. serviceFee: type: number format: double description: >- Service fee to be deducted from the total amount. This amount must be a number, percentages aren't accepted. If you are using a percentage-based fee schedule, you must calculate the value manually. splitFunding: $ref: '#/components/schemas/type_:SplitFunding' description: >- Split funding instructions for the transaction. See [Split a Transaction](/developers/developer-guides/money-in-split-funding) for more. totalAmount: type: number format: double description: >- Total amount to be charged. If a service fee is sent, then this amount should include the service fee." required: - totalAmount type_:Cardcvv: type: string type_:Cardexp: type: string type_:Cardholder: type: string type_:Cardnumber: type: string type_:Cardzip: type: string type_:Initiator: type: string type_:SaveIfSuccess: type: boolean type_:PayMethodCredit: type: object properties: cardcvv: $ref: '#/components/schemas/type_:Cardcvv' cardexp: $ref: '#/components/schemas/type_:Cardexp' cardHolder: $ref: '#/components/schemas/type_:Cardholder' cardnumber: $ref: '#/components/schemas/type_:Cardnumber' cardzip: $ref: '#/components/schemas/type_:Cardzip' initiator: $ref: '#/components/schemas/type_:Initiator' method: type: string enum: - type: stringLiteral value: card description: >- Method to use for the transaction. For transactions with a credit or debit card, or a tokenized card, use `card`. saveIfSuccess: $ref: '#/components/schemas/type_:SaveIfSuccess' required: - cardexp - cardnumber - method type_:Achaccount: type: string type_:Achaccounttype: type: string enum: - value: Checking - value: Savings type_:AchSecCode: type: string type_:AchHolder: type: string type_:AchHolderType: type: string enum: - value: personal - value: business default: personal type_:Achrouting: type: string type_:Device: type: string type_:PayMethodACH: type: object properties: achAccount: $ref: '#/components/schemas/type_:Achaccount' description: Bank account number. This field is **required** when method = 'ach'. achAccountType: $ref: '#/components/schemas/type_:Achaccounttype' description: Bank account type. This field is **required** when method = 'ach'. achCode: $ref: '#/components/schemas/type_:AchSecCode' achHolder: $ref: '#/components/schemas/type_:AchHolder' achHolderType: $ref: '#/components/schemas/type_:AchHolderType' achRouting: $ref: '#/components/schemas/type_:Achrouting' description: >- ABA/routing number of bank account. This field is **required** when method = 'ach'. device: $ref: '#/components/schemas/type_:Device' method: type: string enum: - type: stringLiteral value: ach required: - achAccount - achHolder - achRouting - method type_:PayMethodStoredMethodMethod: type: string enum: - value: card - value: ach type_:Storedmethodid: type: string type_:StoredMethodUsageType: type: string type_:PayMethodStoredMethod: type: object properties: initiator: $ref: '#/components/schemas/type_:Initiator' method: $ref: '#/components/schemas/type_:PayMethodStoredMethodMethod' description: >- Method to use for the transaction. Use either `card` or `ach`, depending on what kind of method was tokenized to use a saved payment method for this transaction. storedMethodId: $ref: '#/components/schemas/type_:Storedmethodid' description: Payabli identifier of a tokenized payment method. storedMethodUsageType: $ref: '#/components/schemas/type_:StoredMethodUsageType' required: - method type_:PayMethodCloud: type: object properties: device: $ref: '#/components/schemas/type_:Device' method: type: string enum: - type: stringLiteral value: cloud description: >- Method to use for the transaction. For cloud device transactions, the method is `cloud`. saveIfSuccess: $ref: '#/components/schemas/type_:SaveIfSuccess' required: - method type_:Check: type: object properties: achHolder: $ref: '#/components/schemas/type_:AchHolder' description: The checking accountholder's name. method: type: string enum: - type: stringLiteral value: check description: >- Method to use for the transaction. Use `check` for a paper check transaction. When the method is `check`, then `paymentDetails.checkNumber` is required. required: - achHolder - method type_:Cash: type: object properties: method: type: string enum: - type: stringLiteral value: cash description: >- Method to use for the transaction. For cash transactions, use `cash`. required: - method type_:Methodall: type: string enum: - value: card - value: ach - value: cloud - value: check - value: cash type_:PayMethodBodyAllFields: type: object properties: achAccount: $ref: '#/components/schemas/type_:Achaccount' description: Bank account number. This field is **required** when method = 'ach'. achAccountType: $ref: '#/components/schemas/type_:Achaccounttype' achCode: $ref: '#/components/schemas/type_:AchSecCode' achHolder: $ref: '#/components/schemas/type_:AchHolder' achRouting: $ref: '#/components/schemas/type_:Achrouting' description: >- ABA/routing number of Bank account. This field is **required** when method = 'ach'. cardcvv: $ref: '#/components/schemas/type_:Cardcvv' cardexp: $ref: '#/components/schemas/type_:Cardexp' cardHolder: $ref: '#/components/schemas/type_:Cardholder' cardnumber: $ref: '#/components/schemas/type_:Cardnumber' cardzip: $ref: '#/components/schemas/type_:Cardzip' device: $ref: '#/components/schemas/type_:Device' initator: $ref: '#/components/schemas/type_:Initiator' method: $ref: '#/components/schemas/type_:Methodall' saveIfSuccess: $ref: '#/components/schemas/type_:SaveIfSuccess' storedMethodId: $ref: '#/components/schemas/type_:Storedmethodid' storedMethodUsageType: $ref: '#/components/schemas/type_:StoredMethodUsageType' required: - achAccount - achHolder - achRouting type_:PaymentMethod: oneOf: - $ref: '#/components/schemas/type_:PayMethodCredit' - $ref: '#/components/schemas/type_:PayMethodACH' - $ref: '#/components/schemas/type_:PayMethodStoredMethod' - $ref: '#/components/schemas/type_:PayMethodCloud' - $ref: '#/components/schemas/type_:Check' - $ref: '#/components/schemas/type_:Cash' - $ref: '#/components/schemas/type_:PayMethodBodyAllFields' type_:Source: type: string type_:Subdomain: type: string type_:Subscriptionid: type: integer format: int64 type_moneyIn:TransRequestBody: type: object properties: accountId: $ref: '#/components/schemas/type_:Accountid' customerData: $ref: '#/components/schemas/type_:PayorDataRequest' description: >- Object describing the Customer/Payor. Which fields are required depends on the paypoint's custom identifier settings. entryPoint: $ref: '#/components/schemas/type_:Entrypointfield' invoiceData: $ref: '#/components/schemas/type_:BillData' description: Object describing an Invoice linked to the transaction. ipaddress: $ref: '#/components/schemas/type_:IpAddress' orderDescription: $ref: '#/components/schemas/type_:Orderdescription' orderId: $ref: '#/components/schemas/type_:OrderId' paymentDetails: $ref: '#/components/schemas/type_:PaymentDetail' description: Object describing details of the payment. Required. paymentMethod: $ref: '#/components/schemas/type_:PaymentMethod' description: >- Information about the payment method for the transaction. Required and recommended fields for each payment method type are described in each schema below. source: $ref: '#/components/schemas/type_:Source' subdomain: $ref: '#/components/schemas/type_:Subdomain' subscriptionId: $ref: '#/components/schemas/type_:Subscriptionid' required: - paymentDetails - paymentMethod type___v2moneyInTypes__:V2ResponseCode: type: string type___v2moneyInTypes__:V2ResponseReason: type: string type___v2moneyInTypes__:V2ResponseExplanation: type: string type___v2moneyInTypes__:V2ResponseAction: type: string type_:OrgParentName: type: string type_:Dbaname: type: string type_:Legalname: type: string type_:ExternalProcessorInformation: type: string type_:BatchNumber: type: string type_:PayorId: type: integer format: int64 type_:Maskedaccount: type: string type_:Accounttype: type: string type_:Accountexp: type: string type_:Holdername: type: string type_:Sequence: type: string type_:Signaturedata: type: string type_:BinData: type: object properties: binMatchedLength: type: string description: |- The number of characters from the beginning of the card number that were matched against a Bank Identification Number (BIN) or the Card Range table. binCardBrand: type: string description: |- The card brand. For example, Visa, Mastercard, American Express, Discover. binCardType: type: string description: 'The type of card: Credit or Debit.' binCardCategory: type: string description: >- The category of the card, which indicates the card product. For example: Standard, Gold, Platinum, etc. The binCardCategory for prepaid cards is marked `PREPAID`. binCardIssuer: type: string description: The name of the financial institution that issued the card. binCardIssuerCountry: type: string description: The issuing financial institution's country name. binCardIssuerCountryCodeA2: type: string description: >- The issuing financial institution's two-character ISO country code. See [this resource](https://www.iso.org/obp/ui/#search) for a list of codes. binCardIssuerCountryNumber: type: string description: >- The issuing financial institution's ISO standard numeric country code. See [this resource](https://www.iso.org/obp/ui/#search) for a list of codes. binCardIsRegulated: type: string description: Indicates whether the card is regulated. binCardUseCategory: type: string description: The use category classification for the card. binCardIssuerCountryCodeA3: type: string description: >- The issuing financial institution's three-character ISO country code. See [this resource](https://www.iso.org/obp/ui/#search) for a list of codes. type_moneyIn:TransactionDetailPaymentDetails: type: object properties: totalAmount: type: number format: double serviceFee: type: number format: double checkNumber: type: - string - 'null' checkImage: oneOf: - description: Any type - type: 'null' checkUniqueId: type: string currency: type: string orderDescription: oneOf: - $ref: '#/components/schemas/type_:Orderdescription' - type: 'null' orderId: oneOf: - $ref: '#/components/schemas/type_:OrderId' - type: 'null' orderIdAlternative: type: - string - 'null' paymentDescription: type: - string - 'null' groupNumber: type: - string - 'null' source: oneOf: - $ref: '#/components/schemas/type_:Source' - type: 'null' payabliTransId: type: - string - 'null' unbundled: oneOf: - description: Any type - type: 'null' categories: type: array items: description: Any type splitFunding: type: array items: description: Any type required: - totalAmount - serviceFee - checkNumber - checkImage - checkUniqueId - currency - orderDescription - orderId - orderIdAlternative - paymentDescription - groupNumber - source - payabliTransId - unbundled - categories - splitFunding type_moneyIn:TransactionDetailPaymentData: type: object properties: maskedAccount: $ref: '#/components/schemas/type_:Maskedaccount' accountType: $ref: '#/components/schemas/type_:Accounttype' accountExp: oneOf: - $ref: '#/components/schemas/type_:Accountexp' - type: 'null' holderName: $ref: '#/components/schemas/type_:Holdername' storedId: oneOf: - $ref: '#/components/schemas/type_:Storedmethodid' - type: 'null' initiator: oneOf: - $ref: '#/components/schemas/type_:Initiator' - type: 'null' storedMethodUsageType: oneOf: - $ref: '#/components/schemas/type_:StoredMethodUsageType' - type: 'null' sequence: oneOf: - $ref: '#/components/schemas/type_:Sequence' - type: 'null' orderDescription: $ref: '#/components/schemas/type_:Orderdescription' accountId: oneOf: - $ref: '#/components/schemas/type_:Accountid' - type: 'null' signatureData: oneOf: - $ref: '#/components/schemas/type_:Signaturedata' - type: 'null' binData: oneOf: - $ref: '#/components/schemas/type_:BinData' - type: 'null' paymentDetails: $ref: '#/components/schemas/type_moneyIn:TransactionDetailPaymentDetails' required: - maskedAccount - accountType - accountExp - holderName - storedId - initiator - storedMethodUsageType - sequence - orderDescription - accountId - signatureData - binData - paymentDetails type_:TransStatus: type: integer type_:PaypointId: type: integer format: int64 type_:FeeAmount: type: number format: double type_:SettlementStatus: type: integer type_:Operation: type: string type_:ResultCodev2: type: string type_:ResultCodeText: type: string type_:Resulttext: type: string type_:Authcode: type: string type_:AvsResponse: type: string type_:AvsResponseText: type: string type_:CvvResponse: type: string type_:CvvResponseText: type: string type_:CustomerVaultId: type: string type_:EmvAuthResponseData: type: string type___v2moneyInTypes__:V2TransactionDetailResponseData: type: object properties: resultCode: $ref: '#/components/schemas/type_:ResultCodev2' resultCodeText: $ref: '#/components/schemas/type_:ResultCodeText' response: type: - string - 'null' responsetext: $ref: '#/components/schemas/type_:Resulttext' authcode: oneOf: - $ref: '#/components/schemas/type_:Authcode' - type: 'null' transactionid: type: string description: >- Unique identifier for the transaction assigned by the payment processor. avsresponse: oneOf: - $ref: '#/components/schemas/type_:AvsResponse' - type: 'null' avsresponse_text: oneOf: - $ref: '#/components/schemas/type_:AvsResponseText' - type: 'null' cvvresponse: oneOf: - $ref: '#/components/schemas/type_:CvvResponse' - type: 'null' cvvresponse_text: oneOf: - $ref: '#/components/schemas/type_:CvvResponseText' - type: 'null' orderid: oneOf: - $ref: '#/components/schemas/type_:OrderId' - type: 'null' type: type: - string - 'null' response_code: type: string description: Processor-specific response code. response_code_text: type: string description: Description of the response code. customer_vault_id: oneOf: - $ref: '#/components/schemas/type_:CustomerVaultId' - type: 'null' emv_auth_response_data: oneOf: - $ref: '#/components/schemas/type_:EmvAuthResponseData' - type: 'null' required: - resultCode - resultCodeText - response - responsetext - authcode - transactionid - avsresponse - avsresponse_text - cvvresponse - cvvresponse_text - orderid - type - response_code - response_code_text - customer_vault_id - emv_auth_response_data type_:Orgid: type: integer format: int64 type_:RefundId: type: integer format: int64 type_:ReturnedId: type: integer format: int64 type_:ChargebackId: type: integer format: int64 type_:RetrievalId: type: integer format: int64 type_:AdditionalDataString: type: string type_moneyIn:TransactionDetailInvoiceData: type: object properties: invoiceNumber: oneOf: - $ref: '#/components/schemas/type_:InvoiceNumber' - type: 'null' invoiceDate: oneOf: - $ref: '#/components/schemas/type_:Datenullable' - type: 'null' invoiceDueDate: oneOf: - $ref: '#/components/schemas/type_:Datenullable' - type: 'null' invoiceEndDate: oneOf: - $ref: '#/components/schemas/type_:Datenullable' - type: 'null' invoiceStatus: oneOf: - $ref: '#/components/schemas/type_:Invoicestatus' - type: 'null' invoiceType: oneOf: - $ref: '#/components/schemas/type_:InvoiceType' - type: 'null' frequency: oneOf: - $ref: '#/components/schemas/type_:Frequency' - type: 'null' paymentTerms: type: - string - 'null' termsConditions: oneOf: - $ref: '#/components/schemas/type_:TermsConditions' - type: 'null' notes: type: - string - 'null' tax: oneOf: - $ref: '#/components/schemas/type_:Tax' - type: 'null' discount: oneOf: - $ref: '#/components/schemas/type_:Discount' - type: 'null' invoiceAmount: oneOf: - $ref: '#/components/schemas/type_:InvoiceAmount' - type: 'null' freightAmount: oneOf: - $ref: '#/components/schemas/type_:FreightAmount' - type: 'null' dutyAmount: oneOf: - $ref: '#/components/schemas/type_:DutyAmount' - type: 'null' purchaseOrder: oneOf: - $ref: '#/components/schemas/type_:PurchaseOrder' - type: 'null' firstName: type: - string - 'null' lastName: type: - string - 'null' company: type: - string - 'null' shippingAddress1: oneOf: - $ref: '#/components/schemas/type_:Shippingaddress' - type: 'null' shippingAddress2: oneOf: - $ref: '#/components/schemas/type_:Shippingaddressadditional' - type: 'null' shippingCity: oneOf: - $ref: '#/components/schemas/type_:Shippingcity' - type: 'null' shippingState: oneOf: - $ref: '#/components/schemas/type_:Shippingstate' - type: 'null' shippingZip: oneOf: - $ref: '#/components/schemas/type_:Shippingzip' - type: 'null' shippingCountry: oneOf: - $ref: '#/components/schemas/type_:Shippingcountry' - type: 'null' shippingEmail: oneOf: - $ref: '#/components/schemas/type_:Email' - type: 'null' shippingPhone: type: - string - 'null' shippingFromZip: oneOf: - $ref: '#/components/schemas/type_:ShippingFromZip' - type: 'null' summaryCommodityCode: oneOf: - $ref: '#/components/schemas/type_:SummaryCommodityCode' - type: 'null' items: type: - array - 'null' items: $ref: '#/components/schemas/type_:BillItem' attachments: oneOf: - $ref: '#/components/schemas/type_:Attachments' - type: 'null' additionalData: oneOf: - $ref: '#/components/schemas/type_:AdditionalDataString' - type: 'null' required: - invoiceNumber - invoiceDate - invoiceDueDate - invoiceEndDate - invoiceStatus - invoiceType - frequency - paymentTerms - termsConditions - notes - tax - discount - invoiceAmount - freightAmount - dutyAmount - purchaseOrder - firstName - lastName - company - shippingAddress1 - shippingAddress2 - shippingCity - shippingState - shippingZip - shippingCountry - shippingEmail - shippingPhone - shippingFromZip - summaryCommodityCode - items - attachments - additionalData type_:EntrypageId: type: integer format: int64 type_:ExternalPaypointId: type: string type_:CustomerStatus: type: integer type_moneyIn:TransactionDetailCustomer: type: object properties: identifiers: oneOf: - $ref: '#/components/schemas/type_:Identifierfields' - type: 'null' firstName: type: string lastName: type: string companyName: type: string billingAddress1: $ref: '#/components/schemas/type_:BillingAddressNullable' billingAddress2: $ref: '#/components/schemas/type_:BillingAddressAddtlNullable' billingCity: $ref: '#/components/schemas/type_:BillingCityNullable' billingState: $ref: '#/components/schemas/type_:BillingStateNullable' billingZip: $ref: '#/components/schemas/type_:BillingZip' billingCountry: $ref: '#/components/schemas/type_:BillingCountryNullable' billingPhone: $ref: '#/components/schemas/type_:PhoneNumber' billingEmail: $ref: '#/components/schemas/type_:Email' customerNumber: $ref: '#/components/schemas/type_:CustomerNumberNullable' shippingAddress1: $ref: '#/components/schemas/type_:Shippingaddress' shippingAddress2: $ref: '#/components/schemas/type_:Shippingaddressadditional' shippingCity: $ref: '#/components/schemas/type_:Shippingcity' shippingState: $ref: '#/components/schemas/type_:Shippingstate' shippingZip: $ref: '#/components/schemas/type_:Shippingzip' shippingCountry: $ref: '#/components/schemas/type_:Shippingcountry' customerId: $ref: '#/components/schemas/type_:CustomerId' customerStatus: $ref: '#/components/schemas/type_:CustomerStatus' additionalData: oneOf: - $ref: '#/components/schemas/type_:AdditionalDataString' - type: 'null' required: - identifiers - firstName - lastName - companyName - billingAddress1 - billingAddress2 - billingCity - billingState - billingZip - billingCountry - billingPhone - billingEmail - customerNumber - shippingAddress1 - shippingAddress2 - shippingCity - shippingState - shippingZip - shippingCountry - customerId - customerStatus - additionalData type_:TransactionTime: type: string format: date-time type_:QueryCFeeTransaction: type: object properties: cFeeTransid: type: string feeAmount: type: number format: double operation: type: string refundId: type: integer format: int64 responseData: type: object additionalProperties: description: Any type settlementStatus: type: integer transactionTime: $ref: '#/components/schemas/type_:TransactionTime' transStatus: type: integer type_moneyIn:TransactionDetailEvent: type: object properties: transEvent: type: string eventData: type: string eventTime: type: string required: - transEvent - eventData - eventTime type_:PendingFeeAmount: type: number format: double type_:RiskFlagged: type: boolean type_:RiskFlaggedOn: type: string format: date-time type_:RiskStatus: type: string type_:RiskReason: type: string type_:RiskAction: type: string type_:RiskActionCode: type: integer type___v2moneyInTypes__:V2TransactionDetails: type: object properties: parentOrgName: $ref: '#/components/schemas/type_:OrgParentName' paypointDbaname: $ref: '#/components/schemas/type_:Dbaname' paypointLegalname: $ref: '#/components/schemas/type_:Legalname' paypointEntryname: $ref: '#/components/schemas/type_:Entrypointfield' paymentTransId: type: string description: Unique transaction identifier. connectorName: type: string description: Name of the payment connector used. externalProcessorInformation: $ref: '#/components/schemas/type_:ExternalProcessorInformation' gatewayTransId: type: string description: Gateway transaction identifier. orderId: oneOf: - $ref: '#/components/schemas/type_:OrderId' - type: 'null' method: type: string description: Payment method used for the transaction. batchNumber: $ref: '#/components/schemas/type_:BatchNumber' batchAmount: type: number format: double description: Total amount in the batch. payorId: $ref: '#/components/schemas/type_:PayorId' paymentData: $ref: '#/components/schemas/type_moneyIn:TransactionDetailPaymentData' transStatus: $ref: '#/components/schemas/type_:TransStatus' paypointId: $ref: '#/components/schemas/type_:PaypointId' totalAmount: type: number format: double description: Total transaction amount including fees. netAmount: type: number format: double description: Net transaction amount excluding fees. feeAmount: $ref: '#/components/schemas/type_:FeeAmount' settlementStatus: $ref: '#/components/schemas/type_:SettlementStatus' operation: $ref: '#/components/schemas/type_:Operation' responseData: $ref: >- #/components/schemas/type___v2moneyInTypes__:V2TransactionDetailResponseData source: $ref: '#/components/schemas/type_:Source' scheduleReference: type: integer format: int64 description: Reference to associated payment schedule if applicable. orgId: $ref: '#/components/schemas/type_:Orgid' refundId: $ref: '#/components/schemas/type_:RefundId' returnedId: $ref: '#/components/schemas/type_:ReturnedId' chargebackId: $ref: '#/components/schemas/type_:ChargebackId' retrievalId: $ref: '#/components/schemas/type_:RetrievalId' transAdditionalData: oneOf: - description: Any type - type: 'null' invoiceData: $ref: '#/components/schemas/type_moneyIn:TransactionDetailInvoiceData' entrypageId: $ref: '#/components/schemas/type_:EntrypageId' externalPaypointID: $ref: '#/components/schemas/type_:ExternalPaypointId' isValidatedACH: type: boolean description: Indicates if ACH account was validated in real-time. transactionTime: type: string description: Timestamp when transaction was created. customer: $ref: '#/components/schemas/type_moneyIn:TransactionDetailCustomer' splitFundingInstructions: oneOf: - $ref: '#/components/schemas/type_:SplitFunding' - type: 'null' cfeeTransactions: type: array items: $ref: '#/components/schemas/type_:QueryCFeeTransaction' transactionEvents: type: array items: $ref: '#/components/schemas/type_moneyIn:TransactionDetailEvent' pendingFeeAmount: $ref: '#/components/schemas/type_:PendingFeeAmount' riskFlagged: $ref: '#/components/schemas/type_:RiskFlagged' riskFlaggedOn: $ref: '#/components/schemas/type_:RiskFlaggedOn' riskStatus: $ref: '#/components/schemas/type_:RiskStatus' riskReason: $ref: '#/components/schemas/type_:RiskReason' riskAction: $ref: '#/components/schemas/type_:RiskAction' riskActionCode: $ref: '#/components/schemas/type_:RiskActionCode' deviceId: $ref: '#/components/schemas/type_:Device' achSecCode: $ref: '#/components/schemas/type_:AchSecCode' achHolderType: $ref: '#/components/schemas/type_:AchHolderType' ipAddress: $ref: '#/components/schemas/type_:IpAddress' isSameDayACH: type: boolean description: Indicates if ACH transaction uses same-day processing. walletType: type: - string - 'null' description: Digital wallet type if applicable. required: - parentOrgName - paypointDbaname - paypointLegalname - paypointEntryname - paymentTransId - connectorName - externalProcessorInformation - gatewayTransId - orderId - method - batchNumber - batchAmount - payorId - paymentData - transStatus - paypointId - totalAmount - netAmount - feeAmount - settlementStatus - operation - responseData - source - scheduleReference - orgId - refundId - returnedId - chargebackId - retrievalId - transAdditionalData - invoiceData - entrypageId - externalPaypointID - isValidatedACH - transactionTime - customer - splitFundingInstructions - cfeeTransactions - transactionEvents - pendingFeeAmount - riskFlagged - riskFlaggedOn - riskStatus - riskReason - riskAction - riskActionCode - deviceId - achSecCode - achHolderType - ipAddress - isSameDayACH - walletType type___v2moneyInTypes__:V2TransactionResponseWrapper: type: object properties: code: $ref: '#/components/schemas/type___v2moneyInTypes__:V2ResponseCode' reason: $ref: '#/components/schemas/type___v2moneyInTypes__:V2ResponseReason' explanation: $ref: '#/components/schemas/type___v2moneyInTypes__:V2ResponseExplanation' action: $ref: '#/components/schemas/type___v2moneyInTypes__:V2ResponseAction' data: $ref: '#/components/schemas/type___v2moneyInTypes__:V2TransactionDetails' token: type: - string - 'null' description: >- Pagination token (equivalent to `pageIdentifier` in v1 APIs). Returns `null` when pagination is not applicable. required: - code - reason - explanation - action - data - token ``` ## SDK Code Examples ```typescript CardAuthorization import { PayabliClient, PayabliEnvironment } from "@payabli/sdk-node"; async function main() { const client = new PayabliClient({ environment: PayabliEnvironment.Sandbox, apiKey: "YOUR_API_KEY_HERE", }); await client.moneyIn.authorizev2({ body: { paymentDetails: { totalAmount: 100, serviceFee: 0, }, paymentMethod: { cardcvv: "999", cardexp: "02/27", cardHolder: "John Cassian", cardnumber: "4111111111111111", cardzip: "12345", initiator: "payor", method: "card", }, customerData: { customerId: 4440, }, entryPoint: "f743aed24a", ipaddress: "255.255.255.255", }, }); } main(); ``` ```python CardAuthorization from payabli import payabli from payabli.environment import payabliEnvironment client = payabli( environment=payabliEnvironment.SANDBOX, api_key="YOUR_API_KEY_HERE" ) client.money_in.authorizev_2( payment_details={ "total_amount": 100, "service_fee": 0 }, payment_method={ "cardcvv": "999", "cardexp": "02/27", "card_holder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" }, customer_data={ "customer_id": 4440 }, entry_point="f743aed24a", ipaddress="255.255.255.255" ) ``` ```csharp CardAuthorization using PayabliPayabliApi; using System.Threading.Tasks; namespace Usage; public class Example { public async Task Do() { var client = new PayabliPayabliApiClient( apiKey: "YOUR_API_KEY_HERE", clientOptions: new ClientOptions { BaseUrl = PayabliPayabliApiEnvironment.Sandbox } ); await client.MoneyIn.Authorizev2Async( new RequestPaymentAuthorizeV2 { Body = new TransRequestBody { PaymentDetails = new PaymentDetail { TotalAmount = 100, ServiceFee = 0 }, PaymentMethod = new PayMethodCredit { Cardcvv = "999", Cardexp = "02/27", CardHolder = "John Cassian", Cardnumber = "4111111111111111", Cardzip = "12345", Initiator = "payor", Method = "card" }, CustomerData = new PayorDataRequest { CustomerId = 4440L }, EntryPoint = "f743aed24a", Ipaddress = "255.255.255.255" } } ); } } ``` ```go CardAuthorization package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-sandbox.payabli.com/api/v2/MoneyIn/authorize" payload := strings.NewReader("{\n \"paymentDetails\": {\n \"totalAmount\": 100,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("requestToken", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby CardAuthorization require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/v2/MoneyIn/authorize") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"paymentDetails\": {\n \"totalAmount\": 100,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}" response = http.request(request) puts response.read_body ``` ```java CardAuthorization import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/v2/MoneyIn/authorize") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"paymentDetails\": {\n \"totalAmount\": 100,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}") .asString(); ``` ```php CardAuthorization request('POST', 'https://api-sandbox.payabli.com/api/v2/MoneyIn/authorize', [ 'body' => '{ "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "999", "cardexp": "02/27", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift CardAuthorization import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "paymentDetails": [ "totalAmount": 100, "serviceFee": 0 ], "paymentMethod": [ "cardcvv": "999", "cardexp": "02/27", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" ], "customerData": ["customerId": 4440], "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/MoneyIn/authorize")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```