Carbon

Documentation

Welcome to Carbon's docs!

Get Started    

Confirmation, Success Redirect, and Error Redirect Urls

Superusers integrating our payment gateway may provide a confirmation url, success redirect url, and/or error redirect url for notifications after we complete processing card authorizations post 3DS-authentication. You can set and retrieve this configuration at the endpoint below.

If you are integrating as a payment gateway and do not set any of this config, then we cannot post charge completion data to your confirmationUrl or redirect to your successRedirectUrl for successful payments or errorRedirectUrl for unsuccessful payments.

Please check out our credit/debit API charge endpoint docs and charge completion doc for more information on this superuser config. Note that payment gateway integrators must set their confirmationUrl, successRedirectUrl, and errorRedirectUrl via this endpoint in addition to their termination url and delay KYC boolean.

Setting Confirmation, Success Redirect, and Error Redirect Urls

Example request/response

// legacy auth that will be deprecated in our v2 api
/*
let jwtToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlMzE3YjdlNy0yMzQ1LTQ0MWMtODA0Ni1kYjgxNTkyYmEyN2YiLCJzdXBlclVzZXIiOnRydWUsImNvbnRhY3QiOmZhbHNlLCJlbWFpbCI6ImRhbmllbEBjYXJib24ubW9uZXkiLCJpYXQiOjE1NTczMjc5MTR9.WZnSR5N1FebmT9nMu97PJvku49NY0jk4aKVPKm_1MlM';
*/
// we strongly recommend using your secret key to more securely authenticate your superuser instead
let secretKey = 'sk_test_A41Hm6IY3Q5LJ7ham34Zpkcj';

let headers = {
  headers: {
    Authorization: `Bearer ${secretKey}`
  }
};

let url = `${ROOT}/v1/admin`;

let data = {
  confirmationUrl: 'https://sandbox.carbon.money/confirmationUrl',
  successRedirectUrl: 'https://sandbox.carbon.money/successRedirectUrl',
  errorRedirectUrl: 'https://sandbox.carbon.money/errorRedirectUrl',
}

axios.put(url, data, headers).then(result => console.log(result)).catch(err => console.log(err));
{ 
  message: 'Successfully updated superuser config.',
  details: 
   { 
     confirmationUrl: 'https://sandbox.carbon.money/confirmationUrl',
     successRedirectUrl: 'https://sandbox.carbon.money/successRedirectUrl',
     errorRedirectUrl: 'https://sandbox.carbon.money/errorRedirectUrl'
   },
  code: 200 
}
// 500
{
  message: 'Error setting superuser config.',
  code: 500
}

Getting Confirmation, Success Redirect, and Error Redirect Urls

// legacy auth that will be deprecated in our v2 api
/*
let jwtToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlMzE3YjdlNy0yMzQ1LTQ0MWMtODA0Ni1kYjgxNTkyYmEyN2YiLCJzdXBlclVzZXIiOnRydWUsImNvbnRhY3QiOmZhbHNlLCJlbWFpbCI6ImRhbmllbEBjYXJib24ubW9uZXkiLCJpYXQiOjE1NTczMjc5MTR9.WZnSR5N1FebmT9nMu97PJvku49NY0jk4aKVPKm_1MlM';
*/
// we strongly recommend using your secret key to more securely authenticate your superuser instead
let secretKey = 'sk_test_A41Hm6IY3Q5LJ7ham34Zpkcj';

let headers = {
  headers: {
    Authorization: `Bearer ${secretKey}`
  }
};

let url = `${ROOT}/v1/admin`;


axios.get(url, headers).then(result => console.log(result)).catch(err => console.log(err));
{
  message: 'Successfully retrieved superuser config.',
  details: 
   { 
     confirmationUrl: 'https://sandbox.carbon.money/confirmationUrl',
     successRedirectUrl: 'https://sandbox.carbon.money/successRedirectUrl',
     errorRedirectUrl: 'https://sandbox.carbon.money/errorRedirectUrl',
   },
  code: 200 
}
// 500
{
  message: 'Error getting superuser config.',
  code: 500
}

Updated about a month ago

Confirmation, Success Redirect, and Error Redirect Urls


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.