The Source object

The Source object contains information on the payment source.

Attributes

Description

id string

Unique identifier of the source.

createdTime datetime

The time when the source was created.

type string

The payment type of the source. The payment type will correspond to another element in the source response that contains detailed information specific to the type. For example, a type of creditCard indicates that there is an object in the response named creditCard.

currency string

Three-letter ISO currency code.

amount number

The amount associated with the source. Once ready, the source will be charged this amount. Required for single-use sources.

reusable boolean

If true, you can reuse this source, if false, only once.

owner object

Contains information on the owner of the credit card.

owner.firstName string

The owner's first name.

owner.lastName string

The owner's last name.

owner.email string

The owner's email address.

owner.organization string

The owner's organization.

owner.upstreamId string

The customer ID if it is different from the Digital River customer ID (external reference ID).

owner.address object

The owner's shipping address.

owner.address.line1 string

The first line of the owner's address.

owner.address.line2 string

The second line of the owner's address.

owner.address.city string

The name of the city.

owner.address.postalCode string

ZIP or postal code.

owner.address.state string

State/County/Province/Region.

owner.address.country string

Two-letter country code.

owner.additionalAddressInfo object

Additional address information.

owner.additionalAddressInfo.neighbourhood [string]

Additional neighborhood information.

creditCard object

Contains the credit card information.

creditCard[].lastFourDigits string

The last four digits of the card number.

creditCard[].expirationMonth number

One to two digits representing the expiration month.

creditCard[].expirationYear number

Four digits representing the expiration year.

creditCard[].brand

string

The card brand (for example, Visa)

googlePay

object

Contains the Google Pay information.

googlePay[].lastFourDigits string

The last four digits of the card number.

googlePay[].expirationMonth number

One to two digits representing the expiration month.

googlePay[].expirationYear number

Four digits representing the expiration year.

googlePay[].brand string

The card brand (for example, Visa)

payPal

object

Contains the PayPal information.

payPal[].redirect

object

Contains the PayPal redirect information.

payPal[].directDebit

object

Contains the PayPal direct debit information.

payPal.directDebit.token

string

The token for the PayPal direct debit (for example, EC-53H39048EL439164J).

payPalBilling

Object

Contains the PayPal Billing information.

payPalBilling[].redirect

string

Redirect the customer to PayPal to authorize the charge at PayPal.

payPalBilling[].directDebit

string

The token for the PayPal Billing direct debit (for example, EC-53H39048EL439164J).

directDebit

object

Contains the Direct Debit information.

directDebit[].redirect

string

Redirect the customer to the payment provider for authorization.

wireTransfer

object

Contains the Wire Transfer information.

payCo object

Contains the PayCo information.

flow string

The authentication flow of the source.

state string

The status of the source. The possible statuses are as follows:

‚Äč

  • canceled

  • chargeable

  • consumed

  • failed

  • pending

You can only use chargeable sources to create a charge.

customerId string

Unique identifier of a customer.

paymentSessionId string

Unique identifier of a payment session.

liveMode boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

The Source object
The Source object
{
"id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
"createdTime": "2018-04-25T20:36:00Z",
"type": "creditCard",
"currency": "USD",
"amount": 1180.26,
"reusable": true,
"owner": {
"firstName": "John",
"lastName": "Smith",
"email": "jsmith@digitalriver.com",
"organization": "Digital River",
"upstreamId": "55129-54673",
"address": {
"line1": "10380 Bren Rd W",
"line2": "string",
"city": "Minnetonka",
"postalCode": "55129",
"state": "MN",
"country": "US"
},
"additionalAddressInfo": {
"neighborhood": "Centro"
}
},
"creditCard": {
"lastFourDigits": "3119",
"expirationMonth": 3,
"expirationYear": 2023,
"brand": "Visa"
},
"googlePay": {
"lastFourDigits": "3119",
"expirationMonth": 2,
"expirationYear": 2022,
"brand": "Visa"
},
"payPal": {
"redirect": {
"redirectUrl": "https://api.digitalriver.com:443/payments/redirects/e626ec65-24d6-46fb-b632-10b90f4c4912?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2d",
"returnUrl": "https://mypage.com/success",
"cancelUrl": "https://mypage.com/cancel"
},
"directDebit": {
"token": "EC-53H39048EL439164J"
}
},
"payPalBilling": {
"redirect": {
"redirectUrl": "https://api.digitalriver.com:443/payments/redirects/e626ec65-24d6-46fb-b632-10b90f4c4912?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2d",
"returnUrl": "https://mypage.com/success",
"cancelUrl": "https://mypage.com/cancel"
},
"directDebit": {
"token": "EC-53H39048EL439164J"
}
},
"directDebit": {
"redirect": {
"redirectUrl": "https://api.digitalriver.com:443/payments/redirects/75743f60-1023-470e-be48-b761260317af?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2d",
"returnUrl": "https://mypage.com/success"
}
},
"wireTransfer": {
"accountHolder": "Netgiro Payments AB",
"bankName": "ABN AMRO Bank N.V.",
"city": "Prague",
"country": "ES",
"referenceId": "DR1651067521",
"accountNumber": "0100037259",
"additionalBankInformation": "Codigo de oficina: 0001 Codigo de entidad: 0156 Digitos de control: 09",
"iban": "ES35 0156 0001 0901 0003 7259"
},
"payCo": {
"redirectUrl": "https://api.digitalriver.com:443/payments/redirects/75743f60-1023-470e-be48-b761260317af?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2d",
"returnUrl": "https://mypage.com/success",
"payCo": {}
},
"flow": "standard",
"state": "chargeable",
"customerId": 5823594809,
"paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
"liveMode": false
}