Create a pay plan and payment token from a successful pay plan offer. The payment token can be used to pay for an order for the matching amount and merchant.
If called with a customer JWT, the pay plan is created for that customer,
otherwise the customer must be provided via the Customer-Id
request header.
{- "termsAndConditionsAccepted": true,
- "offerDetails": {
- "merchantId": "mcht_Zv9OAqSZMUXvqPJK",
- "customerId": "cust_Zv9OAqSZMUXvqPJL",
- "isCounterOffer": true,
- "threeDSecureRequired": true,
- "payPlanParameters": {
- "amount": {
- "minorCurrencyUnits": 0,
- "currency": "AUD"
}, - "initialPayment": 0,
- "instalmentLength": 0,
- "instalmentFrequency": "Weekly",
- "proposedSchedule": [
- {
- "at": "2019-08-24T14:15:22Z",
- "amount": 0
}
], - "payPlanVariant": "payplan_fortnight_25_25_25_25"
}, - "createdAt": "2019-08-24T14:15:22Z"
}, - "offerVerificationToken": "string",
- "paymentSource": {
- "BankTransfer": { }
}, - "threeDsSessionId": "string",
- "surchargeRequirement": {
- "surchargeQuote": {
- "unsurchargedAmount": 0,
- "surchargeAmount": 0,
- "totalAmount": 0,
- "paymentMethod": {
- "cardAttributes": {
- "currency": "AFN",
- "country": "AF",
- "funding": "credit",
- "prepaid": true,
- "brand": "",
- "issuer": "string",
- "productType": "CP",
- "schemeProduct": "AC000",
- "bin": "string"
}
}, - "summary": "string",
- "quoteVerificationToken": "string"
}
}
}
{- "payPlan": {
- "payPlanId": "plan_Zv9OAqSZMUXvqPJM",
- "merchantId": "mcht_Zv9OAqSZMUXvqPJK",
- "customerId": "cust_Zv9OAqSZMUXvqPJL",
- "state": "Created",
- "amount": {
- "minorCurrencyUnits": 0,
- "currency": "AUD"
}, - "surchargeAmount": 0,
- "platformFee": 0,
- "taxAmount": 0,
- "payPlanVariant": "payplan_fortnight_25_25_25_25",
- "nextInstalmentDate": "2019-08-24T14:15:22Z",
- "nextInstalment": 3,
- "planAmountOutstanding": 0,
- "paymentSourceType": "Card",
- "merchantOrderId": "ordr_Zv9OAqSZMUXvqPJO",
- "transactionId": "tran_Zv9OAqSZMUXvqPJN",
- "charges": [
- {
- "chargeId": "chrg_Zv9OAqSZMUXvqPJP",
- "amount": 0,
- "isSuccess": true,
- "instalmentNumber": 0,
- "instalmentCharge": true,
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "refunds": [
- {
- "refundId": "rfnd_Zv9OBKSZMUXvqPJc",
- "amount": 0,
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "isRefunded": true,
- "isOverdue": true,
- "overdueAmount": 0,
- "overdueAt": "2019-08-24T14:15:22Z",
- "bankTransferDetails": {
- "reference": "string",
- "bankAccountNumber": "string",
- "bankAccountBsb": "string",
- "payId": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "paymentTokenId": "ptkn_Zv9OBaSZMUXvqPJk"
}