# JPMC-PDP Documentation from https://developer.payments.jpmorgan.com # Affirm Affirm is a Buy Now Pay Later (BNPL) provider that allows consumers to pay over time for the things they wish to buy. When a consumer buys with Affirm, they know the exact total and when the payments are due. There are no hidden fees or late fees. ## Before you begin Ensure you complete the following before you proceed: - Onboard as a merchant with J.P. Morgan. Contact your relationship manager if you are an existing client or contact [Sales](https://developer.payments.jpmorgan.com/contact/sales) if you are a new client. - Onboard the [Notifications API](/docs/commerce/optimization-protection/capabilities/notifications/index) to receive notifications for Affirm transactions. ## Availability **Affirm availability** | Payment method | Payment type | Consumer country | Merchant country | Supported presentment currencies | | --- | --- | --- | --- | --- | | Affirm | Wallet | US | US | USD | ## How Affirm works The Affirm payment process follows these steps: 1. Your consumer selects Affirm as their preferred method of payment from your checkout page. 2. You return the redirect URL to your consumer’s browser. 3. The consumer is automatically redirected to Affirm's hosted payment page for authentication. 4. Once the consumer is authenticated, they select the payment program of their choice. 5. Affirm approves the payment and returns the consumer to your website to complete the order. 6. J.P. Morgan processes the payment transactions and displays the confirmation of a successful transaction on the payment result page. 7. A notification is sent to you containing all the relevant information. ## Payment programs Affirm offers the following payment programs to your consumers. **Affirm payment options** | Payment programs | Description | | --- | --- | | Pay in full | Consumers pay for the order immediately in a single payment. | | Pay in 4 | Consumers pay with interest-free payments every two weeks, generally for smaller, everyday purchases. | | Monthly installments | Consumers pay in monthly installments of 3, 6, 12, 18, 24, or 36-month terms for larger purchases. Note: The total transaction amount is typically spread equally across the installments, but Affirm might occasionally charge your consumer more in the first installment based on the consumer's purchase power and other credit factors. | ## Settlement funding Transaction funding occurs in the same currency as presentment. Affirm sends the settlement file to J.P. Morgan, and we handle settlement processing. ## Refunds Affirm supports full and partial refunds. **How refunds work:** - Affirm cancels any remaining payments on a refunded amount and returns the already-paid amount to the consumer. - You can also issue multiple partial refunds up to the amount of the original amount. - Partial refunds update the order to reflect the new total amount. - If the partial refund is greater than the remaining balance of the order, Affirm deducts the refund amount from the outstanding balance and returns the difference. - If the partial refund is less than the remaining balance of the order, Affirm deducts the amount from the outstanding balance and spreads refunds evenly across the remaining payments. For more information on how to refund a transaction, refer to [Refund a payment](/docs/commerce/online-payments/capabilities/online-payments/how-to/refund-payment). > > - Affirm does not support refunding a payment when it has been escalated to a dispute > > - Void a transaction to release uncaptured funds or release unused authorized amounts. For information of how to void a payment, refer to [Void an authorization](/docs/commerce/online-payments/capabilities/online-payments/how-to/update-a-payment#void-an-authorization). > ## Payment parameters The following fields are required for Affirm transactions. All **required (R)** and **conditionally required (CR)** fields must be included for a request to be successful, while **optional (O)** fields increase the approval rate and add extra functionality to a request. > For seamless transaction processing, provide the shipping details (shipTo.`shippingAddress`) and line items (retailAddenda.level3.`lineItems`) in your payment requests. > **Required fields for Affirm** | Field name | Description | R, O, or CR | Comments | | --- | --- | --- | --- | | captureMethod | This value determines whether the payment is captured immediately, after a delay (default is 120 minutes), or manually with a separate API call. If excluded, the payment is captured immediately. - NOW - Indicates the payment is finalized and ready for further processing. Once captured, the payment details cannot be modified. - DELAYED - Indicates the payment will automatically be captured 120 minutes after authorization. This enables voiding the payment for a configured period of time. This delay time is configured at merchant onboarding. - MANUAL - Indicates the payment may change and you will send a subsequent API request to modify the payment details, including the capture method. | O | | | initiatorType | The party who actively initiates the payment, and is related to the Merchant Initiated Framework (MIT). If this field is not provided in the request, it defaults to CARDHOLDER. - MERCHANT - Indicates the request is not directly initiated by the cardholder. - CARDHOLDER - Indicates the request is initiated by the cardholder. | O | For Affirm transactions, the initiatorType must be MERCHANT. | | amount | Total monetary value of the payment including all taxes and fees. | R | | | currency | Identifier of the currency for the amount fields. This is the 3 character ISO 4217 currency code. | R | | | merchant.merchantSoftware.companyName | The company name of the software integrated to this API. If merchant is directly integrated, send JPMC. | R | | | merchant.merchantSoftware.productName | The name of the product used for marketing purposes from the consumer's perspective. | R | | | accountOnFile | The value indicates if the merchant maintains the consumer's payment credentials for returning/recurring purchases. Valid values are: - STORED - Indicates the payment is performed using credentials that have previously been stored. - NOT_STORED - This is the default value and indicates the consumer keyed in their payment credentials with no intention to store the credential. - TO_BE_STORED - Indicates the consumer submitted their payment credentials and has given permission to the merchant to store it. | O | | | accountHolder.firstName | The personal name or given name and generally positioned before the last name or family name. | O | | | accountHolder.lastName | The last name of the account holder. | O | | | accountHolder.fullName | The full name of the account holder. | O | | | accountHolder.email | The email address of the account holder. | O | | | accountHolder.billingAddress.line1 | The first line of the street address. | O | | | accountHolder.billingAddress.line2 | The second line of the street address. | O | | | accountHolder.billingAddress.postalCode | The portion of a party’s address that is the encoded representation of a geographic area to facilitate mail delivery services. | O | | | accountHolder.billingAddress.city | The municipality name. | O | | | accountHolder.billingAddress.state | The name of the state or province. | O | | | accountHolder.billingAddress.countryCode | The country code of the address based on Alpha 3 ISO standards. | O | | | shipTo.firstName | The part of an individual's full name considered a personal name or given name and generally positioned before the last name or family name. | O | | | shipTo.lastName | The last name or surname. | O | | | shipTo.fullName | The full name of the account holder. | O | | | shipTo.email | The email address of the account holder. | O | | | shipTo.shippingDescription | The description of shipping or delivery method. | O | | | shipTo.shippingCarrierName | The third-party delivery service that ships the merchant’s products to customers. | O | | | shipTo.shippingAddress.line1 | The first line of a street address. | O | | | shipTo.shippingAddress.line2 | The second line of a street address. | O | | | shipTo.shippingAddress.city | The municipality name. | O | | | shipTo.shippingAddress.state | The state or province name. | O | | | shipTo.shippingAddress.postalCode | The portion of a party’s address that is the encoded representation of a geographic area to facilitate mail delivery services. | O | | | shipTo.shippingAddress.countryCode | The country code of the address based on Alpha 3 ISO standards. | O | | | retailAddenda.level3.totalShippingAmount | The monetary value to be paid for the postage and related transportation to get a package from the shipping carrier to the consumer for all items purchased. | O | | | retailAddenda.level3.lineItems.merchantProductIdentifier | A unique merchant assigned identifier for an item or service purchased by the consumer. | O | | | retailAddenda.level3.lineItems.lineItemDescriptionText | The description of the item purchased. | O | | | retailAddenda.level3.lineItems.unitPriceAmount | The monetary value of the per-item cost of a good or service. | O | | | retailAddenda.level3.lineItems.lineItemUnitQuantity | The number of units purchased. | O | | | retailAddenda.level3.lineItems.taxInclusiveLineItemTotalAmount | The monetary value (inclusive of tax) for the price of the product or service multiplied by the quantity of the items purchased, recorded in the transaction addendum data. | O | | | retailAddenda.taxAmount | The monetary value of the tax amount assessed to the payment. | O | | | retailAddenda.isTaxable | Indicates whether tax has been added to the payment. | O | | | merchantOrderNumber | A unique merchant assigned identifier for the confirmation of goods and/or services purchased. | O | | | paymentMethodType.Affirm.redirectedPayment.merchantReturnUrl | Information on where the consumer needs to be redirected after payment process completion. Ensure that the URL begins with https. | R | | The following is a sample payload of a Affirm payment request with the interoperability-token. **HTTP Method: **`POST` **Endpoint: **`/payments` **Scenario: **Sending a payment request with Affirm as your perferred method of payment ```json { "captureMethod": "NOW", "amount": 100, "currency": "USD", "merchant": { "merchantSoftware": { "companyName": "Payment Company", "productName": "Application Name", "version": "1.235" } }, "initiatorType": "MERCHANT", "accountOnFile": "NOT_STORED", "paymentMethodType": { "affirm": { "preferredLanguage": "en_US", "redirectedPayment": { "merchantReturnUrl": "https://merchantreturnurl.com" } } }, "merchantOrderNumber": "5450378-030124055633", "accountHolder": { "billingAddress": { "line1": "123 example street", "line2": "Apartment 3b", "city": "Swansea", "state": "MA", "postalCode": "33626", "countryCode": "USA" }, "firstName": "Nadia", "lastName": "Nadja", "fullName": "Nadia Nadja", "email": "abc.abc@chase.com" }, "shipTo": { "shippingAddress": { "line1": "123 example street", "line2": "Apartment 3b", "city": "Swansea", "state": "MA", "postalCode": "33626", "countryCode": "USA" }, "firstName": "Nadia", "lastName": "Nadja", "fullName": "Nadia Nadja", "email": "abc.abc@chase.com" "shippingDescription": "TC", "shippingCarrierName": "DHL" }, "retailAddenda": { "level3": { "lineItems": [ { "lineItemDescriptionText": "lineItemDescription", "merchantProductIdentifier": "12345", "unitPriceAmount": 9000, "lineItemUnitQuantity": "1", "taxInclusiveLineItemTotalAmount": 9000 } ] }, "taxAmount": 100, "isTaxable": true } } ``` **Response:** ```json { "transactionId": "07c0e89b-be73-4c32-82eb-a492bd8fd936", "requestId": "95fbc223-cbf2-4bd6-ab4e-2c639b570106", "transactionState": "CLOSED", "responseStatus": "SUCCESS", "responseCode": "APPROVED", "responseMessage": "Transaction approved", "paymentMethodType": { "affirm": { "preferredLanguage": "en_US", "redirectedPayment": { "merchantReturnUrl": "https://merchantreturnurl.com" } } }, "captureMethod": "NOW", "captureTime": "2026-03-17T12:25:44.508Z", "initiatorType": "MERCHANT", "accountOnFile": "NOT_STORED", "isVoid": false, "transactionDate": "2026-03-17T12:25:44.508Z", "isAmountFinal": true, "amount": 100, "currency": "USD", "remainingRefundableAmount": 100, "remainingAuthAmount": 10, "merchantOrderNumber": "5450378-030124055633", "hostReferenceId": "8DXYLL5N1HC5N0PY", "merchant": { "merchantId": "997051471867", "merchantSoftware": { "companyName": "Payment Company", "productName": "Application Name", "version": "1.235" }, "merchantCategoryCode": "5047" }, "shipTo": { "shippingDescription": "TC" }, "retailAddenda": { "taxAmount": 100, "isTaxable": true, "level3": { "lineItems": [ { "lineItemDescriptionText": "test", "merchantProductIdentifier": "12345", "lineItemUnitQuantity": "1", "unitPriceAmount": 9000, "taxInclusiveLineItemTotalAmount": 9000 } ] } }, "paymentRequest": { "paymentRequestId": "07c0e89b-be73-4c32-82eb-a492bd8fd936", "paymentRequestStatus": "CLOSED", "authorizations": [ { "authorizationId": "07c0e89b-be73-4c32-82eb-a492bd8fd936", "amount": 100, "transactionStatusCode": "CAPTURED", "authorizationType": "INITIAL", "transactionTimestamp": "2026-03-17T12:25:44.508Z" } ], "captures": [ { "captureId": "07c0e89b-be73-4c32-82eb-a492bd8fd936", "amount": 100, "transactionStatusCode": "CLOSED", "captureRemainingRefundableAmount": 100, "referencedAuthorizationIdentifier": "07c0e89b-be73-4c32-82eb-a492bd8fd936" } ] } } ``` ## Related [Authorize and capture a payment](/docs/commerce/online-payments/capabilities/online-payments/how-to/auth-and-capture-payment) [Refund a payment](/docs/commerce/online-payments/capabilities/online-payments/how-to/refund-payment)