Payment Service =============== The payment service provides endpoints which allows a user to recharge or auto-recharge their account using a credit card. Also, the user can save/retrieve a credit card for future use. .. contents:: Topics Endpoints --------- Recharge a Stored Value Card with a Credit Card ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/recharge.json Adds stored value to a user's card by paying with a credit card (or saved credit card). Note: User's email address must be verified in order to perform a recharge. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID in which to perform the operation in. :jsonparam String printedCardNumber: *(required)* The card of the user. :jsonparam Decimal amount: *(required)* The amount to charge/deduct. :jsonparam Object paymentMethod: *(required)* See :http:jsonentity:`PaymentMethod (PaymentService)` for format of the object. :jsonparam Object address: *(required if paymentMethod is CC)* See :http:jsonentity:`Address` for format of the object. :jsonparam Map[String->String] metadata: *(optional)* Mapping of custom request data to be sent to the credit card processor. Possible keys include ``device_data``. .. http:response:: success Indicates that the operation succeeded. :jsonparam String result: *(required)* ``success`` :jsonparam Object chargeResponse: *(required)* See :http:jsonentity:`ChargeResponse` for format of the object Example: .. code:: javascript { "result": "success", "chargeResponse": { "amount" : "25.00", "cardType" : "VISA", "expDate" : "01/2067", "lastFour" : "1111", "processorAuthCode" : "010101", "processorReferenceNumber" : "1234567ABCDE", "processorResponseCode" : 0, "processorResponseMessage" : "Approved", "transactionDatetime" : "2013-08-20 18:14:25 -0400", "transactionState" : "Succeeded" } } .. http:response:: invalidInputs Indicates that the operation was not performed because the inputs could not be validated. :jsonparam String result: *(required)* ``invalidInputs`` :jsonparam String errorCode: *(required)* The error code of the failure :jsonparam String errorMessage: *(required)* The human readable error message of the failure :jsonparam Object errorsByField: *(required)* Object representing a map of a slash (/) separated path to the field in question and a list of field validation error codes. In the case where the ``cardSecurityCode`` within the top-level ``paymentMethod`` field wasn't long enough, you would get something like ``"paymentMethod/cardSecurityCode": ["too_short"] }`` Example: .. code:: javascript { "result": "invalidInputs", "errorCode": "enrollment_input.validation_error", "errorMessage": "Validation error for input fields", "errorsByField": { "paymentMethod/expirationMonth": ["too_low"], "paymentMethod/saveCard": ["cannot_auto_recharge_without_saving_card"], "paymentMethod/cardholderName": ["too_long"], "address/street": ["null_field"] } } Field input error codes are: +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Error code | Definition | +==============================================+=================================================================================================================================================================================================================+ | ``too_low`` | Numeric value is below the minimum acceptable value (e.g. an expiration month of 0 was sent) | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``too_high`` | Numeric value is above the maximum acceptable value (e.g. an expiration month of 13 was sent) | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``null_field`` | A null or empty value was sent where an empty string is not allowed | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``too_short`` | The value sent was shorter than the minimum number of characters | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``too_long`` | The value sent was longer than the maximum number of characters | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``invalid_non_integral`` | The value sent was not an integer value | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``invalid_date`` | Date format is invalid or specified date is not a valid input (e.g. the current year is 2013 and an expirationYear value of 2012 was sent) | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``cannot_auto_recharge_without_saving_card`` | Client requested auto recharge, but specified that credit card should not be saved. This is not possible, because a saved credit card is required in order to automatically recharge the card at a later date | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. http:response:: failure Indicates that the operation did not complete successfully, and any adjustments were rolled back as best as possible (if necessary). :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure :jsonparam String errorDetail: *(required. Deprecated as of version 20.38)* Additional detail provided by the system in the case when CC auth or capture steps fail or when the PXS is unable to add SV to the card. Should not be shown to the end user, however this may be useful for diagnostic purposes. Replaced by object in errorDetails list below with ``errorCode`` ``recharge.cc_auth_declined.detail`` as of version 20.38 :jsonparam List[Object] errorDetails: *(optional)* Additional details provided by the system in the case when CC auth or capture steps fail or when the PXS is unable to add SV to the card if available. See :http:jsonentity:`CreditCardDeclineDetail` for format of the objects. Example 1: .. code:: javascript { "result": "failure", "errorCode": "recharge.amount_below_minimum", "errorMessage": "Recharge amount is below allowed minimum for this card" } Example 2: .. code:: javascript { "result": "failure", "errorCode": "recharge.cc_auth_declined", "errorMessage": "Credit card authorization was declined", "errorDetails": [ { "errorCode": "recharge.cc_auth_declined.avs", "errorMessage": "Postal code matches, but street address not verified." }, { "errorCode": "recharge.cc_auth_declined.cvv", "errorMessage": "CV match failed" }, { "errorCode": "recharge.cc_auth_declined.detail", "errorMessage": "Transaction declined - gateway rejected" } ] } Enable Automatic Recharge for a Stored Value Card ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/autoRechargeEnable.json Establishes an automatic recharge of the card when the stored value balance is at or below the configured threshold. .. note:: User's email address must be verified in order to perform a recharge. NOTE: The card is charged immediately to confirm that the card is valid for future recharges. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String printedCardNumber: *(required)* The card of the user. :jsonparam Decimal amount: *(required)* The amount to charge/deduct. :jsonparam Decimal threshold: *(optional)* Threshold at which auto recharge is configured. The merchant default is used if not specified. Only used if merchant program is configured to be set on a per-account basis. :jsonparam Object paymentMethod: *(required)* See :http:jsonentity:`PaymentMethod (PaymentService)` for format of the object. :jsonparam Object address: *(required if paymentMethod is CC)* See :http:jsonentity:`Address` for format of the object. :jsonparam Map[String->String]] metadata: *(optional)* Mapping of custom request data to be sent to the credit card processor. Possible keys include ``device_data``. .. http:response:: success Indicates that the operation succeeded. :jsonparam String result: *(required)* ``success`` :jsonparam Object chargeResponse: *(required)* Present if result=success. See :http:jsonentity:`ChargeResponse` for format of the object Example: .. code:: javascript { "result": "success", "chargeResponse": { "amount" : "25.00", "cardType" : "VISA", "expDate" : "01/2067", "lastFour" : "1111", "processorAuthCode" : "010101", "processorReferenceNumber" : "1234567ABCDE", "processorResponseCode" : 0, "processorResponseMessage" : "Approved", "transactionDatetime" : "2013-08-20 18:14:25 -0400", "transactionState" : "Succeeded" } } .. http:response:: invalidInputs Indicates that the operation was not performed because the inputs could not be validated. :jsonparam String result: *(required)* ``invalidInputs`` :jsonparam String errorCode: *(required)* The error code of the failure :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure :jsonparam Object errorsByField: *(required)* Object representing a map of a slash (/) separated path to the field in question -> list of field validation error codes, e.g. in the case where the "cardSecurityCode" within the top-level "paymentMethod" field wasn't long enough, you would get something like ``"paymentMethod/cardSecurityCode": ["too_short"] }`` Example: .. code:: javascript { "result": "invalidInputs", "errorCode": "enrollment_input.validation_error", "errorMessage": "Validation error for input fields", "errorsByField": { "paymentMethod/expirationMonth": ["too_low"], "paymentMethod/saveCard": ["cannot_auto_recharge_without_saving_card"], "paymentMethod/cardholderName": ["too_long"], "address/street": ["null_field"] } } Field input error codes are: +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Error code | Definition | +==============================================+=================================================================================================================================================================================================================+ | ``too_low`` | Numeric value is below allowed range of values (e.g. an expiration month of 0 was sent) | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``too_high`` | Numeric value is above allowed range of values (e.g. an expiration month of 13 was sent) | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``null_field`` | A null or empty value was sent where an empty string is not allowed | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``too_short`` | The value sent was shorter than the allowed minimum number of characters | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``too_long`` | The value sent was longer than the allowed maximum number of characters | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``invalid_non_integral`` | The value sent was not a integer value | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``invalid_date`` | Date format is invalid or specified date is not a valid input (e.g. the current year is 2013 and an expirationYear value of 2012 was sent) | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``cannot_auto_recharge_without_saving_card`` | Client requested auto recharge, but specified that credit card should not be saved. This is not possible, because a saved credit card is required in order to automatically recharge the card at a later date | +----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. http:response:: failure Indicates that the operation did not complete successfully, and was rolled back as best as able (if necessary). :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure :jsonparam String errorDetail: *(required. Deprecated as of version 20.38)* Additional detail provided by the system in the case when CC auth or capture steps fail or when the PXS is unable to add SV to the card. Should not be shown to the end user, however this may be useful for diagnostic purposes. Replaced by object in errorDetails list below with ``errorCode`` ``recharge.cc_auth_declined.detail`` as of version 20.38 :jsonparam List[Object] errorDetails: *(optional)* Additional details provided by the system in the case when CC auth or capture steps fail or when the PXS is unable to add SV to the card if available. See :http:jsonentity:`CreditCardDeclineDetail` for format of the objects. Example 1: .. code:: javascript { "result": "failure", "errorCode": "recharge.amount_below_minimum", "errorMessage": "Recharge amount is below allowed minimum for this card" } Example 2: .. code:: javascript { "result": "failure", "errorCode": "recharge.cc_auth_declined", "errorMessage": "Credit card authorization was declined", "errorDetails": [ { "errorCode": "recharge.cc_auth_declined.avs", "errorMessage": "Postal code matches, but street address not verified." }, { "errorCode": "recharge.cc_auth_declined.cvv", "errorMessage": "CV match failed" }, { "errorCode": "recharge.cc_auth_declined.detail", "errorMessage": "Transaction declined - gateway rejected" } ] } Disable Auto Recharge for a Stored Value Card ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/autoRechargeDisable.json Disables auto recharge functionality for a given account The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String printedCardNumber: *(required)* The user's printed (loyalty) card number :jsonparam Boolean deleteSavedCard: *(optional)* If true, saved credit card is also deleted. Default: ``true`` .. http:response:: success :jsonparam String result: *(required)* ``success`` .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Delete Saved Credit Card Attached to Stored Value Card ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:delete:: payment/savedCreditCard.json Deletes saved credit card information for a given account .. note:: The user must not be enrolled in Auto Recharge, else this will fail. In such a case, use ``autoRechargeDisable`` with ``deleteSavedCard`` set to ``true`` The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :query String printedCardNumber: *(required)* The user's printed (loyalty) card number :query String lastFour: *(required)* Last four digits of the credit card to be deleted :query String savedCardCode: *(required)* Saved card code for the credit card to be deleted, as gotten from the :http:get:`payment/savedCard.json` resource .. http:response:: success :jsonparam String result: *(required)* ``success`` .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Get Payment Configuration ~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:get:: payment/paymentConfig.json Returns various configuration values for Auto-Recharge and valid Credit Card Types. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` * :ref:`anonymous_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :query Integer cardTemplateCode: *(required)* Paytronix-assigned program code. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam Object config: *(required)* See :http:jsonentity:`PaymentConfig` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Get Saved Credit Card Information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:get:: payment/savedCard.json Returns a saved card (if any) which can be used in other transactions. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :query String printedCardNumber: *(required)* The card of the user. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam Object savedCard: *(required)* See :http:jsonentity:`SavedCreditCardResponsePaymentMethod` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Check Card Auto Recharge Status ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:get:: payment/autoRechargeStatus.json Identifies if a user is enrolled in auto recharge. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :query String printedCardNumber: *(required)* The card of the user. .. http:response:: success :jsonparam Boolean enrolled: *(required)* ``true`` if the user is enrolled in auto recharge. Otherwise ``false``. :jsonparam Decimal amount: *(required)* The user's configured recharge amount. :jsonparam Decimal threshold: *(required)* The user's configured threshold amount. :jsonparam Object savedCard: *(required)* The user's saved card information. See :http:jsonentity:`SavedCreditCardResponsePaymentMethod` for format of the object. :jsonparam Object savedPaymentMethod: *(optional)* The user's saved payment method information. See :http:jsonentity:`ResponsePaymentMethod` for format of the object. Get Recharge History ~~~~~~~~~~~~~~~~~~~~ .. http:get:: payment/rechargeHistory.json Returns cardholder's recharge history, if they have ever recharged their card The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :query String printedCardNumber: *(required)* The card of the user. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam List[Object] history: *(required)* See :http:jsonentity:`ChargeHistoryResponse` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Enable Auto Recharge Threshold Monitoring ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/enableAutoRechargeMonitoring.json Enable the card's stored value balance to be monitored against the configured threshold. If the stored value balance falls at or below the threshold, the card is flag as auto recharge qualified and will be present in the response of a call to endpoint :http:get:`payment/pendingAutoRecharges.json` .. note:: This pending card will NOT be processed by Paytronix's regular Auto Recharge engine for credit card recharge The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String printedCardNumber: *(required)* The card of the user. :jsonparam Decimal amount: *(required)* The amount to charge/deduct. :jsonparam Decimal threshold: *(optional)* Threshold at which auto recharge is configured. The merchant default is used if not specified. Only used if merchant program is configured to be set on a per-account basis. .. http:response:: success Indicates that the operation succeeded. :jsonparam String result: *(required)* ``success`` .. http:response:: failure Indicates that the operation did not complete successfully. :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure Disable Auto Recharge Threshold Monitoring ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/disableAutoRechargeMonitoring.json Disable auto recharge monitoring for the given card. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String printedCardNumber: *(required)* The card of the user. .. http:response:: success Indicates that the operation succeeded. :jsonparam String result: *(required)* ``success`` .. http:response:: failure Indicates that the operation did not complete successfully. :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure Get Pending Monitored Auto Recharge Events ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:get:: payment/pendingAutoRecharges.json When Auto Recharge is in Monitoring Only mode, returns up to 100 cards whose SV balance have fallen below specified threshold during the past 7 days The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. .. http:response:: success Indicates that the operation succeeded. :jsonparam String result: *(required)* ``success`` :jsonparam List[Object] recharges: *(required)* See :http:jsonentity:`PendingAutoRechargesResponse` for format of the object. .. http:response:: failure Indicates that the operation did not complete successfully. :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure Add Payment Method ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/addPaymentMethod.json Add and save specified payment method and link it to the given card The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam Integer ccProcessorId: *(optional)* Id of the CcProcessor to use when adding Spreedly payment tokens. :jsonparam String printedCardNumber: *(required)* The user's printed (loyalty) card number :jsonparam Object paymentMethod: *(required)* Only :http:jsonentity:`UnencryptedCreditCardPaymentMethod` and :http:jsonentity:`SpreedlyTokenPaymentMethod` are valid. See :http:jsonentity:`PaymentMethod (PaymentService)` for format of the object. :jsonparam List[String] defaultUsages: *(required)* Uses for card, can include ``"AUTO_RECHARGE"``, ``"MOBILE_PAYMENT_DEFAULT"``, ``"INSTANT_PAYMENT"``, or ``"SUBSCRIPTION"`` :jsonparam String nickname: *(optional)* Nickname for payment method. :jsonparam Map[String->String] metadata: *(optional)* Mapping of custom request data to be sent to the credit card processor. Possible keys include ``device_data``. .. http:response:: success :jsonparam String result: *(required)* ``success`` .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Edit Payment Method Usages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/editPaymentMethodUsages.json Update default usages of specified payment method The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String printedCardNumber: *(required)* The user's printed (loyalty) card number :jsonparam Object paymentMethod: *(required)* Only :http:jsonentity:`SpreedlyTokenPaymentMethod` and :http:jsonentity:`SavedSpreedlyTokenPaymentMethod` are valid. See :http:jsonentity:`PaymentMethod (PaymentService)` for format of the object. :jsonparam List[String] defaultUsages: *(required)* Uses for card, can include ``"AUTO_RECHARGE"``, ``"MOBILE_PAYMENT_DEFAULT"``, ``"INSTANT_PAYMENT"``, or ``"SUBSCRIPTION"`` .. http:response:: success :jsonparam String result: *(required)* ``success`` .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Delete Payment Method ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:delete:: payment/deletePaymentMethod.json Delete specified payment method The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :query String printedCardNumber: *(required)* The user's printed (loyalty) card number :query Object paymentMethod: *(required)* Only :http:jsonentity:`SavedCreditCardPaymentMethod`, :http:jsonentity:`SpreedlyTokenPaymentMethod`, and :http:jsonentity:`SavedSpreedlyTokenPaymentMethod` are valid. See :http:jsonentity:`PaymentMethod (PaymentService)` for format of the object. .. http:response:: success :jsonparam String result: *(required)* ``success`` .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Get Saved Payment Method ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:get:: payment/savedPaymentMethod.json Get default payment method for a specified usage of given card if exists The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :query String printedCardNumber: *(required)* The user's printed (loyalty) card number :query String usage: *(required)* One of ``"AUTO_RECHARGE"``, ``"MOBILE_PAYMENT_DEFAULT"``, ``"INSTANT_PAYMENT"``, or ``"SUBSCRIPTION"`` .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam Object paymentMethod: *(required)* See :http:jsonentity:`ResponsePaymentMethod` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Get Saved Payment Methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:get:: payment/savedPaymentMethods.json Get all saved payment methods for given card if exists The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` * :ref:`oauth_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :query String printedCardNumber: *(required)* The user's printed (loyalty) card number .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam List[Object] paymentMethods: *(required)* See :http:jsonentity:`ResponsePaymentMethod` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Create Checkout Session ~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/createCheckoutSession.json Creates a Checkout Session for the Stripe Hosted Payment Page. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam Integer ccProcessorId: *(required)* Credit Card Processor ID associated with the Web Sale Program. :jsonparam String cancelUrl: *(required)* Url for the guest to redirected to from the Stripe Hosted page if the payment is cancelled. :jsonparam String successUrl: *(required)* Url for the guest to redirected to from the Stripe Hosted page if the payment succeeds. :jsonparam LineItem lineItems: *(required)* See :http:jsonentity:`LineItem` for format of the object. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam CheckoutSession checkoutSession: *(required)* See :http:jsonentity:`CheckoutSession` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Get Payment Intent ~~~~~~~~~~~~~~~~~~~ .. http:get:: payment/paymentIntent.json Get the Payment Intent associated with a stripe checkout session. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :query Integer ccProcessorId: *(required)* Credit Card Processor ID associated with the Web Sale Program. :query String paymentIntentId: *(required)* The payment intent ID associated with a stripe checkout session. :query String checkoutSessionId: *(optional)* The checkout session ID associated with a stripe checkout session. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam PaymentIntent paymentIntent: *(required)* See :http:jsonentity:`PaymentIntent` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Capture Payment Intent ~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/capturePaymentIntent.json Capture the Payment Intent associated with a stripe checkout session. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam Integer ccProcessorId: *(required)* Credit Card Processor ID associated with the Web Sale Program. :jsonparam String paymentIntentId: *(required)* The payment intent ID associated with a stripe checkout session. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam PaymentIntent paymentIntent: *(required)* See :http:jsonentity:`PaymentIntent` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Cancel Payment Intent ~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/cancelPaymentIntent.json Cancel the Payment Intent associated with a stripe checkout session. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam Integer ccProcessorId: *(required)* Credit Card Processor ID associated with the Web Sale Program. :jsonparam String paymentIntentId: *(required)* The payment intent ID associated with a stripe checkout session. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam PaymentIntent paymentIntent: *(required)* See :http:jsonentity:`PaymentIntent` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Validate Merchant For Apple Pay ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/validateApplePayMerchant.json Validate a merchant to complete the Merchant Validation for an Apple Pay session. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String validationUrl: *(required)* The validation URL Apple provides as part of the event in onValidateMerchant. :jsonparam String domainName: *(required)* The Apple verified domain name for Apple Pay for the merchant. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam ApplePayMerchantSession session: *(required)* See :http:jsonentity:`ApplePayMerchantSession` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Register Merchant Domain for Apple Pay ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/registerApplePayDomain.json Register a merchant's domain with Apple to allow Apple Pay support for that domain. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String domainName: *(required)* The domain name to register for Apple Pay for the merchant. .. http:response:: success :jsonparam String result: *(required)* ``success`` .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Unregister Merchant Domain for Apple Pay ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:post:: payment/unregisterApplePayDomain.json Unregister a merchant's domain with Apple to disallow Apple Pay support for that domain. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. :jsonparam String domainName: *(required)* The domain name to deregister for Apple Pay for the merchant. :jsonparam String reason: *(required)* Human readable reason for unregistering the domain .. http:response:: success :jsonparam String result: *(required)* ``success`` .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Get Apple Pay Merchant Details ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. http:get:: payment/applePayMerchantDetails.json Get the merchant details for Apple Pay stored in Apple. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :query Integer merchantId: *(required)* Paytronix-assigned merchant ID to perform the operation in. .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam ApplePayMerchantDetails details: *(required)* See :http:jsonentity:`ApplePayMerchantDetails` for format of the object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Reply Objects ------------- .. _card_type_values: Credit Card Type Values ~~~~~~~~~~~~~~~~~~~~~~~ ``AMEX`` American Express ``DINERS_CLUB`` Diners Club ``DISCOVER`` Discover ``JCB`` JCB ``MASTERCARD`` MasterCard ``VISA`` Visa ``ALELO`` Alelo ``CABAL`` Cabal ``CARNET`` Carnet ``DANKORT`` Dankort ``ELO`` Elo ``MAESTRO`` Maestro ``NARANJA`` Naranja ``SODEXO`` Sodexo ``VR`` Vr .. http:jsonentity:: PaymentConfig :jsonparam Boolean autoRechargeEnabled: *(required)* True if the user can enroll in the Auto-Recharge feature. :jsonparam Decimal autoRechargeThreshold: *(required)* If the Stored Value balance is at or below this threshold, then the system will perform an Auto-Recharge. :jsonparam Decimal rechargeMinAmount: *(required)* This is the minimum amount a user can specify for how much is charged when performing a Recharge or Auto-Recharge. :jsonparam Decimal rechargeMaxAmount: *(required)* This is the maximum amount a user can specify for how much is charged when performing a Recharge or Auto-Recharge. :jsonparam List[Object] cardTypes: *(optional)* See :http:jsonentity:`CardTypeEntry` for format of the objects. :jsonparam Boolean oneTimeRechargeEnabled: *(optional)* Is One Time Recharge enabled :jsonparam Boolean isThresholdPerAccount: *(optional)* Is there an Auto Recharge threshold per account :jsonparam Map[String->String] ccProcessorType: *(required)* Mapping of program and CC processor type for the given merchant. Possible keys include ``autoRecharge``, ``egift``, ``webCardSales``, ``loyaltyCardSales``, ``subscriptions``, and ``mobilePayment``. Values are one of ``PAYFLOW`` or ``SPREEDLY``. .. http:jsonentity:: Address .. note:: Please refer to ``Supported Country Codes`` and ``Supported Country State/Province Codes`` under the Glossary for a list of appropriate values for the corresponding Address fields. :jsonparam string street: *(required)* Credit card billing street address :jsonparam string city: *(required)* Credit card billing city :jsonparam string stateProvince: *(required)* Two-letter code representing credit card billing state/province :jsonparam string postalCode: *(required)* Credit card owner's zip/postal code :jsonparam string country: *(required)* Credit card owner's country, one of: ``US`` or ``CA`` .. http:jsonentity:: CardTypeEntry :jsonparam String code: *(required)* See :ref:`card_type_values` :jsonparam String label: *(required)* The name of the type. .. http:jsonentity:: PaymentMethod (PaymentService) Can be one of the methods below .. note:: Only :http:jsonentity:`CreditCardPaymentMethod`, :http:jsonentity:`SavedCreditCardPaymentMethod`, :http:jsonentity:`SavedSpreedlyTokenPaymentMethod`, and :http:jsonentity:`SpreedlyTokenPaymentMethod` are allowed when using the :http:post:`payment/recharge.json` or :http:post:`payment/autoRechargeEnable.json` endpoints .. http:jsonentity:: CreditCardPaymentMethod :jsonparam String paymentMethodType: *(required)* ``CC`` :jsonparam String cardType: *(required)* Paytronix-assigned code. See :ref:`card_type_values` :jsonparam String cardholderName: *(required)* The name on the credit card. :jsonparam String cardNumber: *(required)* The credit card number (no spaces or punctuation). :jsonparam Integer expirationMonth: *(required)* The month of the expiration (1 = Jan, ..., 12 = Dec). :jsonparam Integer expirationYear: *(required)* The year of the expiration (4 digits like: 2019) :jsonparam String cardSecurityCode: *(required)* Also known as the CVV, CVV2, CVVC, or CSC code on the back of the credit card. :jsonparam Boolean saveCard: *(required)* Save this credit card for future use as the default credit card for this account. Default: false .. http:jsonentity:: SavedCreditCardPaymentMethod :jsonparam String paymentMethodType: *(required)* ``SAVED_CC`` :jsonparam String savedCardCode: *(required)* This code was returned by the Payment Service endpoint ``savedCard``. :jsonparam String lastFour: *(required)* The last four digits of the full ``cardNumber``. This was returned by the Payment Service endpoint ``savedCard``. .. http:jsonentity:: SavedSpreedlyTokenPaymentMethod :jsonparam String paymentMethodType: *(required)* ``SAVED_SPREEDLY_TOKEN`` :jsonparam String tokenLastFour: *(required)* Last four digits of the Spreedly token :jsonparam String savedCardCode: *(required)* This code was returned by the Payment Service endpoint ``savedPaymentMethod`` or ``savedPaymentMethods`` .. http:jsonentity:: SpreedlyTokenPaymentMethod :jsonparam String paymentMethodType: *(required)* ``SPREEDLY_TOKEN`` :jsonparam String token: *(required)* Paytronix-assigned code. See :ref:`card_type_values` :jsonparam String nickname: *(required)* Nickname of payment method :jsonparam String tokenType: *(optional)* One of ``"credit_card"``, ``"apple_pay"``, ``"android_pay"``, or ``"google_pay"`` :jsonparam Boolean saveCard: *(optional)* Whether this payment method is saved for future use as the default payment method for this account. Default: false .. http:jsonentity:: StoredValuePaymentMethod :jsonparam String paymentMethodType: *(required)* ``SV`` .. http:jsonentity:: PointsPaymentMethod :jsonparam String paymentMethodType: *(required)* ``POINTS`` .. http:jsonentity:: UnencryptedCreditCardPaymentMethod :jsonparam String paymentMethodType: *(required)* ``CC`` :jsonparam String cardType: *(required)* Paytronix-assigned code. See :ref:`card_type_values` :jsonparam String cardholderName: *(required)* The name on the credit card. :jsonparam String cardNumber: *(required)* The credit card number (no spaces or punctuation). :jsonparam Integer expirationMonth: *(required)* The month of the expiration (1 = Jan, ..., 12 = Dec). :jsonparam Integer expirationYear: *(required)* The year of the expiration (4 digits like: 2019) :jsonparam String cardSecurityCode: *(required)* Also known as the CVV, CVV2, CVVC, or CSC code on the back of the credit card. :jsonparam Boolean saveCard: *(optional)* Save this credit card for future use as the default credit card for this account. Default: false :jsonparam Object address: *(optional)* Address associated with payment method. See :http:jsonentity:`Address` for format of the object. .. http:jsonentity:: ResponsePaymentMethod Can be one of the methods below .. http:jsonentity:: SavedCreditCardResponsePaymentMethod :jsonparam String type: *(required)* ``SAVED_CC`` :jsonparam String cardType: *(required)* Paytronix-assigned code. See :ref:`card_type_values` :jsonparam String cardholderName: *(required)* The name on the credit card. :jsonparam String lastFour: *(required)* Last four digits of full ``cardNumber``. For display to the user (instead of the entire ``cardNumber``). Must be passed along with ``savedCardCode`` when ``paymentMethod`` is ``SAVED_CC`` :jsonparam Integer expirationMonth: *(optional)* The month of the expiration (1 = Jan, ..., 12 = Dec). :jsonparam Integer expirationYear: *(optional)* The year of the expiration (4 digits like: 2019) :jsonparam String savedCardCode: *(required)* Must be passed along with ``lastFour`` when ``paymentMethod`` is ``SAVED_CC`` :jsonparam Boolean isAutoRechargeDefault: *(required)* Is Auto Recharge a default usage of this payment method :jsonparam Boolean isPayByMobileDefault: *(required)* Is Pay By Mobile a default usage of this payment method :jsonparam String nickname: *(optional)* Nickname of payment method :jsonparam Object address: *(optional)* Address associated with payment method. See :http:jsonentity:`Address` for format of the object. .. http:jsonentity:: SavedSpreedlyTokenResponsePaymentMethod :jsonparam String type: *(required)* ``SAVED_SPREEDLY_TOKEN`` :jsonparam String tokenLastFour: *(required)* Last four digits of the Spreedly token. Used to construct a ``SAVED_SPEEDLY_TOKEN`` payment method to call various endpoints :jsonparam String cardType: *(optional)* Paytronix-assigned code of the underlying credit card type. See :ref:`card_type_values` :jsonparam String cardholderName: *(optional)* The name on the credit card. :jsonparam String lastFour: *(optional)* Last four digits of full ``cardNumber``. For display to the user (instead of the entire ``cardNumber``). :jsonparam Integer expirationMonth: *(optional)* The month of the expiration (1 = Jan, ..., 12 = Dec). :jsonparam Integer expirationYear: *(optional)* The year of the expiration (4 digits like: 2019) :jsonparam String savedCardCode: *(required)* Must be passed along with ``tokenLastFour`` when construct a ``SAVED_SPREEDLY_TOKEN`` payment method when calling various endpoints :jsonparam String nickname: *(optional)* Nickname of payment method :jsonparam Object address: *(optional)* Address associated with payment method. See :http:jsonentity:`Address` for format of the object. :jsonparam String paymentTokenType: *(optional)* One of ``"credit_card"``, ``"apple_pay"``, ``"android_pay"``, or ``"google_pay"`` :jsonparam List[String] defaultUsages: *(required)* Uses for card, can include ``"AUTO_RECHARGE"``, ``"MOBILE_PAYMENT_DEFAULT"``, ``"INSTANT_PAYMENT"``, or ``"SUBSCRIPTION"``. This will be an empty array if the token is not the default payment method for any usage .. http:jsonentity:: ChargeResponse :jsonparam String transactionDatetime: *(required)* Date at which the transaction occurred, in the format ``yyyy-MM-dd HH:mm:ss Z``, ex: ``2012-05-23 16:29:22 -0400`` :jsonparam String transactionState: *(required)* Resulting transaction state, one of: ``Succeeded``, ``Failed`` :jsonparam Integer processorResponseCode: *(required)* The Credit Card processor specific response code :jsonparam String processorResponseMessage: *(required)* The Credit Card processor specific response message :jsonparam String processorReferenceNumber: *(required)* The Credit Card processor specific reference number for tracking this transaction :jsonparam String authCode: *(required)* The authorization code returned by the Credit Card processor :jsonparam Decimal amount: *(required)* The recharge amount requested :jsonparam String paymentMethodType: *(required)* One of ``"CC"``, ``"ENCRYPTED_CC"``, ``"SAVED_CC"``, ``"SPREEDLY_TOKEN"``, ``"SV"``, or ``"POINTS"`` :jsonparam String paymentMethodNickname: *(optional)* Nickname for payment method :jsonparam String cardType: *(optional)* Paytronix-assigned code. See :ref:`card_type_values` :jsonparam String lastFour: *(optional)* The last four digits of the card number :jsonparam String expDate: *(optional)* The expiration date of the card (format is ``MM/yyyy``) :jsonparam Boolean disableCc: *(optional)* Is CC disabled :jsonparam Integer billingState: *(optional)* The billing state or province code :jsonparam String billingZip: *(optional)* The billing postal code .. http:jsonentity:: ChargeHistoryResponse :jsonparam String transactionDatetime: *(required)* Date at which the transaction occurred, in the format ``yyyy-MM-dd HH:mm:ss Z``, ex: ``2012-05-23 16:29:22 -0400`` :jsonparam String transactionState: *(required)* Resulting transaction state, one of: ``Succeeded``, ``Failed`` :jsonparam Integer processorResponseCode: *(required)* The Credit Card processor specific response code :jsonparam String processorResponseMessage: *(required)* The Credit Card processor specific response message :jsonparam String processorReferenceNumber: *(required)* The Credit Card processor specific reference number for tracking this transaction :jsonparam String authCode: *(required)* The authorization code returned by the Credit Card processor :jsonparam Decimal amount: *(required)* The recharge amount requested :jsonparam String cardType: *(required)* Paytronix-assigned code. See :ref:`card_type_values` :jsonparam String lastFour: *(required)* The last four digits of the card number :jsonparam String expDate: *(required)* The expiration date of the card (format is ``MM/yyyy``) .. http:jsonentity:: PendingAutoRechargesResponse :jsonparam String printedCardNumber: *(required)* Primary card number of the account :jsonparam Decimal amount: *(required)* Recharge amount specified by guest :jsonparam Decimal storedValueBalance: *(required)* Current balance of Stored Value wallet :jsonparam Decimal threshold: *(required)* Effective Auto Recharge Stored Value wallet threshold for this account :jsonparam Object savedCard: *(optional)* The user's saved card information. See :http:jsonentity:`ResponsePaymentMethod` for format of the object. .. http:jsonentity:: AutoRechargeStatusResponse :jsonparam Boolean enrolled: *(required)* Primary card number of the account :jsonparam Decimal amount: *(optional)* Recharge amount specified by guest :jsonparam Decimal threshold: *(optional)* Effective Auto Recharge Stored Value wallet threshold for this account :jsonparam Object savedCard: *(optional)* The user's saved card information. See :http:jsonentity:`SavedCreditCardResponsePaymentMethod` for format of the object. :jsonparam Object savedPaymentMethod: *(optional)* The user's saved payment method information. See :http:jsonentity:`ResponsePaymentMethod` for format of the object. .. http:jsonentity:: CreditCardTokenDetails :jsonparam String cardType: *(required)* Paytronix-assigned code. See :ref:`card_type_values` :jsonparam String cardholderName: *(required)* The name on the credit card. :jsonparam String lastFour: *(required)* Last four digits of full ``cardNumber``. For display to the user (instead of the entire ``cardNumber``). :jsonparam Integer expirationMonth: *(required)* The month of the expiration (1 = Jan, ..., 12 = Dec). :jsonparam Integer expirationYear: *(required)* The year of the expiration (4 digits like: 2019) .. http:jsonentity:: CreditCardDeclineDetail :jsonparam String errorCode: *(required)* Paytronix-assigned error code. Possible values include ``recharge.cc_auth_declined.avs``, ``recharge.cc_auth_declined.cvv``, and ``recharge.cc_auth_declined.detail``. :jsonparam String errorMessage: *(required)* The human readable error message. .. http:jsonentity:: LineItem :jsonparam BigDecimal amount: *(required)* The total price of the order. :jsonparam String amount: *(required)* The description of the order or the item in the order. :jsonparam Integer amount: *(required)* The total quantity of the items being ordered. For use in the Stripe Hosted Guest Website EGift Checkout page, the LineItem should always have the format as below: .. code:: javascript { "amount": [the total cart price], "description": "egift card(s)", "quantity": 1 } .. http:jsonentity:: CheckoutSession :jsonparam String id: *(required)* The ID associated with the checkout session. :jsonparam PaymentIntent paymentIntent: *(required)* The payment intent ID associated with the checkout session. :jsonparam String redirectUrl: *(required)* The redirectUrl to launch the stripe hosted checkout page. .. http:jsonentity:: PaymentIntent :jsonparam String id: *(required)* The ID associated with the payment intent :jsonparam BigDecimal amount: *(required)* The total amount of the transaction represented by the payment intent. :jsonparam ChargeResponse chargeInfo: *(optional)* See :http:jsonentity:`ChargeResponse` for format of the object. :jsonparam PaymentIntentStatusEnum.Value status: *(optional)* See :http:jsonentity:`PaymentIntentStatusEnum` for format of the object. :jsonparam Address billingAddress: *(optional)* See :http:jsonentity:`Address` for format of the object. :jsonparam String guestName: *(optional)* The name of the guest paying for the transaction. :jsonparam String guestPhone: *(optional)* The phone number of the guest paying for the transaction. .. http:jsonentity:: PaymentIntentStatusEnum Can have the following Values: * :ref:`REQUIRES_PAYMENT_METHOD` * :ref:`REQUIRES_CONFIRMATION` * :ref:`REQUIRES_ACTION` * :ref:`PROCESSING` * :ref:`REQUIRES_CAPTURE` * :ref:`CANCELED` * :ref:`SUCCEEDED` .. http:jsonentity:: ApplePayMerchantSession :jsonparam String merchantSession: *(required)* The merchant session returned by Apple to pass to completeMerchantValidation for Apple Pay. .. http:jsonentity:: ApplePayMerchantDetails :jsonparam List[String] domainNames: *(required)* The list of domains registered for Apple Pay for this merchant. :jsonparam String partnerMerchantName: *(required)* The name of the Merchant as stored in the PXS. :jsonparam String partnerInternalMerchantIdentifier: *(required)* The merchant specific Paytronix identifier as provided by Apple. :jsonparam String partnerMerchantValidationURI: *(required)* The domain verification file location for merchant. :jsonparam String encryptTo: *(required)* The Paytronix Apple identifier hash. :jsonparam String merchantUrl: *(required)* The merchant's default domain as stored in the PXS Error Codes ----------- The following are the possible codes and messages that can be returned by the Payment Service. There are other system-level errors which may be returned which are not documented here. The caller of the endpoint can use the returned message to display to the end user or, if different wording is desired, can provide their own mapping of code to message. +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | Code | Message | +=================================================================================+============================================================================================================+ | ``recharge.error`` | | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.amount_below_minimum`` | Recharge amount is below allowed minimum for this card | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.amount_above_maximum`` | Recharge amount is above allowed maximum for this card | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.no_matching_saved_card`` | No matching saved card found | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.invalid_payment_method`` | Specified payment method cannot be used to recharge stored value | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.not_configured`` | Recharge is not configured or not enabled for this type of card | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.invalid_merchant_id`` | Invalid merchant ID | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.auto_recharge_not_enabled`` | Auto recharge is not enabled for this merchant | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.invalid_card_number`` | Invalid card number | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.card_not_active`` | Card not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.no_sv_wallet`` | This merchant does not have a Stored Value wallet | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.no_sv_wallet_attached`` | This card does not have a Stored Value wallet attached | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.error_loading_account_data`` | Error loading account data | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.account_not_active`` | Account not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.error_loading_user_data`` | Error loading user | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.no_email_address`` | User does not have an email address defined | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.email_not_verified`` | User's email address must be verified in order to recharge | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.error_loading_cc_processor_data`` | Error loading CC processor data | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.recharge_prevent`` | Account's ability to recharge is disabled | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.server_error`` | Internal server error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.not_accepting_enrollees`` | This recharge program is not accepting new enrollees | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.invalid_cc_type`` | Specified Credit Card Type is not allowed for this program | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.cc_auth_declined`` | Credit card authorization was declined | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.sv_wallet_adjust_failed`` | Error adjusting Stored Value wallet | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.sv_wallet_adjust_denied`` | Stored Value wallet adjustment was denied | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.cc_capture_declined`` | Credit transaction capture was declined | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``payment_config.error`` | | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``payment_config.not_configured`` | Recharge is not configured for this combination of merchantId and cardTemplateCode | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``payment_config.server_error`` | Internal server error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``payment_config.invalid_merchant_id`` | Invalid merchant ID | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``payment_config.invalid_card_template_code`` | Invalid cardTemplateCode | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_card.error`` | | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_card.server_error`` | Internal server error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_card.invalid_merchant_id`` | Invalid merchant ID | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_card.invalid_card_number`` | Invalid card number | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_card.card_not_active`` | Card not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_card.error_loading_account_data`` | Error loading account data | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_card.account_not_active`` | Account not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_card.no_saved_card`` | No saved card | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_card.saved_card_expired`` | Saved card is expired | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge_history.server_error`` | Internal server error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge_history.error`` | | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge_history.invalid_merchant_id`` | Invalid merchant ID | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge_history.invalid_card_number`` | Invalid card number | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge_history.card_not_active`` | Card not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge_history.error_loading_account_data`` | Error loading account data | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge_history.account_not_active`` | Account not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``add_saved_credit_card.add_saved_credit_card_failed`` | Account not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_disable.error`` | Failed to add saved credit card | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_disable.server_error`` | Internal server error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_disable.invalid_merchant_id`` | Invalid merchant ID | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_disable.invalid_card_number`` | Invalid card number | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_disable.card_not_active`` | Card not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_disable.error_loading_account_data`` | Error loading account data | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_disable.account_not_active`` | Account not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_disable.not_enrolled`` | Account is not enrolled in auto recharge | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_disable.auto_recharge_not_active`` | Auto recharge is not enabled for this account | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.error`` | | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.server_error`` | Internal server error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.invalid_merchant_id`` | Invalid merchant ID | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.invalid_printed_card_number`` | Invalid card number | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.card_not_active`` | Card not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.error_loading_account_data`` | Error loading account data | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.account_not_active`` | Account not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.not_configured`` | Auto recharge is not configured or not enabled for this type of card | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.monitoring_only_not_enabled`` | Monitoring only auto recharge is not enabled for this merchant | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.not_accepting_enrollees`` | This recharge program is not accepting new enrollees | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.amount_below_minimum`` | Recharge amount is below allowed minimum for this card | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.amount_above_maximum`` | Recharge amount is above allowed maximum for this card | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_enable_monitoring.account_disabled_by_csr`` | Auto recharge for this account is disabled by CSR | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_get_pending_auto_recharges.error`` | | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_get_pending_auto_recharges.server_error`` | Internal server error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_get_pending_auto_recharges.invalid_merchant_id`` | Invalid merchant ID | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_get_pending_auto_recharges.not_configured`` | Auto recharge is not configured or not enabled for this merchant | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``auto_recharge_get_pending_auto_recharges.monitoring_only_not_enabled`` | Monitoring only auto recharge is not enabled for this merchant | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``cc_transaction.invalid_input`` | Invalid Credit Card information | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``cc_transaction.error`` | | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.invalid_merchant_id`` | Invalid merchant ID | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``cc_transaction.error_loading_cc_processor_data`` | Error loading CC processor data | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``recharge.server_error`` | Internal server error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``cc_transaction.invalid_cc_type`` | Specified Credit Card Type is not allowed for this program | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``delete_saved_card.invalid_saved_card_code`` | Invalid saved card code | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``delete_saved_card.invalid_merchant_id`` | Invalid merchant ID | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``delete_saved_card.invalid_printed_card_number`` | Invalid printed card number | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``delete_saved_card.saved_card_not_found`` | Saved credit card not found | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``delete_saved_card.server_error`` | Internal server error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``delete_saved_card.auto_recharge_enabled`` | Cannot delete saved credit card while auto recharge is enabled. Use autoRechargeDisable resource instead | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``delete_saved_card.account_not_active`` | Account not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``delete_saved_card.card_not_active`` | Card not active | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``delete_payment_method.system_error`` | System error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``payment_method.system_error`` | System error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_payment_method.system_error`` | System error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ | ``saved_payment_methods.system_error`` | System error | +---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+