Card

BETA

Allows lenders to associate physical or virtual card with a loan or line of credit.

Create card

The card details. Mainly used for BNPL (Buy Now Pay Later) loans.

You can pass either issuerId + token attributes or the card object.

If issuerId + token attributes are passed, Peach will sync the card status, transactions and balances with the loan ledger seamlessly.

If cardDetails is passed, the card details will be stored in the Peach system as read-only. The lender is responsible for updating the loan details based on the card usage.

The card issuerId and token can be updated only if the loan status is originated or pending. After the loan is activated, the issuerId and token cannot be changed.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

Request Body schema: application/json
Any of:
issuerId
string

The card issuer/vendor unique identifier. The card issuer must be configured in Peach.

token
string

The card token in the issuer system.

object

The card details.

type
string

The type of card issued. For loanType installment, only the only allowable value is virtualCard. For loanType lineOfCredit, virtual and credit card are accepted.

Value: "virtualCard"
object

The card balances. Only applicable to virtualCard type card objects.

Responses
200

Success

post/people/{personId}/loans/{loanId}/card
Request samples
application/json
{
  • "issuerId": "string",
  • "token": "string",
  • "cardDetails": {
    },
  • "type": "virtualCard",
  • "cardBalances": {
    }
}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Update card

The card details. Mainly used for BNPL (Buy Now Pay Later) loans.

You can pass either issuerId + token attributes or the card object.

If issuerId + token attributes are passed, Peach will sync the card status, transactions and balances with the loan ledger seamlessly.

If cardDetails is passed, the card details will be stored in the Peach system as read-only. The lender is responsible for updating the loan details based on the card usage.

The card issuerId and token can be updated only if the loan status is originated or pending. After the loan is activated, the issuerId and token cannot be changed.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

Request Body schema: application/json
Any of:
issuerId
string

The card issuer/vendor unique identifier. The card issuer must be configured in Peach.

token
string

The card token in the issuer system.

object

The card details.

type
string

The type of card issued. For loanType installment, only the only allowable value is virtualCard. For loanType lineOfCredit, virtual and credit card are accepted.

Value: "virtualCard"
object

The card balances. Only applicable to virtualCard type card objects.

Responses
200

Success

put/people/{personId}/loans/{loanId}/card
Request samples
application/json
{
  • "issuerId": "string",
  • "token": "string",
  • "cardDetails": {
    },
  • "type": "virtualCard",
  • "cardBalances": {
    }
}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Get card

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

query Parameters
showPan
boolean

Set to true to get the full PAN in the response. Special permission is required.

showCvv
boolean

Set to true to get the full CVV2 number in the response. Special permission is required.

refresh
boolean

If true, the Peach system will make new API calls to the card issuer to get the most recent card details and balances, and will store the new details in the Peach database. Otherwise, the Peach system will return the most recent details from its database.

Responses
200

Success

get/people/{personId}/loans/{loanId}/card
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Update transaction mapping

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

Request Body schema: application/json
mappingType
string

After loan creation and activation, lenders need to create mapping for application of purchases to one or many draws. Currently, Peach supports application of purchases to a single draw. This step must be executed for Peach to be able to properly apply card transactions to the line of credit.

Value: "singleDraw"
drawId
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

Peach's unique or lender's external identifier.

Responses
200

Success

put/people/{personId}/loans/{loanId}/card/transaction-mapping
Request samples
application/json
{
  • "mappingType": "singleDraw",
  • "drawId": "string"
}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Get transaction mapping

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string^ext-|^[A-Z]{2}-[A-Z0-9]+-[A-Z0-9]+|^\d+$

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

Responses
200

Success

get/people/{personId}/loans/{loanId}/card/transaction-mapping
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}