LogoLogo
System status
Admin APIs reference
Admin APIs reference
  • Admin APIs reference
  • Order management
    • Refunds
    • Retrieve an order (synchronous API)
    • Retrieve an invoice (synchronous API)
    • Manage orders (synchronous API)
  • Customer management
    • Retrieve a customer (synchronous API)
    • Manage a customer (synchronous API)
  • Subscription mangement
    • Manage a subscription
    • Renew a subscription
    • Apply an immediate midterm change
    • Manage subscription payments
    • Modify the subscription's external reference ID
    • Manage the subscription's address
    • Get all orders
    • Retrieve subscriptions with pending actions
    • Retrieve subscriptions
    • Manage a perpetual price
    • Update a subscription's email address
  • Site management
    • Get authorized countries
  • Product management
    • Manage products (asynchronous API)
    • Retrieve a product (synchronous API)
    • Retrieve the product task status (synchronous API)
  • Offer Management
    • Manage offers (synchronous API)
    • Retrieve an offer (synchronous API)
  • Webhook management
    • Manage webhook events
  • Payment source
    • Source management
  • File management
    • Retrieve a file
Powered by GitBook
On this page
  1. Payment source

Source management

PreviousManage webhook eventsNextRetrieve a file

Last updated 4 months ago

  • GETGets a source by identifier
  • POSTPosts a source

Gets a source by identifier

get

Retrieve the details of a source by supplying its unique identifier.

Authorizations
Path parameters
idstringRequired

Source identifier

Responses
200
OK.
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
404
404 Not Found
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
get
GET /sources/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
  "clientSecret": "52199c06-b261-4786-8609-d0a84185a0d2_2b72614b-77f6-4801-bd48-8982e314fdd5",
  "createdTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2018,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "month": "APRIL",
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 115
  },
  "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": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "営業部",
      "phoneticName": "ヤマダ タロ"
    }
  },
  "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"
    }
  },
  "payPalCredit": {
    "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",
    "swiftCode": "string"
  },
  "payCo": {
    "redirectUrl": "https://api.digitalriver.com:443/payments/redirects/75743f60-1023-470e-be48-b761260317af?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2d",
    "returnUrl": "https://mypage.com/success",
    "payCo": {}
  },
  "alipay": {},
  "applePay": {},
  "bPay": {
    "accountHolder": "Global Collect BV",
    "bankName": "Commonwealth Bank",
    "city": "Sydney",
    "country": "Australia",
    "referenceId": "12345678",
    "accountNumber": "87654321",
    "billId": "112233",
    "customerPaymentReference": "443322",
    "swiftCode": "CTBAAU2S"
  },
  "onlineBanking": {
    "bankCode": "86"
  },
  "codJapan": {},
  "klarnaCredit": {
    "shipping": {
      "recipient": "John Doe",
      "phoneNumber": "5559895326",
      "address": {
        "line1": "10380 Bren Road West",
        "city": "Minnetonka",
        "state": "MN",
        "country": "US",
        "postalCode": "55343"
      },
      "email": "jdoe@yahoo.com"
    },
    "token": "1111222233334444"
  },
  "klarnaCreditRecurring": {
    "returnUrl": "https://example.org/return",
    "cancelUrl": "https://example.org/cancel"
  },
  "konbini": {
    "storeId": "33334444",
    "receiptNumber": "8675309",
    "printableInvoiceUrl": "https://printableinvoice.com",
    "storeName": "Seven Eleven",
    "localizedStoreName": "セブン‐イレブン",
    "storeLogoUrl": "https://storelogo.com"
  },
  "bankTransfer": {},
  "msts": {},
  "bancontact": {},
  "ideal": {},
  "giftCard": {
    "cardCurrency": "USD",
    "conversionRate": 1,
    "lastFourDigits": 8139
  },
  "amazonPay": {},
  "afterPay": {},
  "ccAvenue": {},
  "flow": "standard",
  "state": "chargeable",
  "metadata": {
    "coupon": "iOS"
  },
  "customerId": "5823594809",
  "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
  "liveMode": false
}

Posts a source

post

Create a secondary source.

Authorizations
Body
paymentSessionIdstringOptional

Unique identifier of the session

Example: {{checkout_session-id}}
amountnumber · doubleOptional

The amount associated to the order

Example: 20
typestring · enumRequired

The type of source

Example: customerCreditPossible values:
upstreamIdstringOptional

Unique identifier associated to an upstream system

Example: custCredit_orderId_16008796
customerCreditobject · CustomerCreditOptional
Responses
201
OK.
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
404
404 Not Found
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
post
POST /sources HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 514

{
  "paymentSessionId": "{{checkout_session-id}}",
  "amount": 20,
  "type": "customerCredit",
  "upstreamId": "custCredit_orderId_16008796",
  "customerCredit": {},
  "owner": {
    "firstName": "John",
    "lastName": "Smith",
    "email": "jsmith@digitalriver.com",
    "organization": "Digital River",
    "upstreamId": "55129-54673",
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "営業部",
      "phoneticName": "ヤマダ タロ"
    }
  }
}
{
  "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
  "clientSecret": "52199c06-b261-4786-8609-d0a84185a0d2_2b72614b-77f6-4801-bd48-8982e314fdd5",
  "createdTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2018,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "month": "APRIL",
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 115
  },
  "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": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "営業部",
      "phoneticName": "ヤマダ タロ"
    }
  },
  "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"
    }
  },
  "payPalCredit": {
    "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",
    "swiftCode": "string"
  },
  "payCo": {
    "redirectUrl": "https://api.digitalriver.com:443/payments/redirects/75743f60-1023-470e-be48-b761260317af?apiKey=pk_test_6cb0fe9ce3124093a9ad906f6c589e2d",
    "returnUrl": "https://mypage.com/success",
    "payCo": {}
  },
  "alipay": {},
  "applePay": {},
  "bPay": {
    "accountHolder": "Global Collect BV",
    "bankName": "Commonwealth Bank",
    "city": "Sydney",
    "country": "Australia",
    "referenceId": "12345678",
    "accountNumber": "87654321",
    "billId": "112233",
    "customerPaymentReference": "443322",
    "swiftCode": "CTBAAU2S"
  },
  "onlineBanking": {
    "bankCode": "86"
  },
  "codJapan": {},
  "klarnaCredit": {
    "shipping": {
      "recipient": "John Doe",
      "phoneNumber": "5559895326",
      "address": {
        "line1": "10380 Bren Road West",
        "city": "Minnetonka",
        "state": "MN",
        "country": "US",
        "postalCode": "55343"
      },
      "email": "jdoe@yahoo.com"
    },
    "token": "1111222233334444"
  },
  "klarnaCreditRecurring": {
    "returnUrl": "https://example.org/return",
    "cancelUrl": "https://example.org/cancel"
  },
  "konbini": {
    "storeId": "33334444",
    "receiptNumber": "8675309",
    "printableInvoiceUrl": "https://printableinvoice.com",
    "storeName": "Seven Eleven",
    "localizedStoreName": "セブン‐イレブン",
    "storeLogoUrl": "https://storelogo.com"
  },
  "bankTransfer": {},
  "msts": {},
  "bancontact": {},
  "ideal": {},
  "giftCard": {
    "cardCurrency": "USD",
    "conversionRate": 1,
    "lastFourDigits": 8139
  },
  "amazonPay": {},
  "afterPay": {},
  "ccAvenue": {},
  "flow": "standard",
  "state": "chargeable",
  "metadata": {
    "coupon": "iOS"
  },
  "customerId": "5823594809",
  "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
  "liveMode": false
}